WOTC Make Heals Persist

If you liked this item, please rate it up on Steam Workshop page.

Author: krj12

Last revision: 17 Jan, 2020 at 01:25 UTC

File size: 128 KB

On Steam Workshop

Description:

Original non WOTC Version:
https://steamcommunity.com/sharedfiles/filedetails/?id=690713958

This mod changes logic to allow specialist, field medic, medibot, and medikit heals
received on the battlefield to persist after returning to the Avenger.

Summary:

Current logic calculates final damaged received based on the minimum hit points your unit
had at any time during the mission. Even if your soldier was fully healed by your specialist,
he could still show as critically wounded after the battle, and be out of commission a LONG time.

This mod changes the calculation to account for heals from the Medikit, Nanomedkit, Restoration,
and Gremlin. If your unit is partially or fully healed during the mission, it will be reflected
after the mission.

Compatibility:
** Has No Class Overrides ** – should be fine unless another mod is also altering the final hitpoint
calculation by whatever means.

Configuration:

Edit PERCENTAGE value in XcomMakeHealsPersist.ini to indicate the percentage of the
heals that are actually persisted after the scenario. Valid values are 1 to 100.
Default value is 100.

There are two copies of this variable, one for active heals, and the other for regenerative heals.

Edit the HealingDefinitions and RegenerativeHealingDefinitions arrays to determine which heals you
want to apply.

Through use of this array, you can add heals from other mods, under the following conditions:
1) They are simple single or multi target heals OR a regenerative heal.
2) Are not vampiric heals like the PsiOps class has or complex area effect heals like the Healing Grenade.

How to configure another mod’s heal to work with this mod:

You will need to examine the code of the other mod.
Search for a line similar to
`CREATE_X2ABILITY_TEMPLATE(Template, ‘YourHealName’);

YourHealName is the name of the template that you will need to configure.

Also search for lines similar to:

MedikitHeal = new class’X2Effect_ApplyMedikitHeal’;
MedikitHeal.PerUseHP = class’X2Ability_DefaultAbilitySet’.default.MEDIKIT_PERUSEHP;
MedikitHeal.IncreasedHealProject = ‘BattlefieldMedicine’;
MedikitHeal.IncreasedPerUseHP = class’X2Ability_DefaultAbilitySet’.default.NANOMEDIKIT_PERUSEHP;

You will need to use the values specified in PerUseHP and IncreasedPerUseHP.

Having done this, you will need to add a line in my mod similar to:

HealingDefinitions[0]=(TemplateName="FirstAidHeal", PerUseHP=5,IncreasedHealProject="BattlefieldMedicine",IncreasedPerUseHP=7,MultiTarget="N",BonusAbility="Aptitude",BonusAmount=1)

— TemplateName is the name of the healing template. This parameter is required.
— PerUseHP is the number of hitpoits that are healed per use. This parameter is required.
— IncreasedHealProject is the template name of the project, such as Battlefield Medicine, that increases the efficacy of the heal. This parameter
is optional. Leave as empty quotes if this heal cannot be increased through such a project.
— IncreasedPerUseHP is the the number of hitpoits that are healed per use AFTER your Increased Heal Project has completed. Optional.
— MultiTarget specifies if the heal is for single or multiple target use.
— BonusAbility specifies the unit’s special ability that increases the amount healed. ( i.e. "Aptitude" for the Field Medic class )
— BonusAmount specifies the amount that BonusAbility increases the heal

Regenerative heals have a slightly different definition.

RegenerativeHealingDefinitions[0]=(TemplateName="SparkRegeneration", HealAmount=2,MaxHealAmount=6,HealthRegeneratedName="SparkHealthRegenerated")
— TemplateName – the name of the healing template. This parameter is required.
— HealAmount – the number of hitpoints healed per "tick".
— MaxHealAmount – the total number of hitpoints that can be healed. In the above example a HealAmount of 2, and MaxHealAmount of 6 means that
the heal ticks 3 times. This parameter is required.
— HealthRegeneratedName – unique name for the heal. This parameter is required.

As you add items to the arrays, make sure that you sequence the new indexes correctly.

Supported heals:
First Aid – Field Medic Mod
Standard Gremlin Heal
Medibot Heal from Medibot Gremlin Mod
Standard Medikit Heal
Standard Nanomedikit Heal
Pacman Heal from Pacman Mod
Standard Restorative Mist Heal
Standard Spark Repair
Spark Regeneration from "GTS Perks for Spark Units" mod
Standard Stasis Vest
Soul Steal

Update 6/3/16
Added partial support for Field Medic heals, since several people have asked for it.
Heals by the field medic using the "First Aid" ability will count, minus any class bonuses to healing.

Update 6/9/16
Added support for Medibot heals. ( another mod of mine, check it out )

Update 7/1/16
Added support for Spark Mech Unit self repair heals.

Update 7/18/16
Added support for Spark Mech Unit regeneration perk.

Update 3/4/17
Added configurable arrays to allow the user to add support for other mod’s heals.

Update 7/6/17
Added more support for the Field Medic class. Should support all 3 heals for the class, as well as increased healing
from Aptitude.

Update 1/16/2020:
Recompiled using WOTC Dev Kit. This version will only work with WOTC. Added support for Soul Steal heals by PSI Operatives. Users will need to unsubscribe from the old version, as using both mods in parallel may cause issues.