• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

changes in the latest patches

ilteroi

Prince
Joined
Mar 11, 2006
Messages
486
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!
 
Last edited:
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.

Glad to finally see you back on the forums! For those who may not know, ilteroi has long been the man behind the curtain. Much of the great AI improvements we have are due to his tireless efforts.

To your point above, I will say, the forum has long been our main point of change discussion, so yes changes that are made without formal discussion on the forum will never have a chance for consensus. So I strongly believe any change should be aired out and discussed here first before its found into a new formal version of the mod.

That said, I am all for experimental versions to try out code changes like the one you have mentioned... I know Pineappledan does that from time to time when he wants to push a balance change. It worked for me on the recent spear/pike change. So though I am a bit skeptical of the change myself, I am happy to give it a go.
 
Now just to clarify for people (and honestly to ensure I understand it myself), I wanted to give some example of the new stacking and get a few questions answered.

Civilian Units: (Missionaries, Diplomatic Units, Great People, Settlers (Pioneers and Colonists), and Workers
1) Stack with other civilian units
2) Stack with embarked units
3) Stack with water units
4) Cannot attack water units
5) Cannot attack land
6) Immediately killed if attacked by melee navy
7) 40 damage if hit by ranged attacks (Question: Is it always 40 dmg or is there a formula here?)

Embarked Units (any land unit that is not a civilian that goes in the water)
1) Stack with civilian units
2) Does not stack with embarked units
3) Does not stack with water units (key change)
4) Cannot attack water units
5) Cannot attack land (Question: does this mean amphibious attack at 50% penalty is gone now?.... does that mean the amphibious promotion is no longer valid?)
6) Uses CS if attacked by melee
7) Uses CS (not RCS) if attacked by range

Water Units (melee navy, ranged navy)
1) Stack with civilian units
2) Does not stack with embarked units (key change)
3) Does not stack with water units
4) Can attack water units
5) Ranged can attack land, melee can attack coastal city and citadel on coast.
6) Uses CS if attacked by melee
7) Uses CS (RCS if it has it) if attacked by range

Hovering Units (Zeppelins, Helicopters)... in shallow water (aka hovering) (Question: Definitely check me on the stacking below, all of the stacking here is a question mark for me)
1) Stack with other civilian units
2) Does not stack with embarked units?
3) Does not stack with water units?
4) Can attack water units
5) Can attack land
6) Uses CS if attacked by melee
7) Uses CS (RCS if it has it) if attacked by range


Hovering Units (Zeppelins, Helicopters)... in deep water (aka embarked)
1) Stack with other civilian units
2) Does not stack with embarked units
3) Does not stack with water units
4) Cannot attack water units
5) Cannot attack land
6) Uses CS if attacked by melee
7) Uses CS (not RCS) if attacked by range
 
* embarked combat units cannot attack unless they would disembark by doing so
So they can attack if they would kill a unit or capture a city? It's a bit random if a unit has just enough strength to do that, but RNG decided that it failed.
 
Embarked units can attack land tiles but can't attack water tiles. Pretty sure that's what he means.
 
Ok, so you can just damage enemy units on coast with melee embarked units? That's powerful with the combination of keeping CS while defending. It's like there is no disadvantage to melee units when they are embarked. It might be broken
 
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 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

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!
I going to give this a shoot tonight
and Welcome back to the forums :thumbsup:
 
Ok, so you can just damage enemy units on coast with melee embarked units? That's powerful with the combination of keeping CS while defending. It's like there is no disadvantage to melee units when they are embarked. It might be broken

1) Embarked CS does not include combat bonus % from promotions (except those that affect embarked CS specifically).

2) They attack on land with a -50% penalty unless they have the Amphibious promotion.
 
I must admit my confusion. This is how I'm used to unit stacking's being since...forever. Since all Civ? I thought it always worked this way, and haven't noticed any difference from version to version. What am I missing here?
 
I must admit my confusion. This is how I'm used to unit stacking's being since...forever. Since all Civ? I thought it always worked this way, and haven't noticed any difference from version to version. What am I missing here?
Previously military land units that were embarked could stack with naval units, thus "hiding" them or protecting them from harm; now they do not stack, and are thus more vulnerable, although ilteroi has designed the new mechanics as to not let your embarked units necessarily become chum instantly if attacked.
 
Helicopters can't attack ships ? If it's true, it has to be changed definitely.
 
What I understand from @ilteroi's post:

A unit is a Combat Unit if and only if it has greater than 0 CS.

The followings assume the units are on water tiles.

Embarked/Naval Civilian Units:
1) Stack with embarked/naval civilian units
2) Stack with embarked combat units
3) Stack with naval combat units
4) Cannot attack embarked/naval units
5) Cannot attack land units/cities
6) Immediately killed if attacked by melee naval units
7) 40 damage if hit by ranged attacks (if it hasn't been changed)

Embarked Combat Units:
1) Stack with embarked/naval civilian units
2) Do not stack with embarked combat units
3) Do not stack with naval combat units
4) Cannot attack embarked/naval units
5) Can attack land units/cities with a -50% penalty, unless having the Amphibious promotion
6) Use CS if attacked by melee naval units
7) Use CS?/RCS? if attacked by ranged units

Naval Units:
1) Stack with embarked/naval civilian units
2) Do not stack with embarked combat units
3) Do not stack with naval combat units
4) Can attack embarked/naval units
5) Melee can only attack units on tiles that the melee ship can move onto, Ranged can attack units on any tile with unobstructed view unless having the Indirect Fire promotion (all land tiles count as obstruction)
6) Use CS if attacked by melee units
7) Use RCS (CS if unavailable) if attacked by ranged units

Hovering Units on Coast Tiles:
1) Stack with embarked/naval civilian units
2) Do not stack with embarked combat units
3) Do not stack with naval combat units
4) Can attack embarked/naval units
5) Can attack land units/cities
6) Use CS if attacked by melee units
7) Use RCS if attacked by ranged units

Embarked Hovering Units:
1) Stack with embarked/naval civilian units
2) Do not stack with embarked combat units
3) Do not stack with naval combat units
4) Cannot attack embarked/naval units
5) Cannot attack land units/cities
6) Use CS if attacked by melee naval units
7) Use CS?/RCS? if attacked by ranged units


I guess using ships to block embarked scouts/settler escorts is a valid strat now.
 
This change certainly lessens the value of naval forces.

It also makes amphibious promotion crazy good.

IMHO it's a step backwards, but maybe it will grow on me.
 
Back
Top Bottom