1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
889 B

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