diff --git a/WeightPerkQuest.esp b/WeightPerkQuest.esp new file mode 100644 index 00000000..70a2e86c Binary files /dev/null and b/WeightPerkQuest.esp differ diff --git a/scripts/ArmorWeightPerkFixAlias.pex b/scripts/ArmorWeightPerkFixAlias.pex new file mode 100644 index 00000000..1ede99b2 Binary files /dev/null and b/scripts/ArmorWeightPerkFixAlias.pex differ diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index ed3e0810..0222012d 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/source/scripts/ArmorWeightPerkFixAlias.psc b/source/scripts/ArmorWeightPerkFixAlias.psc new file mode 100644 index 00000000..d7a0920a --- /dev/null +++ b/source/scripts/ArmorWeightPerkFixAlias.psc @@ -0,0 +1,25 @@ +Scriptname ArmorWeightPerkFixAlias extends ReferenceAlias Hidden + +Event OnPlayerLoadGame() + + Actor PlayerREF = GetReference() as Actor + + ; Perks modifying armor weights need some push on each game load to work. + ; The push is needed only if the player is over-encumbered on game load. + ; If the player is not over-encumbered, the push is not needed because checking the inventory, picking up items, sheathing/drawing a weapon will reset the perks anyway. + If PlayerREF.IsOverEncumbered() + _ResetPerk(PlayerREF, _00E_Class_Keeper_P05_C_Conditioning) + _ResetPerk(PlayerREF, _00E_Class_Vagrant_P05_B_Lightweight) + EndIf + +EndEvent + +Function _ResetPerk(Actor PlayerREF, Perk p) + If PlayerREF.HasPerk(p) + PlayerREF.RemovePerk(p) + PlayerREF.AddPerk(p) + EndIf +EndFunction + +Perk Property _00E_Class_Keeper_P05_C_Conditioning Auto +Perk Property _00E_Class_Vagrant_P05_B_Lightweight Auto diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index dc8fbdab..d6189d61 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -79,24 +79,6 @@ Function RefreshMountNamesOnLoad() EndFunction -Function _ResetPerk(Perk p) - If PlayerREF.HasPerk(p) - PlayerREF.RemovePerk(p) - PlayerREF.AddPerk(p) - EndIf -EndFunction - -Function ResetArmorWeightPerks() - - ; Perks modifying armor weights need some push on each game load to work. - ; The push is needed only if the player is over-encumbered on game load. - ; If the player is not over-encumbered, the push is not needed because checking the inventory, picking up items, sheathing/drawing a weapon will reset the perks anyway. - If PlayerREF.IsOverEncumbered() - _ResetPerk(_00E_Class_Keeper_P05_C_Conditioning) - _ResetPerk(_00E_Class_Vagrant_P05_B_Lightweight) - EndIf - -EndFunction ;===================================================================================== ; MAINTENANCE @@ -120,8 +102,6 @@ Function Maintenance() EnableDisableKillmove() - ResetArmorWeightPerks() - SetAutoSaveInterval() FailsafeMQ05PrologueAliases() @@ -143,6 +123,3 @@ Actor Property PlayerREF Auto FormList Property QuestsToStart Auto GlobalVariable Property KillMove Auto - -Perk Property _00E_Class_Keeper_P05_C_Conditioning Auto -Perk Property _00E_Class_Vagrant_P05_B_Lightweight Auto