Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Bug/Patch Discussion => Topic started by: Geo on April 27, 2014, 10:32:53 PM

Title: Formers disappearing on specific tiles.
Post by: Geo on April 27, 2014, 10:32:53 PM
In my current SMAC (Kyrub AI, latest patch) game, I have (sofar) discovered two tiles where I first noticed didn't become terraformed after letting a former work on it, and later that even the formers performing the improvement simply disappear. Both tiles seem to be 'runoff' river tiles where the river can't go further anymore.
One tile I terraformed up and that worked. The other I haven't tried that yet.

I'll attach the save if someone wants to see it for yourself. If I on tiles 17/33 and 16/34 try to put a forest or condenser, the formers working there disappear when the task is finished.

Does anyone here ever had such an experience?
Title: Re: Formers disappearing on specific tiles.
Post by: Yitzi on April 28, 2014, 12:16:34 AM
Well, I've done some analysis, and here's what's happening:
You had global warming, and due to the low elevation of that square, the warming was enough to put it underwater.  For some reason, though (i.e. some bug), it is not underwater...but when it recalculates the statistics for the condenser, it realizes that it's supposed to be underwater and drowns all the land units in the square.
Title: Re: Formers disappearing on specific tiles.
Post by: Yitzi on April 28, 2014, 02:14:34 AM
Ok, I've figured out what's happening:
-As we all know, two adjacent tiles cannot be more than 1 height difference away from each other.
-Thus, if you terraform up an uphill tile, it also raises the adjacent tiles, adjusting both their height and height category appropriately.  Likewise for terraform down on a downhill tile.
-But what if the height of the tile changes due not to terraforming, but rather global warming?  While the difference between the heights should remain about the same, it's possible that the difference will change from 1 category to 2.
-In such case, the height category is adjusted (I'm not sure which one affects the other, but I doubt it's anything sensible), but the height apparently is not.  In particular, if one square would be underwater, and the other over 1000 feet, it can end up creating a land square with negative height.  (It will still show the absolute value for its height, the same as it would show for depth if it properly became a water square.)
-Land units can move into that square; it's a land square after all.  But if you do anything that requires recalculation (e.g. building a condenser), it looks, realizes that the square is supposed to be underwater, and drowns all the units and improvements there.  Then when it calculates a nearby square it looks, realizes that the gap from the next square is too large, and raises it again.

Fixing this bug could be tricky; not only am I not really sure what should happen when global warming (or a solar shade) results in two neighboring squares of non-neighboring height categories, but implementing it would be a substantial project, not just changing a few instructions like most bugfixes are once they've been found.
Title: Re: Formers disappearing on specific tiles.
Post by: Geo on April 28, 2014, 07:19:04 AM
Thanks for checking. :)
For the record, the issue came from the 'melt polar caps' proposal in the Planetary Council then.
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: 15.

[Show Queries]