Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #918821

Sort out non-standard unit upkeeps

Added by Alexandro Ignatiev over 1 year ago. Updated about 1 month ago.

Start date:
Due date:
% Done:


Estimated time:


Within our rulesets, it works without warnings to add uk_science, uk_luxury, uk_trade to units' sections. But the result is buggy:
  • Trade upkeep works mostly as expected, just some minor interface problems appear (gold is gone into "(unknown)" direction)
  • Luxury upkeep breaks workers' auto-arranging and CMA, otherwise does not do anything (luxury for citizens moods is taken from full production).
  • Science upkeep causes interface inconsistence, otherwise affects only city migration score (in update_bulbs() full science production is taken). But Ilkka in PM doubts this case.
  • None of this upkeeps leads to units disbanding, but for existing Freeciv versions this thing maybe should be left untouched.
    I think the idea of such upkeeps is too rich to just plumb it out of usage, and we should sort it out, at least make 2.6 clients understand them in the same way as the server does.


#1 Updated by Anonymous over 1 year ago

Yeah, Science upkeep basically worked for me, apart from the display issues, but only because I was using a server with the Longturn patches and that was accidentally changed (fixed?) there. The distribution server uses the prod value for science, so the upkeep costs get ignored when the city is actually processed:

At least with the GTK 3.22 client, the city dialog also shows the prod values for Science and Lux. (For gold, it shows both prod and surplus). The popup with the breakdown shows usage and final surplus, though, matching what the Research view (F6) shows.
The Cities listing (F4) also seems to show prod, not surplus for Sci.

For Gold/Lux/Sci, the breakdown the client calculates for the popup uses the prod value for Trade, hence the "unknown" fields if there's Trade upkeep: vs. how the server does include usage in this case:

Also, the prod fields are defined as UINT16, so negative Trade makes the Gold/Lux/Sci values wrap around with the "Trying to put -2 into 16 bits: it will result 65534 at receiving side" messages and similarly the overflown number shows in the city dialog. And of course, there's no icons for trade/lux/sci upkeep for the units in the city dialog, like there is for food/shields/gold, which kinda also makes for a bad UI.

FWIW, I can imagine it mostly creating just confusion when someone decides to make a ruleset with part gold upkeep, part trade upkeep, part something else...

#2 Updated by Marko Lindqvist about 1 year ago

  • Sprint/Milestone changed from 2.6.4 to 2.6.5

#3 Updated by Marko Lindqvist 11 months ago

  • Sprint/Milestone changed from 2.6.5 to 2.6.6

#4 Updated by Marko Lindqvist 6 months ago

  • Sprint/Milestone changed from 2.6.6 to 3.0.1

#5 Updated by Marko Lindqvist about 1 month ago

  • Sprint/Milestone changed from 3.0.1 to 3.0.2

Also available in: Atom PDF