Settler first strategy

5 turns for an epic chop so they are rounding up. Thats odd given their known love of the floor function.

Now that I have a chance to look at the code... it's not so odd. I forgot that the memory of what's going on is maintained in the plot, rather than in the unit.

Short answer is that the plot is keeping track of how much Time has been made toward a particular build. In much the same way you invest hammers when constructing a building and the building completes when the hammers invested meets or exceeds the costs, so to does the game track the amount of Time you've invested in building a particular improvement, and the improvement is completed when your investment meets or exceeds the cost.

The kicker: one (unaugmented) worker turn represents 100 units of time (defined in Civ4UnitInfos.xml in the iWorkRate property - yes, the fast worker has precisely the same rate). The basic time to build an improvement is defined in CIV4BuildInfos.xml (the iTime property) is also tracked in time.

So in effect, instead of 4.5 turns, which would floor to 4, we have a cost of 450 time, which floors to 450. And of course it takes 5 investments of 100 units of time to exceed that, not 4.

Given that work rates can change while an improvement is built, it does make sense that progress is tracked this way. After all, if you try to implement a 50% improvement in work rate when dealing with integer units of work, you end up with... well, Barrage I + II is what you end up with, except for workers.
 
Back
Top Bottom