Battle fatigue and injuries

Version: 0.802
Date: 10 March 2014
Author: kuertee
Source: http://skyrim.nexusmods.com/mods/13241
Requirements:

Recommendations: Compatibilities:

Thanks to Brodual for reviewing my mod in his video:

Thanks to Ka3m0n for adding my mod to Skyrim GEMS:

Thanks to Robiehn for featuring my mod in his video:

Short description

Health loss can result in battle fatigue and injuries that require sleep to heal.

Updates since last release (0.711)

Updating

  1. Simply deactivate and uninstall the previous version then install and activate this version. Note that you do not need to stop the mod in-game. If you do, you will lose your accumulated mod-specific data. Let the new version back-up the data of its old version, clean-up the old data (i.e. zero-out) by stopping itself, restart itself and restore the data of the old version.
  2. If you have Sky UI's MCM, you can check the settings in Sky UI's MCM wihtin the game.
  3. Or check the settings in "Data\Ini\kuerteeBattleFatigueAndInjuries.ini". If you change any of it, execute your changes by typing {bat "ini\kuerteeBattleFatigueAndInjuries.ini"} (without the brackets) in the console.
  4. After the update is finished, the message "kuBFAI v0.802" will appear.

Gameplay changes

Injuries

If you lose 25% of your Health in a short amount of time, you will receive an injury either to an arm, your torso, a leg or your head. Arm injuries affect weapon skills (e.g. One-handed skill). Body injuries affect your efficiency to move in armour (e.g. Heavy armour skill) and your ability to sneak. Leg injuries affect your speed and jump capabilities. Head injuries affect your magic and communication skills. Each injury increment (i.e. point) is a -5 penalty to all the skills that injury affects.

Multiple injuries (of the same type) can result from high damage in the one detection. The number of injuries is (total health loss within userSecondsToPoolDamage) / (base health * userDamagePercToReceiveInjury). Basically, this is the (damage sustained) / (damage required for an injury).

These are small, annoying injuries that are not debilitating. However, if they are not healed and are left to accumulate they become serious injuries.

There is a very subtle screen blur when you receive an injury.

Battle fatigue

When your Health drops below 25 points in a fight, you will receive battle fatigue. Battle fatigue is the mental anguish of being close to death and affects Health, Magicka and Stamina. Each battle fatigue increment is a -5 penalty to Health, Stamina and Magicka.

Healing injuries and battle fatigue

Sleep and rest heals injuries and battle fatigue. Every hour slept will heal 0.5 injury and battle fatigue point. A full 8 hour sleep will heal 4 points of arm, body, leg and head injurys and 4 points of battle fatigue. However, serious injuries (i.e. > 7 points) are permanent and cannot heal with rest alone. You'll need to visit any NPC who is a member of the JobTrainerRestorationFaction, Danica Purespring at the Temple of Kynareth in Whiterun, Colette Marence at The College of Winterhold or Keeper Carcette at the Hall of the Vigilant to get the Devines to heal them.

Increasing magnitudes

You can set the magnitude of injuries (userArmInjuryMagnitudeIncreaseFactor, userBodyInjuryMagnitudeIncreaseFactor, userHeadInjuryMagnitudeIncreaseFactor, userLegInjuryMagnitudeIncreaseFactor, userBattleFatigueMagnitudeIncreaseFactor) and Battle Fatigue to increse at each injury value.

E.g. when set to 0, the magnitude for each arm injury value does not change from userArmInjuryMagnitude. E.g. if userArmInjuryMagnitude is 5, at injury 1, the magnitude is 5. At 2, 10. At 3, 15. At 4, 20. At 5, 25. Etc.

When set to a number, the magnitude for each injury sustained increases by that number as a factor.
Increase factorMagnitude at 1st injuryAt 2ndAt 3rdAt 4thAt 5th
0 - normal magnitudes510152025
0.52.57.5152537.5
1515305075
1.57.522.54575112.5
So with these factors (and especially at the default of 0.5), the first injuries received will be mild. But others will have increasing effects.

When this is set, it is not advisiable to set the base magnitudes (e.g. userArmInjuryMagnitude, etc.) to be more than 5.

Treating injuries

Bandages can be bought from vendors selling ingredients and reagents. Click on them in your inventory to use them. Each treatment halves the effects of an injury. This relief lasts for 12 hours or until another injury is sustained. And you can never relieve more than half of the injury.

You can prepare your own bandages by soaking a roll of paper into healing potions. However, these self-prepared bandages relieve only 25% of the injury. You can apply a second bandage to get the full of effect of a normal bandage - i.e. 50% of the injury.

