Page 1 of 1

How does the treasury actually work?

Posted: Fri Nov 15, 2019 8:30 pm
by Corbeau
I thought I understood how the treasury works, but then stuff happened and now I'm not so sure anymore.

So, can someone clarify those three options?
; Method of paying unit and improvement gold upkeep
; 0 - The player`s total gold must be non-negative after paying upkeep
; costs associated with each city. If for any city the player`s gold
; is negative, random buildings in the city are sold off. If the gold
; is still negative, then supported units with gold upkeep are
; disbanded.
; 1 - In the first step, the player`s total gold must be non-negative after
; paying upkeep for all buildings within a city. If for any city the
; player`s gold is negative, random buildings in the city are sold off.
; In the second step, gold upkeep for all units is paid in a lump sum.
; If the player does not have enough gold, random units with gold upkeep
; are disbanded.
; 2 - Gold upkeep for all buildings and units is paid in a lump sum after
; all cities have been processed. If the player does not have enough
; gold, alternatively a random buildings from a random cities is sold
; and a random units with gold upkeep is disbanded till the treasury is
; balanced.
If I understand it correctly, the first two do city by city calculation, while the last one does the whole upkeep before calculating income. But none does income first and the upkeep, right?

Re: How does the treasury actually work?

Posted: Sat Nov 16, 2019 10:41 pm
by Ignatus
Whatever method, city (selected in a randomized order) gold gain is added to the treasure, then its gold upkeep is paid from it. Then for per-city or mixed style the treasure is checked to going in debt. For nation or mixed uk the check and the sellings are done after all cities are processed. So it always happens after the gains.

Re: How does the treasury actually work?

Posted: Sun Nov 17, 2019 1:23 pm
by Corbeau
Ok, so if I had around 40 gold in treasury and income per turn was +40, AND I had a building sold "because no money", I was EXTREMELY unlucky?

Re: How does the treasury actually work?

Posted: Sun Nov 17, 2019 5:12 pm
by Ignatus
Yes, and you had a city with -41 balance or worse.

Re: How does the treasury actually work?

Posted: Sun Nov 17, 2019 11:28 pm
by louis94
Ignatus wrote:Yes, and you had a city with -41 balance or worse.
Or the balance went negative after processing the first N cities. It's not so unlikely in the common case where most of the income is coming from the capital.

Re: How does the treasury actually work?

Posted: Mon Nov 18, 2019 6:23 pm
by Ignatus
May happen in Mixed style: too many upkept units may be not compensated. After full ballance you are never in minus since disbanded/sold things give their upkeep back.

Re: How does the treasury actually work?

Posted: Sat Jan 18, 2020 12:13 am
by chippo
Corbeau wrote:Ok, so if I had around 40 gold in treasury and income per turn was +40, AND I had a building sold "because no money", I was EXTREMELY unlucky?
I had a similar problem today, 'cept in my case I had 63 in treasury and +125. So I carefully started authoring an email and collecting the savegame file, noting version nos, etc. While replaying it and checking my spelling, I was astounded to see that during the replay I didn't lose a building.

The situation was quite unusual. I had several cities with net gold approximately -20, and several with net gold approximately +50 and then a host of cities with net gold in single digits, mostly less than zero. I have a feeling that when I originally saw the building being sold, the program was processing my cities in a different order to when, after the re-load no building was sold off.

I've hit Turn Done when my Gold Situation was 0/+6 and no building was sold off. I've hit Turn Done when my GS was ~100/~+300 and lost a building.

I suspect that a change to the order that the cities are processed in, would resolve this. Just do them in the order of the Gold in the G/L/S display, or even simpler, just do the ones with positive gold before doing cities with negative gold.

Re: How does the treasury actually work?

Posted: Sun Jan 19, 2020 12:05 pm
by nef
I believe option 0 (as quoted by Corbeau from the ruleset documentation) is the way that Civ I (and probably II) does it. I don't like it but that's the way it was.