Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => The Theory of Everything => Topic started by: Domin on December 16, 2013, 03:34:10 PM

Title: Base turn sequence
Post by: Domin on December 16, 2013, 03:34:10 PM
I have some problems getting my head around what exactly happens in what order in a base at the beginning of a turn.

The production seems to happen after growth. I can abandon base by building colony pod repeatedly with cloning vats.

But if base grows and new citizen causes drone riot the production is halted. Similar thing happens when there's hunger.

So what really happens? Is it that the growth is first calculated but not applied until later? Does new citizen count against production if he's not a drone?
Title: Re: Base turn sequence
Post by: Kirov on December 16, 2013, 06:04:31 PM
I did some clicking around and from what I see:

1) Production is earlier. When drone riots appear, they halt production after they happen (i.e. in the next turn, after you already have the red face).

2) Any new item fully completed (either a unit or a fac) will get built even under drone riots, so in theory you can even keep producing stuff under full-scale riot if you disband/rushbuy stuff (you can't rushbuy units, but can do so with facs; and if you disband enough, say, formers to fully complete a police unit, it will get built as well and quell the riots).

3) During hunger (as in 'population dies', not as in 'negative nutrients'), the production is halted on the very same turn, i.e. before the pop falls down. This might explain the confusion.

This should be verified, and I would like to do or see some further tests for special cases, if any.
Title: Re: Base turn sequence
Post by: Kirov on December 16, 2013, 06:27:33 PM
One special case is riots combined with hunger. Now I understand why I thought otherwise. As it turns out, pop halt from population loss prevails over drone riot rules and the Rec Commons you bought do not get completed until the hunger is over. I must say it's a huge pain in the neck when you conquer high pop bases with poor terraforming - in order to prevent riots, you must induce even bigger hunger (i.e. pick up more workers).
Title: Re: Base turn sequence
Post by: Yitzi on December 17, 2013, 02:17:16 AM
Ok, here goes:
-First, it calculates base statistics: First is unit-based stuff (crawler effects, support, pacifism drones), then tile-based stuff (resources and terraforming ecodamage), then it calculates nutrients, then minerals (including mineral-based ecodamage), then energy (which ends with drones and talents calculation.)
-Next, it adds production to whatever it's building, and builds it if appropriate.  In my latest patch, the result of stockpile energy is added here, rather than with the rest of Economy from energy.  If multibuild is on and it has enough production carrying over, it might build more than one thing.  If necessary (and this has not been disabled through alphax), it recalculates base statistics.  (It does not, however, recalculate social engineering effects from projects.)
-Next is something that I'm not sure what it does, but I think is AI-related.
-Next it checks if the base grows and/or starves.  If it starves, that ends the base turn sequence.  Again, it recalculates if necessary.
-Next it disbands units if production is too low for support, and recalculates again. (There are more recalculations, but I'll stop listing them all.  But it happens a lot.)
-Next it does something else, I'm not sure what, having to do with the number of bits in the binary representation of the energy production (after inefficiency, without regard for economy/psych/labs) of the base.
-Then it actually gives it drone riots or a golden age, or ends them, if appropriate, and applies intensified drone riots (destroying facilities) or drone revolts if appropriate.
-Then something else, I'm not sure but I think it's the AI to deal with drone riots and similar matters.
-Then if the base is sending away (via crawlers) more energy than it has, it will make some of them stop crawling (For nutrients this was already done before calculating starvation; likewise for minerals it was done before disbanding.)
-Next it adds to tech progress.
-Next it checks for a fungal pop (and everything associated with it, including global warming.)
-Then it adds cash reserves from the base's income.
-Then something involving other factions, probably commerce.
-Then it applies the energy grid for aliens.  There seems to be a bug there, by the way; I'll have to fix that.  (Why it calculates commerce and energy grid here, when it was already done back in the energy calculations, I'm not sure, but it may be to add to the base owner's score.)
-Then it pays maintenance, or gets a power overload if you can't.
-Then some more stuff that I think might be AI-related.
-Then base assimilation/renaming by AI.
-And then you can zoom to base.

So what Kirov said does correctly answer the OP's questions.
Title: Re: Base turn sequence
Post by: Kirov on December 25, 2013, 01:08:36 PM
Good work, Yitzi!  ;b; Thanks for the info.
Title: Re: Base turn sequence
Post by: Soyweiser on March 27, 2015, 04:55:41 PM
Bit of a thread necromancy. But I added the information from Yitzi's post to the wiki: http://alphacentauri2.info/wiki/Turn_order (http://alphacentauri2.info/wiki/Turn_order) .
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 31 - 840KB. (show)
Queries used: 14.

[Show Queries]