On 03-09-2022 10:51, Stian Grenborgen wrote:
When looking into the code I have noticed all sorts of issues with modifiers 
not being applied. Some of these issues only affect methods used by the AI, 
while other issues affect the actual production. For example, an expert farmer 
never gets the additional (expert) bonus from the grain resource.

I think the best solution for these problems is having a separate class for 
calculating production/consumption -- and that this class gets the list of 
modifiers for the colony and player as parameters. This way, we can use the 
same code everywhere (potential, maximum and actual production) and 
Tile+ColonyTile+Building+Colony gets simplified.


I strongly suggest to look at the code used for production in buildings .

The data the formulae used there are based on is found in bug tickets created by me.

Analysis is also found in those tickets and mpope took care of the actual coding.


You will find lots of weird things / exceptions and inconsistenties in the formulae, but all have been verified thoroughly .

The data that was collected for outdoors production sofar has strong indications they are worse and may reveal dependencies that are illogical and mentioned nowhere in col1 documentation .


Lone_Wolf



_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to