I really like this idea but you should be aware that the mod contains 'dirty' GMST edits and should be cleaned. Otherwise, it's a great start, I'd prefer to see a bit more development to set it apart from Talrivian's though: (https://web.archive.org/web/20161109131753/http://mw.modhistory.com/file.php?id=6521)
Correct - for OpenMW (and vanilla, without the need for MWSE, MGE, or any other prerequisite mod), given the various issues with this mod reported here, it's much simpler to just use Talrivian's fully working mod instead. I've uploaded it to Nexus (on the basis of Talrivian's explicit open permission), as the old modhistory site now appears to be out of service.
Version for OpenMW doesnt work. The script is never called.
Learwolf's version down below has one drawback: whenever your strength, endurance or level changes, you are fully healed. I think this is a bug in OpenMW
To fix both problems I modified the script "Bed_Standard". This means that your health is recalculated only when you activate a bed. To prevent players from buffing their stats before sleeping (which would lead in a constant "fortify health"-effect until next sleep), I added a 100% dispel effect before the health is recalculated. Here is the full code: begin Bed_Standard ;used for standard beds the player can activate and sleep in if ( MenuMode == 0) if ( OnActivate == 1 ) ShowRestMenu Cast, "Dispel", Player Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + Player->GetLevel * Player->GetEndurance / 10 ) endif endif endIf you want to use this, then download OpenMW-CS, create a new "addon", open the script "Bed_Standard" and replace the code. Save, then activate the mod in OpenMW. You do NOT need the original mod. Just change the script.
That script breaks the rest menu when trying to sleep in a bed. Here's a working version- ?begin Bed_Standard ;used for standard beds the player can activate and sleep in if ( MenuMode == 0) if ( OnActivate == 1 ) ShowRestMenu Cast, "Dispel", Player Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + Player->GetLevel * Player->GetEndurance / 10 ) endif endif end
This is really late, but there's a problem with the parser here on Nexus Mods that is detecting JavaScript variables and editing what is shown. (https://github.com/Nexus-Mods/web-issues/issues/1591) Both Majestroo123 and Senteth are trying to write "On Activate" but WITHOUT a space in between those two words. When written without the space, it shows as "javascript-event-stripped". Just change that in Majestroo123's code when you go to overwrite "Bed_Standard". Senteth's code has a question mark at the very beginning, which should not be there.
Being a bit pedantic here, but shouldn't the line for calculating the player's health actually be...
Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + (Player->GetLevel - 1) * Player->GetEndurance / 10 ) ...because you shouldn't get any bonus health at level one, since you haven't actually levelled up, yet?
On another note, does anyone have an idea how to remove effects from potions/alcohol before resting? Dispel only removes effects from spells, as far as I remember.
Exactly what i was looking for. But if i see this correctly there are a lot of Game Setting changes in this esp that a unnecessary, for example Werewolf Attribut changes (more Acrobatics and Athletics, etc.) and some Text Strings. Can i delete those are do they have a purpose?
Edit: I tested this mod and it doesn't work. I used my existing Save and leveled up but nothing changed. I used scrolls to change my attributes and nothing changed. Then i created a new character and changed attributes via console commands but nothing changed. I have MGE XE and newest Script Extender installed.
Those are what's known as "evil GMSTs" -- completely vanilla variables that create unnecessary conflicts with mods that actually change these records. You'll definitely want to delete them.
Too bad this mod makes unnecessary changes to Game Settings that have nothing to do with the stated purpose of the mod, and that it doesn't work anyway. Until this mod gets updated to fix these major issues, I recommend using good old Talrivian's State-Based HP mod (https://modding-openmw.com/mods/talrivians-state-based-hp-mod/) instead. That mod works both in vanilla MW and OpenMW.
Well, if there is no other Health Mod in your load order and you installed it into an active game, it should "reset" as soon as you level up a skill that Health depends on. Otherwise, I cant really say without seeing your mods.
Yeah, its working as a script, but I havent really looked into how OpenMW handles these things or if it uses them at all. That´s most likely the reason why it isnt working for OpenMW.
31 comments
Talrivian's State-Based HP Mod (OpenMW-vanilla) at Morrowind Nexus - mods and community (nexusmods.com)
Begin Health_Change
float str
float endu
float lvl
float hlth
if ( str != ( Player->GetStrength ) )
set str to ( Player->GetStrength )
set hlth to ( ( ( str + endu)/2 ) + ( lvl * ( endu/10) ) )
Player->SetHealth hlth
Return
elseif ( endu != ( Player->GetEndurance ) )
set endu to ( Player->GetEndurance )
set hlth to ( ( ( str + endu)/2 ) + ( lvl * ( endu/10) ) )
Player->SetHealth hlth
Return
elseif ( lvl != ( Player->GetLevel ) )
set lvl to ( Player->GetLevel )
set hlth to ( ( ( str + endu)/2 ) + ( (lvl - 1) * ( endu/10) ) )
Player->SetHealth hlth
Return
endif
End Health_Change
"set str to ( Player->GetStrength )
set endu to ( Player->GetEndurance )
set lvl to ( Player->GetLevel )"
Was that intentional?
EDIT: I guess that "initialization" of variables did not do anything in the end.
Learwolf's version down below has one drawback: whenever your strength, endurance or level changes, you are fully healed. I think this is a bug in OpenMW
To fix both problems I modified the script "Bed_Standard". This means that your health is recalculated only when you activate a bed.
To prevent players from buffing their stats before sleeping (which would lead in a constant "fortify health"-effect until next sleep), I added a 100% dispel effect before the health is recalculated.
Here is the full code:
begin Bed_Standard
If you want to use this, then download OpenMW-CS, create a new "addon", open the script "Bed_Standard" and replace the code. Save, then activate the mod in OpenMW. You do NOT need the original mod. Just change the script.;used for standard beds the player can activate and sleep in
if ( MenuMode == 0)
if ( OnActivate == 1 )
ShowRestMenu
Cast, "Dispel", Player
Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + Player->GetLevel * Player->GetEndurance / 10 )
endif
endif
end
?begin Bed_Standard
;used for standard beds the player can activate and sleep in
if ( MenuMode == 0)
if ( OnActivate == 1 )
ShowRestMenu
Cast, "Dispel", Player
Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + Player->GetLevel * Player->GetEndurance / 10 )
endif
endif
end
Both Majestroo123 and Senteth are trying to write "On Activate" but WITHOUT a space in between those two words. When written without the space, it shows as "javascript-event-stripped". Just change that in Majestroo123's code when you go to overwrite "Bed_Standard". Senteth's code has a question mark at the very beginning, which should not be there.
Player->SetHealth ( (Player->GetStrength + Player->GetEndurance)/2 + (Player->GetLevel - 1) * Player->GetEndurance / 10 )
...because you shouldn't get any bonus health at level one, since you haven't actually levelled up, yet?
On another note, does anyone have an idea how to remove effects from potions/alcohol before resting? Dispel only removes effects from spells, as far as I remember.
Edit: I tested this mod and it doesn't work. I used my existing Save and leveled up but nothing changed. I used scrolls to change my attributes and nothing changed. Then i created a new character and changed attributes via console commands but nothing changed. I have MGE XE and newest Script Extender installed.
Anyway, thanks a lot.