some if you may already have noticed, in the latest patch releases (post 6/19) the rules for stacking units have changed.
the main problem was embarkation. this was a hack from the beginning, in order to avoid the annoying transport ships of previous civilization generations. the code was arcane and overly complex. i was always playing whack-a-mole when some rare pathfinder bug appeared, fixing one always had a risk of creating others. i was hoping to get it right under the existing rules for the longest time, until i finally realized how much easier everything could be.
so in place of the old system, which frankly was more a collection of special cases than a system, we now have simple and consistent rules. i should have taken that step much earlier in the project!
the new stacking rules are:
* you do not talk about fight club!
* civilians stay civilians no matter where they go and can stack everywhere
* combat units stay combat units no matter where they go and cannot stack with other combat units (*)
these rules are AI friendly and human friendly. the code is shorter, is easier to maintain and has better performance.
but there is a little asterisk there! what does it mean?
* a combat unit is a unit which has non-zero base combat strength
* aircraft are therefore not combat units. they get special treatment anyway, but don't get me started on that
* cities and forts allow stacking combat units of different domain (ie max one land unit and one naval unit)
* embarked combat units cannot attack unless they would disembark by doing so (edit: ie amphibious attacks work)
* edit: some units have "deep water embarkation" (zeppelin, helicopter). they treat shallow water like land (that is unfortunately broken in the build below but already fixed)
now there have been some objections:
* it's against the community spirit to make such a change without consensus. true, but it's hard to know what the consensus is when the majority is silent. also i'd rather write code and get people to try it instead of arguing on the forum. that's my advantage as a developer, i don't have to convince somebody else to make the idea reality.
* all my embarked units will die! or the opposite: all the embarked AI units will die! not really. here's another tweak. embarked unit defense is now simply the base combat strength of the unit. can anyone tell me what the previous rule was? no? that's my point.
there is a new patch available here: https://github.com/LoneGazebo/Community-Patch-DLL/issues/6844
so please go ahead an try it, if you haven't done so already. report back on the AI behavior. i cannot promise that everything is perfect but i believe it's better than before.
end of message!
the main problem was embarkation. this was a hack from the beginning, in order to avoid the annoying transport ships of previous civilization generations. the code was arcane and overly complex. i was always playing whack-a-mole when some rare pathfinder bug appeared, fixing one always had a risk of creating others. i was hoping to get it right under the existing rules for the longest time, until i finally realized how much easier everything could be.
so in place of the old system, which frankly was more a collection of special cases than a system, we now have simple and consistent rules. i should have taken that step much earlier in the project!
the new stacking rules are:
* you do not talk about fight club!
* civilians stay civilians no matter where they go and can stack everywhere
* combat units stay combat units no matter where they go and cannot stack with other combat units (*)
these rules are AI friendly and human friendly. the code is shorter, is easier to maintain and has better performance.
but there is a little asterisk there! what does it mean?
* a combat unit is a unit which has non-zero base combat strength
* aircraft are therefore not combat units. they get special treatment anyway, but don't get me started on that
* cities and forts allow stacking combat units of different domain (ie max one land unit and one naval unit)
* embarked combat units cannot attack unless they would disembark by doing so (edit: ie amphibious attacks work)
* edit: some units have "deep water embarkation" (zeppelin, helicopter). they treat shallow water like land (that is unfortunately broken in the build below but already fixed)
now there have been some objections:
* it's against the community spirit to make such a change without consensus. true, but it's hard to know what the consensus is when the majority is silent. also i'd rather write code and get people to try it instead of arguing on the forum. that's my advantage as a developer, i don't have to convince somebody else to make the idea reality.
* all my embarked units will die! or the opposite: all the embarked AI units will die! not really. here's another tweak. embarked unit defense is now simply the base combat strength of the unit. can anyone tell me what the previous rule was? no? that's my point.
there is a new patch available here: https://github.com/LoneGazebo/Community-Patch-DLL/issues/6844
so please go ahead an try it, if you haven't done so already. report back on the AI behavior. i cannot promise that everything is perfect but i believe it's better than before.
end of message!
Last edited: