Arithmethics

Gavagay

Warlord
Joined
Jul 4, 2008
Messages
112
Location
Moscow
I have an interesting screenshot for your consideration.

wealthbug-1.jpg


Sorry for this stupid Cyrillics, I can't turn it off without messing up the whole game. I think, I should explain to you the meaning of all this.
It says that I have 14 minerals base production and also 12 minerals left from previous built. I also have 25 % bonus for running wealth and 45 % percent penalty for building a military unit and for being Morgan.
At last it says that after factoring in all this stuff my final production will be 20 minerals.
Let's check the math.

12+14=26
26*0.25+26=32.5
32.5*0.45=14.625
32.5-14.625=17.875
Oh-oh. Where does twenty come from? May be I should deduce 45% from my unmodified production?
26*0.45=11.7
32-11.7=20.3
After rounding down it will be 20
OK. Wrote it just to let people understand how exactly this is supposed to work. I myself didn't know beforehand.
But my next question is more important and much more difficult to answer. Why do I still have number 32 besides my production bar?
It looks like that after showing me correct "theoretical" calculation the computer forgot to apply it to actual production.
But may be he really did and just showed me a wrong figure?
Let's see the next screenshot for the answer.

wealthbug-2.jpg


This is the very same base but one turn later. As you can see, I have actually received 32 minerals instead of twenty. A penalty for producing a military unit wasn't applied.
Please, correct me if I wrong but something seems broken here.
 
Production penalties for military units (and some others penalties) have problems.

There is a thread about a problem with them when applied via a negative entry in a civics' iMilitaryProductionModifier over here, especially post 6. The problematic function in the DLL is CvCity::getProductionModifier and it won't return a negative number unless you modify it to do so.

The hover help does not use this function - it is calculated elsewhere in a way that doesn't have this problem.
 
Hmm, that would explain why I never had the feeling that choosing Wealth hurt my unit production much...
 
Back
Top Bottom