Is there a modifier that would allow units to regenerate health in every turn without fortification?

Narvana

Chieftain
Joined
Nov 20, 2016
Messages
62
So they would move, attack or pick promotions and still get like +5 health every turn?
 
There's this
Code:
		<Row>
			<ModifierType>MODIFIER_PLAYER_UNIT_GRANT_HEAL_AFTER_ACTION</ModifierType>
			<CollectionType>COLLECTION_OWNER</CollectionType>
			<EffectType>EFFECT_GRANT_HEAL_AFTER_ACTION</EffectType>
		</Row>
But it is used by Firaxis as part of the effect of a promotion, so you'd have to figure out how to add it to all of a player's units as part of a trait or something similar.

And I don't know whether it would allow you to pick a promotion and heal on the same turn. And I can't remember whether it needs you to click on "heal" or "sleep" or whatever in the unit's actions box after attacking, moving, etc.
 
The mamluk from arabia has that exact ability
Cant check the name of the modifier right now, but i have used it for a unit as well and it does pretty much what you want (heal at the start of every turn no matter what it did last turn)
 
The mamluk from arabia has that exact ability
Cant check the name of the modifier right now, but i have used it for a unit as well and it does pretty much what you want (heal at the start of every turn no matter what it did last turn)

Ah, unfortunatelly it's used as an effect, so I can't really use it as trait working passively on all my units. :(
 
You want a civ trait that gives the mamluk regeneration to all units?
Should be possible using MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER (this is from memory, check if there is no typo)
With arguments:
ModifierId = the modifier from the mamluk ability
 
You can probably just create a dynamic modifier with the effect of EFFECT_GRANT_HEAL_AFTER_ACTION and collection of COLLECTION_PLAYER_UNITS or whatever that collection is. I imagine that would work 100% fine, assuming it's a civ or leader ability. And as far as I think it works, your unit(s) heals every turn, as if they didn't move or take an action on their turn, no matter what they actually do on their turn, or if they're set to fortify until healed, or whatever. Haven't tested, but that's how it worked in Civ 5 I'm pretty sure.
 
Norways leader has ability that give coastal raid promotion to all melee ships

Now you just gotta find the code, switch the raid promotion to the mamluk promotion, and switch the melee ships class to all military units class (if possible, alternatively copy-paste the melee ship code and replace the melee ship class with other unit classes in each copy)
 
In response to criZp's posts, not quite. Now that I've learned more about it, here's a more in-depth explanation.

Units do not have Modifiers attached to them directly. They are either given Abilities or Promotions. The Mamluk, for example, is given its healing after everything as an Ability, but the Ground Crews Promotion for Air Fighters is, well, a Promotion. The difference is that Promotions are what you get when you gain a level, no more, no less. Abilities are given for just about any situation where you need to attach a modifier to a unit. So, the way to properly do it, I think, is to make a civilization trait with the ModifierType of something like PLAYER_UNITS_GRANT_ABILITY, set that ability to have the Modifier of a Type 'MODIFIER_PLAYER_UNIT_GRANT_HEAL_AFTER_ACTION', and then set that ability (in the TypeTags table) to be part of the classes which you want to give it to, so CLASS_MELEE, CLASS_RECON, etc. It won't effect anything of a class other than what you define in that table.
 
Back
Top Bottom