Find the file called evilfactionunits.ini and look for the MordorSauron object,
This adds auto heal:
Behavior = AutoHealBehavior ModuleTag_EowynHealing
StartsActive = Yes
HealingAmount = HERO_HEAL_AMOUNT
HealingDelay = 1000
StartHealingDelay = HERO_HEAL_DELAY
HealOnlyIfNotInCombat = Yes
End
This makes him revivable (REPLACE the ActiveBody block with this):
Behavior = RespawnUpdate ModuleTag_RespawnUpdate
;DeathFX = FX_EowynDieToRespawn ;FXList to play when killed-to-respawn
DeathAnim = DYING ;Model condition to play when killed-to-respawn
DeathAnimationTime = 6500 ;How long DeathAnim will take.
;InitialSpawnFX = FX_EowynInitialSpawn
RespawnAnim = LEVELED ;Animation to play when respawning.
;RespawnFX = FX_EowynRespawn ;FXList to play when respawning.
RespawnAnimationTime = 2000 ;Time it takes for respawn to play.
AutoRespawnAtObjectFilter = NONE +CASTLE_KEEP ;Respawn at this location -- and at it's exit production point if possible.
ButtonImage = HIEowyn
;RespawnEntries determine the ruleset for how a character can be revived. Some units may automatically respawn, others
;may require a specific revive action performed on him. You can specify different values for each level... or use Level:Any
RespawnRules = AutoSpawn:No Cost:600 Time:90000 Health:100% ;DEFAULT VALUES
RespawnEntry = Level:2 Cost:700 Time:90000 ;For other levels, only override what is different.
RespawnEntry = Level:3 Cost:800 Time:90000
RespawnEntry = Level:4 Cost:900 Time:90000
RespawnEntry = Level:5 Cost:1000 Time:120000
RespawnEntry = Level:6 Cost:1100 Time:120000
RespawnEntry = Level:7 Cost:1200 Time:120000
RespawnEntry = Level:8 Cost:1300 Time:120000
RespawnEntry = Level:9 Cost:1400 Time:120000
RespawnEntry = Level:10 Cost:1500 Time:120000
End
It is good practice to put both of these modules in the ; *** ENGINEERING Parameters *** category of the corresponding object, in this case MordorSauron. DeathFX, InitialSpawnFX and RespawnFX don't exist (yet) for Sauron as far as I know, so I commented them out.
Seems like you just started modding. Welcome to the Community. I suggest you check out some of the tutorials on the3rdage: https://www.the3rdag.../prelist?type=1
They will cover a lot of questions you might have in the beginning. It is also a good idea to look at the code of other heroes/units and copy code from them. Please let me know if the above works.