Summary: Gold income not computed correctly when server needs
to recompute city productions (e.g. when a city grows)
                 Project: Freeciv
            Submitted by: rogier
            Submitted on: Sun 19 Oct 2014 05:16:26 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.4.3
         Discussion Lock: Any
        Operating System: GNU/Linux
         Planned Release: 



The gold income from a city is not computed correctly when the server needs to
recompute the city productions between turns. This happens for instance when
the city grows. See the attached savegame.

There is one city: Paris. It should have 20 happy citizens and 19 tax
collectors. Current production is coinage. I enabled the CMA, to make sure the
city maintains the desired production values.

Given these settings, Paris is expecting to earn an income of 248 gold for the
next turn, consisting of 202 tax and 46 coinage production.

After finishing the turn however, the actual income appears to have been a
mere 106 gold.

The problem becomes apparent when disabling the CMA before ending the turn: at
the start of the new turn, the expected income is in fact exactly 106 gold.

I suspect the following happens (deduced partly from the freeciv source):

- Before the tax income is computed, the city grows, and the production values
are recomputed by the server, presumably without regard to the CMA
preferences. This resets all tax collectors to researchers.
- The server then uses the newly-computed production values (i.e. the
post-growth values) to compute the income (which I found surprising. I had
assumed that the income was always earned during the *previous* turn).
- Only later does the CMA recompute the city production according to the CMA
preferences, leaving the user utterly puzzled as to why the income is less
than half of what was expected.

If I modify the CMA preferences to maximize gold, which stops the celebration,
and thus the growth, the expected income of 244 is actually earned. This
suggests that the problem only happens when the server needs to recompute city
production values.

Kind regards,



File Attachments:

Date: Sun 19 Oct 2014 05:16:26 PM UTC  Name:
test-cma-T0001-Y-3999-manual.sav.bz2  Size: 14kB   By: rogier



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to