Miscalculating Production for units

I think I might have figured out the problem here. Novgorod is being affected by the unit supply cap, but it's not displaying on the top bar. Continuing to investigate...
 
When cycling between turns, the swordsman number jumps up to 9 then back to 1. That sounds like the -80% modifier is getting re-applyed every turn and then removed?
Cheers
 
That won't work because there appears to be a mistake somewhere with the maximum unit supply calculation. The bare minimum is 10, and you have fewer units than that, so it shouldn't be taking effect at all.
 
So, if I were to go back and find an autosave before the problem emerged, then build a swordsman in any other city but Novgorod, the same bug would show in that city?
 
I figured out what the mistake is. I stored unit supply and the cap in these variables:

MapModData.VEM.UnitSupplyCurrent
MapModData.VEM.UnitSupplyMax

Problem is there's no player index! So all players were sharing the same supply variable, and whoever happened to go last was used for everyone else. I've added a player index to this.
 
Great you find the bug so fast.
Very good work!

Do you add the fix in a new beta or just in a hotfix for 1.09?

-- Sorry, just read the webside news about the Fix, so my question is obsolete. :D --
 
If you've encountered this problem, did you ever load a savegame from within an active game? Or do you load saves from the main menu? I see the problem in this savegame, and I'm tracing it back through the yield library to find the root cause.

By coincidence I have just started loading games without exiting to the main menu, because I thought you said that was no longer necessary. (I noticed this problem with regard to policies.)
 
Back
Top Bottom