About this mod
NPCs and creatures now have means to heal themselves and their partners.
This is done dynamically for any vanilla or added actor, if they meet specific criteria.
Works with combat teams and with followers.
Fair Care increases most fights difficulty, but can also help the player, as some of his followers will now be able to heal him.
- Requirements
- Permissions and credits
- Changelogs
OpenMW 0.49 or newer is required!
NPCs and creatures now have means to heal themselves and their partners.
This is done dynamically for any vanilla or added actor, if they meet specific criteria.
Works with combat teams and with followers.
Fair Care increases most fights difficulty, but can also help the player, as some of his followers will now be able to heal him.
Many settings are provided to adjust the mod to your taste.
Default settings values have been meticulously defined to balance the healing system.
Features
- Spellcasters (NPCs and creatures) can heal their partners (customizable)
- Spellcasters (NPCs and creatures) who could not heal themselves get self-healing spells (customizable)
- Followers and their leader can heal each other (if they can cast spells, supports followers of followers, and so on)
- Non-spellcaster NPCs get healing potions (customizable)
- Robust, simple, but efficient IA to handle healers (movement, casting, evasive maneuvers, potion drinking) (customizable)
- Creatures slowly regenerate their health (customizable)
- Many settings to fit the mod to your needs (midgame setting changes are taken into account)
- Can be installed midgame
Why
In vanilla Morrowind, most enemies cannot heal themselves or their friends, it's not fair.
Some mods manually add spells, potions or other items to a limited number of actors so they can heal themselves.
But this applies to very few of them, and it does not dynamically support added content.
With Fair Care, some NPCs and creatures will gain self and touch-healing spells, based on their magic skills and level.
Actors with insufficient magic skills will either get a few healing potions (for NPCs) or health regeneration (for creatures).
During battles, actors fighting against the same enemy will be able to heal each other.
Also, outside of battles, actors bound by a follow link will also heal their followers or leader, if needed.
How it works
Adding spells to actors
The addon file adds 5 self-healing and 5 touch-healing spells to the list of all available spells:
There are a lower, low, medium, high and higher versions for each spell category.
Each time a new actor is encountered, this mod determines if he is eligible to get a healing spell.
If the spell cost is greater than the actor's base magicka, the spell won't be considered.
Actors that already have a self-healing spell won't get a Fair Care spell.
NPCs and creatures will get the best spell version they can cast with at least 85% success chance (excluding fatigue), or none if their magic skills are not sufficient.
The 85% threshold is customizable in the configuration file, cf. customization section below.
Only creatures that can cast spells are considered for gaining a healing spell.
This is to prevent adding healing spells to most creatures, as most of them are highly proficient in magic skills (even skeletons!).
Creatures get a spell version based on
- their chance to cast the spell (good in most cases)
- their level: 1-4=lower, 5-9=low, 10-14=medium, 15-19=high, 20+=higher
Healing wounded partners
When an actor is injured, and has no means to heal himself, he will ask around for help.
His combat or follow partners may accept his request if:
- They have a Fair Care touch-healing spell
- They have enough magicka to cast the spell
- They are not currently healing another partner
- They are not paralyzed, silenced, knocked out, knocked down, over-encumbered (and too far), dead
- Some time as passed since last time they healed themselves or someone else (cf. "Waiting before healing again" section)
Then, accepting help is based on several probabilistic criteria:
- Chances to successfully cast the spell (including fatigue)
- Wounded partner's injury severity
- Healer's spell intensity
- Current healer's HP
- Healing spell cost compared to current healer's magicka
- Disposition towards the wounded partner (Morrowind only provides NPC-Player disposition. For other pairs, Fair Care computes a plausible disposition)
- Time required to travel to the wounded partner, preferring short distances (customizable in settings)
Each criterion impact is customizable in the settings page.
If the acceptance chances are successful, Fair Care takes control of the healer to bring him to the wounded partner and cast the spell.
Otherwise, the partner will try his luck with other healers, if any.
If no healers answer him positively, the wounded partner will, after a short delay, start over his requests.
If the healer get stuck behind other actors while trying to reach his partner, he'll stop his help mission, and he'll go back to fighting.
If, during the travel to the partner, the situation changes, decreasing the help chances, the healer will evaluate again whether he'll carry on his action.
For example, when his partner ran too far away.
As Morrowind doesn't allow casting a spell on someone who is not a combat target,
Fair Care manually applies the spell on the wounded partner, after validating spell success chances and touch distance.
Touch-healing can be globally disabled in the mod settings page.
Self-healing
Fair Care doesn't add permanently self-healing spells to actors because the engine has a tendency to spam cast healing spells, and fights can get really difficult.
Instead, Fair Care temporarily adds self-healing spells when they are needed.
Self-healing is handled the same way as the touch-healing approach, but:
- Here the wounded partner is also the healer
- The healer tries evasive maneuvers to avoid blows
Conditions for self-healing are similar to touch-healing ones, but simpler.
Wounded actors will try to heal himself only if:
- They have a Fair Care touch-healing spell
- They have enough magicka to cast the spell
- They are not paralyzed, silenced, knocked out, knocked down, dead
- Some time as passed since last time they healed themselves or someone else (cf. "Waiting before healing again" section)
Then, conditions to add the spell are based on several probabilistic criteria:
- Chances to successfully cast the spell (including fatigue)
- Injury severity
Each criterion impact is customizable in the settings page.
Self-healing can be globally disabled in the mod settings page.
Waiting before healing again
To prevent self or touch-healing spam, Fair Care makes actors wait some time before they can heal again.
When considering a heal action, Fair Care takes the "Best time before healing again" setting value and reduces it by the exponential (square root) of the non-healing chances.
For example, for a heal request from a badly injured good friend, with high healing chances at 80% and the delay at 10s,
then the final delay will only be: 10 * (1 - 0.8) ^ 1/2 = 4.5 seconds before considering healing again.
The goal is to prevent healing spam and favor situations where healing is more needed, like:
- Terrible injury (low health)
- Good friend injured (high disposition)
The waiting delay is configurable in the mod settings page.
Health regeneration
Fair Care adds health regeneration to creatures that cannot heal themselves.
It's a slow regeneration proportional to the Endurance and Strength attributes.
By default, those creatures will regenerate 1 HP per second if the average of their Endurance and Strength is 100.
Examples:
- Endurance = 50 and Strength = 50: 0.5 HP per second
- Endurance = 100 and Strength = 50: 0.75 HP per second
- Endurance = 200 and Strength = 200: 2 HP per second
The settings allow you to:
- Configure the regeneration speed
- Enable regeneration also for NPCs or the player
Adding potions to NPCs
If an actor:
- Is an NPC (not a creature or the player)
- Is not eligible for casting healing spells
- Hasn't already equipment items to heal himself
then he'll get a few healing potions.
The amount and quality of provided potions is computed to allow the NPC to restore a given percent of his HP.
Fair Care computes the HP restored by each of the 5 standard healing potions, and then adds potions up to the desired total restored HP, preferring high quality potions first.
The expected NPC restored HP is customizable in the settings by defining a min and a max percent values.
Then the final percent value is randomly picked in between these values for each NPC.
Percent values can be set above 100 to get more potions.
Fair Care lets the engine use potions, but can force the consumption if the actor's health is low.
NPCs' potion stock will be refreshed after 4 hours (customizable in the settings page), if they had a fight.
Adding potions can be globally disabled in the mod settings page.
Allowing self-healing with items
With mods that takes control of actors' AI, the default AI cannot use the equipment items to heal the actor anymore (including potions added by Fair Care).
This is the case with Mercy CAO and short-ranged fighters, or Take Cover and hiding strategies.
If Fair Care detects any of these mods, and an actor is injured enough, and he has equipment items with restore health effects,
then, for a fraction of a second, other mods are temporarily disabled and the default AI is enabled.
This allows the default AI to heal the actor without disturbing the actor's behavior.
Customization
The settings page of Fair Care allows you to adjust the mod behavior to your needs:
- Disable self-healing spells
- Disable touch-healing spells
- Disable health regeneration
- Disable adding potions
- Disable creature self and touch-healing abilities, per creature type
- Alter self and touch-healing conditions
- Alter health regeneration conditions
- Alter offered potions conditions
Also, for more technical configuration, you can adjust several variables in "00 Core/scripts/FairCare/configuration.lua".
Complementary mods
Compatibility
Requires OpenMW 0.49.
Compatible with the following mods:
- Mercy CAO versions 1.2.1 and above
- Take Cover versions 1.4 and above
- HBFS, versions 1.4 and above
- Pursuit (OpenMW)
- Protective Guards (OpenMW)
- No More Indifferent Actors To Combats (OpenMW)
- Wildlife Attacks NPCs Too OpenMW
Load order
Order doesn't matter for the mods mentioned in the previous section.
For other mods that take control of actors (by disabling AI), they should be placed before Fair Care in order to allow this mod to override actors' controls during healing.
Installation
- Decompress the mod archive in a folder named "FairCare"
- In openmw.cfg
- Add the full path to the "FairCare/00 Core" directory as a data path
- Add FairCare.omwscripts and FairCare.omwaddon as content files
For example:
data="C:\games\OpenMWMods\Gameplay\FairCare\00 Core"
content=FairCare.omwscripts
content=FairCare.omwaddon
More info on how to install OpenMW mods here.
Update the mod
- Replace the mod files with the new ones
- Launch openmw, load your game
- Go to Fair Care settings page and click on the "Reset" buttons of each section
Uninstallation
- Finish all current fights or move to a place where nobody attacks anybody
- Remove the openmw.cfg entries
- Optional: Remove FairCare directory
Making Fair Care compatible with your mod
Mod devs can use Fair Care interface to know when this mod takes control of an actor to heal himself or a partner.
During that healing, other mods should not try to control this actor (not altering self.controls).
On any actor:
I.FairCare.isHealing()
Also, 2 functions can be used to know if an actor has spells to self-heal or touch-heal:
I.FairCare.getSelfHealSpellId()
I.FairCare.getTouchHealSpellId()
These 2 functions don't take into account the actual possibility to use these spells (magicka, fatigue...).
If the actor already had a self-healing spell, getSelfHealSpellId() will return its id, preferring the lowest healing spell found.
Another function can be used to get an actor's available equipment items, with enough charges, to heal himself:
I.FairCare.getHealingEquipment()
Thanks to
- Bethesda for creating Morrowind
- OpenMW team for their great game engine and for adding so useful Lua bindings
- Nexus for hosting most Morrowind mods
- Modding-OpenMW for their huge contribution to Morrowind
- lelimule for suggesting a new approach excluding combat target changes and for his many feedbacks that really helped to improve this mod
- MaxYari for helping me on Mercy compatibility
Localization
EN: @mym
Repository
This is an open source project, check the repository.
Feel free to report issues or suggestions.
Author
@mym