(September 18th, 2016, 16:46)Elestan Wrote: 547 says:
; When generating terrain, no continent can be larger than 200 tiles of land
; Necessary for AI purposes : the AI is continent based and is unable to
; function effectively if everything is one huge continent.
; In particular, they can at most recognize 80 of their owns stacks on a continent, and 25 potential targets
548 says:
; AI can recognize up to 345 of their own stacks through the global stack system instead of 80.
549 says:
; When the AI sorts their units into stacks
; if there are more stacks than the limit of 80 that can be stored in the array
; it aborts sorting the units - not inserting the remaining units that belong to the 80 possible stacks to the data!
I'm wondering about the interaction between 548 and the other two. Does 549 detect whether 548 has been applied, and use the correct limit (80 or 345)?
Nothing detects anything. Patches are just a list of different bytes, nothing more. Patches are numbered in the order they were created so if any patch changes the same byte as another one, it works only if the lower number is applied first. Otherwise you get a warning that the byte is not the expected value.
(September 18th, 2016, 16:46)Elestan Wrote: Also, does 548 at least partially negate the need for 547?
It does not. Global stacks is everything together on both planes, which is extended to 345 and used ONLY by the settler and ship boarding subsystems left over from previous versions of the game. How irrelevant they are can be best understood if I say I completely removed the "enemy global stacks" array because the only thing it was used to was calculating where to disband units at a twice higher chance than elsewhere. (and this is where the data space for 345 own stacks comes from btw)
This 80 limit was responsible for AI ships staying in cities instead of leaving, and some settlers not moving and that's it. (Magic Spirits might also be in this system, not sure. Engineers aren't.)
Local stacks is per continent and is still limited at 80, and is the main system used by every other type of unit movement. If, by partially, you mean the AI can use those 80 stacks and only fail to use the remaining then yes but that's not acceptable. The excess stacks are the most likely to be the ones with the AI's best (newest) units. With 200 tiles the likelihood of having 80 different stacks on the continent is minimal, if the continent is 600 tiles, it will happen very often.
(also having only one continent is boring and makes all water related spells worthless)