Treating an injury takes 15 minutes.

Active effects screen

Battle fatigue and injuries are listed in your Active effects screen.

Eat and sleep mod synergy

Exhaustion, hunger and thirst from Eat and Sleep http://skyrim.nexusmods.com/downloads/file.php?id=13246, are affected when receiving Battle fatigue or injuries.

HUD

By default this HUD is always shown. Set when it is shown, its location, and the key that displays it in the INI or MCM. The HUD is a "paper doll" (based on daVinci's "man") that shows the player's battle fatigue and injuries. As a body part incurs injury, it's colour turns red.

NPCs

Up to 30 NPCs (near you) receive injuries and Battle Fatigue exactly as you would. By default this is active. Turn this off by setting userApplyToNPCs to False.

NPC injury treatments:
They will also use bandages that they have in their inventory on injuries that are greater than the value of userInjuryValueNPCsUseBandages (default = 5). Though they also use the bandages from the Injure Kit mod, these bandages are not, unfortunately, equipped. This is because these items replace the NPC's currently equipped armor. And if they are equipped, the NPC will simply re-equip their armor which unequipps the bandages in the process. These bandages are then used like normal "full bandages". They are removed from the NPCs inventory when used. Note that this does not apply to you and these bandages still appear on your player. So you still need to keep them on if you want their effects.

NPC's duration of injuries:
NPCs who move 5000 units away from you, will have all their injuries and treatments removed. Those within 5000 units will retain their injuries - which heal at the same rate as your injuries. When you wake from sleep, NPCs within 5000 units (e.g. followers) will have their injuries heal at the same rate as yours do. Those outside 5000 units will have their injuries removed as normal.

NPCs and healers
You can tell your follower to visit a healer. In the default game, these are Danica Pure Spring, Colette Marence, and Vigilant Carcette. Your follower will leave you to visit the closest healer. Then they will spend the day there (as you would when you seek healing). They will then look for you after they are healed. Note that they will not come to you directly. Instead, they will first visit where they left you AND then head directly to you. Letting your follower visit the healer may take several days to a week, before they rejoin you.

Note that the follower's "follower" status is not removed. So if you do not have a multiple follower mod (e.g. like my Simple Multiple Followers http://skyrim.nexusmods.com/mods/31581/), you will not be able to recruit other followers at this time.

API for 3rd-party mods

By using the SKSE command, SendModEvent, 3rd-party Scripts can communicate with Battle Fatigue and Injuries.

SendModEvent nametypeamountBFAI result
injuryEventarmHitnot usedThe arm was hit. The next injury (when enough health is lost) will be an arm injury.
injuryEventbodyHitnot usedThe next injury will be a body injury.
injuryEventlegHitnot usedThe next injury will be a leg injury.
injuryEventheadHitnot usedThe next injury will be a head injury.
injuryEventarmInjurynot usedImmediately add an arm injury.
injuryEventbodyInjurynot usedImmediately add a body injury.
injuryEventlegInjurynot usedImmediately add a leg injury.
injuryEventheadInjurynot usedImmediately add a head injury.
configEventdisableBFnot usedSet userBattleFatigueMagnitude to 0 - disabling BF generation.
configEventenableBF5, 10 or 20Sets userBattleFatigueMagnitude to the amount given - enabling BF generation.
configEventdisableInjuriesnot usedSet all injury magnitudes to 0 - disabling injury generation.
configEventenableInjuries5, 10 or 20Sets all injury magnitudes to the amount given - enabling injury generation.

Examples:

Notes:

Custom bandages

Add an item to or remove an item from the custom bandages list by pressing the equal sign (=) when the item is highlighted in the Inventory Screen. When used to treat an injury, this item will be removed from the player's inventory.

Custom healers

Add an NPC to or remove an NPC from the custom healers list by pressing the equal sign (=) when the NPC is targetted. Run-time created NPCs (i.e. those with the FF index in their Id or those respawned from a Leveled List) can't be made into healers. Note that NPC followers can't use these custom healers unless they are in your vicinity. If no custom healer is found in your vicinity, NPC followers will visit one of the 3 "normal" healers.

Details

Injuries can be incurred at any time. Falling from great heights or from traps. Battle fatigue, however, is only incurred during combat.

If 25% Health is lost within 6 seconds, an injury is incurred. When Health is increased as you level-up, the amount of damage required for an injury to occur also increases - making it harder for you to receive an injury. Also, as you increase in level the time to poll for damage decreases. At level 50, this time is decreased to 3 seconds. So, as you gain experience in combat (the way you defend, move and strike), the chances of getting injured goes down. This decrease in time stops at level 75. The smallest amount of time the mod pools together damage received is 1.5 seconds.

Arm injuries affect: Block, Marksman, One-handed, Pick-pocketing, Two-handed skills, and WeaponSpeedMult Actor Value. Body injuries affect: Heavy armour, Light armour, Sneak skills and Mass Actor Value (which according to the Wiki affects the actor's staggger). Leg injuries affect: jump height and moving speed Head injuries affect: Alchemy, Alteration, Conjuration, Destruction, Illlusion, Restoration skills and Speechcraft. Battle fatigue affects: Health, Magicka and Stamina

You can configure this mod with SkyUI's MCM or in the Console by typing "SetPQV kuBFAIQ {mod data} {value}".Below are the various mod data that you can change, their default values and a short description of their effects.

userChanceInjuries0Arm = 25
userChanceInjuries1Body = 65
userChanceInjuries2Leg = 90
userChanceInjuries3Head = 100
Chance of receiving an injury. If you want to prevent an injury in one of those parts, set the value to 0. Valid values are 0 to 100. These four values must fit in the 0 to 100 range. E.g. The actual chance of getting a body injury compared to others is 40% (65 - 25).

userDamagePercToReceiveInjury = 0.25
Decrease userDamagePercToReceiveInjury so that less damage is required for an injury. The larger the value, the harder it will be for an injury to occur. Valid values for userDamagePercToReceiveInjury are 0.1 to 1.

userSecondsToPoolDamage = 6
Decrease userSecondsToPoolDamage so that a greater Health-loss in a shorter amount of time is required for an injury to occur. The larger the value, the easier it will be for an injury to occur - because there'll be a longer time for the mod to pool damage together. As you progress in levels, this time is decreased. At level 50, it is halved. And at level 75, it is a quarter it's value - which is when it stops decreasing. Valid values for userSecondsToPoolDamage are any number above 1.

userHealthToReceiveBattleFatigue = 25
Health points required for battle fatigue to be incurred.

userMultipleBattleFatiguePerCombat = False
Set userMultipleBattleFatiguePerCombat to True so that Battle Fatigue can be applied more than once per combat. By default it is False. Note, however, that even when False, Battle Fatigue can still be incurred every time you receive injuries equal to userInjuriesToBattleFatigue (which is 5 by default) or more.

userInjuriesToHealPerHourSlept = 0.5
For every hour slept, this amount of injury and battle fatigue are healed. Note that this is not the penalty to your attributes and Skills. Rather, these are the number of injuries and battle fatigue you incur. 1 injury is -2 to all affected skills. And 1 battle fatigue is -5 to your Health, Magicka and Stamina.

userInjuriesToBattleFatigue = 5
This is the number of injuries that will convert to Battle Fatigue. Set this to 0 to prevent this conversion.

userTreatmentTime = 0.25
The number of hours treating an injury takes.

userBandagesGoldValue = 100
The gold value of bandages.

userBattleFatigueMagnitude = 5
userArmInjuryMagnitude = 5
userBodyInjuryMagnitude = 5
userHeadInjuryMagnitude = 5
userLegInjuryMagnitude = 5
These values are the magnitude of each injury. Set them to either 5, 10 or 20.

userAllowMultipleInjuriesPerDetection = True
Allow multiple injuries at each detection. When True, multiple injuries (of the same type) will be applied dependent on the amount of damage received. E.g. if damage required for an injury is 25 Health and damage received is 75, then 3 injuries will be applied.

userV0p635Effects = True
Set userV0p635Effects to False so that injuries do not affect the Actor Values, WeaponSpeedMult and Mass.

userV0p635EffectsWhenSerious = True
However, you can choose to affect them only when the injuries are serious by setting userV0p635EffectsWhenSerious to True.

userApplyToNPCs = True
Detect and apply injuries and Battle Fatigue to NPCs.

userDivineHealingCost = 1000
The cost of Divine Healing which heals serious injuries.

userInjuryValueNPCsUseBandages = 5
NPCs will use bandages if their injuries are equal to this value or more. 0 will prevent them from using bandages.

userArmInjuryMagnitudeIncreaseFactor = 0.5
userBodyInjuryMagnitudeIncreaseFactor = 0.5
userHeadInjuryMagnitudeIncreaseFactor = 0.5
userLegInjuryMagnitudeIncreaseFactor = 0.5
userBattleFatigueMagnitudeIncreaseFactor = 1
When set, the magnitude of this injury increases by this factor at each injury. E.g. at 0.5 (the default), the magnitude at the first is 2.5. The second, 7.5. The third, 15. The fourth, 25. The fifth, 37.5.
e.g. at 1, the magnitude at the first injury is 5. The second, 15. The third, 30. The fourth, 50. The fifth, 75.
When this is set, it is not advisiable to set the base magnitudes (e.g. userArmInjuryMagnitude, etc.) to be more than 5.

These factors affect the individual components of Battle fatigue:
userBFHealthMagMult 1
userBFMagickaMagMult 1
userBFStaminaMagMult 1

These factors affect the individual component of arm injuries.
userIABlockMagMult 1
userIAMarksmanMagMult 1
userIAOneHandedMagMult 1
userIATwoHandedMagMult 1
userIAWeaponSpeedMagMult 0.5

These factors affect the individual component of body injuries.
userIBHeavyArmorMagMult 1
userIBLightArmorMagMult 1
userIBSneakMagMult 1
userIBCombatBalanceMagMult 0.5

These factors affect the individual component of head injuries.
userIHAlchemyMagMult 1
userIHAlterationMagMult 1
userIHConjurationMagMult 1
userIHDestructionMagMult 1
userIHIllusionMagMult 1
userIHRestorationMagMult 1
userIHSpeechcraftMagMult 1

These factors affect the individual component of leg injuries.
userILJumpMagMult 1
userILSpeedMagMult 1
userILCarryWeightMagMult 0.5

userShowHUDMode = 2
0 = Don't show. 1 = When penalised or on key-press. 2 = Always (default). 3 = On key-press only.

userHUDLocation = 5
0 = Top. 1 = Top-right. 2 = Right. 3 = Bottom-right. 4 = Bottom. 5 = Bottom-left. 6 = Left. 7 = Top-left.

userHUDLocationXAdj = 50
X (horizontal) adj of HUD location.

userHUDLocationYAdj = -50
Y (vertical) adj of HUD location.

userHUDKey = 48
Show HUD key. "B"

userToggleAsBandageKey = 13
Key to toggle item as a bandage in the inventory screen.

userToggleAsHealerKey = 13
Key to toggle NPC in your crosshair as a healer.

A configuration file (data\ini\kuerteeBattleFatigueAndInjuries.ini) is provided with the relevant console commands. If you want to change any of the default values above, change them in the INI file then run the file by typing {bat "ini\kuerteeBattleFatigueAndInjuries.ini"} (without the brackets) in the console. You only need to do this when you want to change the values of the property. Your changes will be saved in your game.

Install

  1. Use Wrye Bash (http://skyrim.nexusmods.com/downloads/file.php?id=1840) to install this mod. Just drag the package (which is a normal ZIP file) into Wrye Bash's Installers tab. However, the package is only a normal ZIP file, so if you know the game's mod file structure, install it manually.
  2. Change your settings within the game in Sky UI's MCM or check the settings in "Data\Ini\". If you change any of it, execute your changes by typing in the console {bat "ini\kuerteeBattleFatigueAndInjuries.ini"} without the brackets.
  3. Activate the mod.

Uninstall

  1. In the console, type "SetPQV kuBFAIQ uninstallNow True". Or with Sky UI's MCM, set the uninstallNow toggle to True then exit the menus.
  2. Wait for a message confirming the uninstallation. Save the game.
  3. Deactivate the mod with Wrye Bash. If you installed this manually, simply delete all the files you installed. (Wrye Bash keeps track of files used, so installing/uninstalling the mod with it is 100% simpler.)

Troubleshooting

Creating a clean save:

  1. If you can, uninstall the mod from the console with {SetPQV kuBFAIQ uninstallNow True}.
  2. Wait for the mod to confirm the uninstallation. It may take a minute. If no confirmation appears, then simply continue to the next step.
  3. Save the game manually from the console by typing {save uninstalledMod}.
  4. Uninstall all the mod's files (*.ESP, *.PSC, *.PEX) from the game folders. Make sure that none of the mod's Scripts are left. A mod manager like Wrye is best used for this.
  5. Load the "uninstalledMod" save.
  6. Save the game manually again from the console by typing {save cleanSave}. Because all of the mod's files were removed, all of its data will be "zeroed" in this game.
  7. Play from this game.

Script logging

History

Credits

kuertee in http://www.bethsoft.com/bgsforums/

Tools Used

Creation kit - http://www.creationkit.com

Licensing/Legal

You can do whatever you want with this mod but all I ask in return is that you give me credit. I would also like to be contacted when you include this mod in part or in full in a public release.