Embarkation Defence?

Riker13

King
Joined
Nov 9, 2001
Messages
859
Location
UK
Is there a way to add more defence to your embarkation units?

Regards

Riker13 :crazyeye:
 
Looks like it can be changed in GlobalDefines.xml, though I haven't tried it out personally.

EMBARKED_UNIT_COMBAT_STRENGTH (default is 0)
and
EMBARKED_NOT_CIVILIAN_COMBAT_STRENGTH (default is 500, which would mean 5 combat strength)

"Not civilian" is for the "Embarked units can defend themselves" part of Songhai's River Warlord bonus, presumably.
 
"Not civilian" is for the "Embarked units can defend themselves" part of Songhai's River Warlord bonus, presumably.

Actually, I'm pretty sure it's for the Defensive Embarkation promotion, which every military unit now gets. So Workers, Settlers, etc. embark using the normal Embarkation, which keeps them defenseless, while military units use the new Defensive Embarkation promotion instead and can fight back a bit better.

I don't think you can make it so that embarked units do anything other than a simple melee attack; all of the special abilities for a unit get disabled when it embarks, and ranged attacks are a "special ability" in that context. I've been digging into the embarkation logic, though, and it might be possible.

For instance, there's a distinct Lua event when a unit embarks, and I'm trying to figure out its syntax because I'm trying to create a class of unit that can move across both land and sea. What I thought of doing was trap the Embarkation trigger, and instead of embarking, I'd change the unit to DOMAIN_SEA and let it pretend it was a ship until it reached the other coastline, at which point I'd swap it back to a Land unit. The problem is just that, as far as I can tell, there's no easy way to tell what the arguments actually are for these routines. (Finding out the VALUES of the arguments is easy. Figuring out what each means, not so much.)

So you could do something similar; if a unit would normally have a ranged attack, and it's embarked (which'd disable it), you could manually add a new ranged attack with the same power as the old one. (Or some appropriate fraction.)
 
Actually, I'm pretty sure it's for the Defensive Embarkation promotion, which every military unit now gets.
I hadn't heard about that one; I'll have to dig around and look at it. The text of the tag seems to match up exactly with the text of the Songhai trait's relevant tag, though (EmbarkedNotCivilian), so I would assume the two are linked.
 
Back
Top Bottom