The mod is designed to let you regain health naturally over time, this new version is a complete rewrite, and uses willpower, and other factors to determine how quickly you regain health. A new feature is a self adjusting update interval, which makes sure that you regain health more quickly with minor injuries, and much slower with large injuries. (It's scaled between 3-30 seconds by default.)
It has two modifiers intended for users, which allow you to customize the amount of health regained at each update, and to tweak the interval itself.
Modifiers
float HealthModifier
float UpdateModifier
These can be adjusted in the console.
// This controls the amount of health you will regenerate.
Set aaaNaturalHealing.HealthModifier to 0.05
// This scales between the number you set, and it's value times by 10 (5-50)
Set aaaNaturalHealing.UpdateModifier to 5
I'm mainly looking to get it balanced enough, that most anyone would feel comfortable using it. (I may try factoring other things in, like Endurance, etc,. Feel free to make suggestions on what you feel would make most sense, etc,.)
-----
Download (Be sure to get v2 it's listed as "Optional" and not the "Main" file, which is v1.)
http://www.tesnexus.com/downloads/file.php?id=39369
Requires: Tribunal or Bloodmoon (Uses "Start Script" in the CS.)
-------
Here is the source code, see what you think of the formula, etc, let me know if you see any obvious issues, etc,.
Updated: Added bottomlimit for setting a cut off range, and a workaround that attempts to detect combat, and adjusted the values a bit.
Spoiler
Begin aaaNaturalHealing; First Runshort DoOnce; Timerfloat Timerfloat UpdateInterval; Healthfloat HealthPercentagefloat CurrentHealthfloat MaxHealth; Willpowerfloat WillPercentagefloat CurrentWill; Modifiersfloat BottomLimitfloat HealthModifierfloat UpdateModifier; Combat Detection ( Workaround: Detecting Combat )float LastHealth; Heal Valuefloat HealValue; First Runif ( DoOnce == 0 ) Set BottomLimit to 0 Set HealthModifier to 0.025 Set UpdateModifier to 5 Set DoOnce to -1endif; MenuMode Check ( Stop Processing )if ( MenuMode == 1 ) returnendif; Get Current Health PercentageSet HealthPercentage to ( Player->GetHealthGetRatio ); Fully Healed ( Stop Processing )if ( HealthPercentage >= 1.0 ) returnendif; Bottom Limitif ( HealthPercentage < BottomLimit ) returnendif; Increment TimerSet Timer to ( Timer + GetSecondsPassed ); Calculate Update IntervalSet UpdateInterval to ( UpdateModifier / HealthPercentage ); Updateif ( Timer >= UpdateInterval ) ; Current Health Set CurrentHealth to ( Player->GetHealth ) ; Taking Damage ( Workaround: Combat Detection ) if ( CurrentHealth < LastHealth ) Set Timer to 0 Set LastHealth to ( CurrentHealth ) return else Set LastHealth to ( CurrentHealth ) endif ; Max Health if ( HealthPercentage > 0 ) Set MaxHealth to ( CurrentHealth / HealthPercentage ) else Set MaxHealth to 0 endif ; Current Willpower Set CurrentWill to ( Player->GetWillpower ) ; Calculate Willpower Percentage Set WillPercentage to ( CurrentWill / 100 ) ; Calculate Heal Value Set HealValue to ( MaxHealth * HealthModifier * WillPercentage ) ; Add HealValue Player->ModCurrentHealth HealValue ; Reset Timer Set Timer to 0.00endifEnd