iMatt Posted July 24, 2009 Report Share Posted July 24, 2009 (edited) When I'm at 0 soldiers and I try to buy, say 100 soldiers, it says this: This transaction will purchase 100 soldiers for a total price of $733.81. Based on this transaction you will have a real military of 100 soldiers with an efficiency of 100 and 0 (0) deployed soldiers. It doesn't show the right efficiency number, it doesn't multiply the 100 by my GCs and Barracks increases. I'm fairly certain it's something to do with buying soldiers from *zero*, because I've had others test it and it shows the right efficiency numbers. I have 5 GCs and 5 Barracks. Edited July 24, 2009 by imatt15 Quote Link to comment Share on other sites More sharing options...
iMatt Posted July 24, 2009 Author Report Share Posted July 24, 2009 I've confirmed after buying the soldiers that the efficiency is applied contrary to what is shown above. So this is a typo. Quote Link to comment Share on other sites More sharing options...
admin Posted July 24, 2009 Report Share Posted July 24, 2009 When you have zero soldiers the game doesn't know what your efficiency will be because of a division by zero issue. I'm thinking on a way to correct this but it will be tricky. *admin goes off to think some more. Quote Link to comment Share on other sites More sharing options...
Gopherbashi Posted July 26, 2009 Report Share Posted July 26, 2009 You could just remove "with an efficiency of..." when buying from 0 if you really wanted. Quote Link to comment Share on other sites More sharing options...
Viluin Posted July 27, 2009 Report Share Posted July 27, 2009 (edited) If there's a formula to calculate the efficiency based on your current amount of soldiers and your efficiency multiplier, can't you use it on the purchase screen? If you're currently predicting the future efficiency on the purchase screen by dividing the current soldier efficiency by the current soldier count, I wonder what would happen if you had very few soldiers and tried to buy more. I think the prediction shown might be inaccurate if you use the integer value of soldier efficiency, because 4.4 turns into 4, so if you had 1 (4) soldier and tried to purchase 1000 more, it would predict an efficiency of 4004 even though your efficiency multiplier is 4.4. Or maybe you do use a double value of the current efficiency level to predict the new one. Either way it's kind of a weird way to do it, might as well use the formula that's used in calculating your real efficiency level when you actually press the purchase button. If it slows down the game, you could store a three-decimal "efficiency multiplier" number for every nation, that is shown on the purchase screen. That way you only have to send that number along instead of fetching all the improvement/trade data to calculate the multiplier every time someone visits the soldier purchase screen. You could just remove "with an efficiency of..." when buying from 0 if you really wanted. I'd say it's especially important to include it when you have 0 soldiers, because that's the only time you can't guess your new efficiency unless you manually add up all your efficiency bonuses. Edited July 27, 2009 by Viluin Quote Link to comment Share on other sites More sharing options...
Lord Emares Posted July 29, 2009 Report Share Posted July 29, 2009 Calculating efficiency should be an easy matter: Currently if I want to calculate someone's efficiency I use this: Efficiency=floor(Soldiers*GovSol*IF(Alu=1,1.2,1)*IF(Coal=1,1.08,1)*IF(Oil=1,1.1, 1)*IF(Pigs=1,1.15,1)*(1+IF(GC>=0,IF(GC<=5,GC*0.35,5*0.35),0))*(1+IF(Barracks>=0,IF(Barracks<=5,Barracks*0.1,5*0.1),0)),0) to modify this for the purchase screen all one needs to do is: Soldier Purchase Efficiency=floor(Soldiers Being Bought*GovSol*IF(Alu=1,1.2,1)*IF(Coal=1,1.08,1)*IF(Oil=1,1.1,1)*IF(Pigs=1,1.15,1 )*(1+IF(GC>=0,IF(GC<=5,GC*0.35,5*0.35),0))*(1+IF(Barracks>=0,IF(Barracks<=5,Barracks*0.1,5*0.1),0)),0) Quote Link to comment Share on other sites More sharing options...
King Death II Posted July 31, 2009 Report Share Posted July 31, 2009 When you have zero soldiers the game doesn't know what your efficiency will be because of a division by zero issue. I'm thinking on a way to correct this but it will be tricky. *admin goes off to think some more. nooo dont divide by 0 D: you'll tear a whole in the fabric of time and the universe will implode Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.