Compare commits

...

4 Commits

11 changed files with 67 additions and 60 deletions

BIN
IntegrityCheck.esp Normal file

Binary file not shown.

Binary file not shown.

BIN
WeightPerkQuest.esp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -8,6 +8,11 @@ Event OnInit()
; MQP01
if (Game.GetForm(0x46F1A) as Quest).GetStageDone(10)
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
EndWhile
Debug.MessageBox("A savegame was loaded which was made before the release of Enderal SE 2.1. In this save, several new features won't be available and there is a chance that you'll encounter grave bugs. Please, start a new game.")
;Game.QuitToMainMenu()
endif

View File

@ -0,0 +1,37 @@
Scriptname _00E_IntegrityCheckAlias extends ReferenceAlias Hidden
Event OnInit()
; needs the IsInMenuMode() check to prevent stuck messages
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
EndWhile
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
EndEvent
Event OnPlayerLoadGame()
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
EndEvent
function CheckForgottenStories()
; If Enderal - Forgotten Stories.esm is not loaded, kick the player back to main menu
if _00E_FS_IsForgottenStoriesActivated.GetValue() as Int != 1
Utility.wait(2.0)
Game.QuitToMainMenu()
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
return
EndIf
endfunction
GlobalVariable Property _00E_FS_IsForgottenStoriesActivated Auto

View File

@ -14,18 +14,7 @@ Event OnInit()
If self != (PlayerREF as ObjectReference)
return
EndIf
; needs the IsInMenuMode() check to prevent stuck messages when FS is not loaded
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
EndWhile
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
GoToState("RealPlayer")
PlayerREF.SetActorValue("speedMult", 95)
PlayerREF.SetActorValue("Healrate", 0)
@ -43,26 +32,10 @@ EndEvent
Event OnPlayerLoadGame()
If self == (PlayerREF as ObjectReference) ; A check just in case. Most likely this condition is always True
CheckForgottenStories()
_00E_Func_CheckSKSE.Run()
_00E_Func_CheckEnderalDLL.Run()
Maintenance()
If GetState() != "RealPlayer"
GoToState("RealPlayer")
EndIf
EndIf
EndEvent
State RealPlayer
;/ Event OnBeginState()
Debug.Trace(self + ": OnBeginState RealPlayer")
EndEvent /;
EndState
;=====================================================================================
; ALL UPDATES
@ -106,39 +79,11 @@ 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
;=====================================================================================
function CheckForgottenStories()
; If Enderal - Forgotten Stories.esm is not loaded, kick the player back to main menu
if (Game.GetForm(0x4320E) as GlobalVariable).GetValue() as Int != 1
Utility.wait(2.0)
Game.QuitToMainMenu()
Debug.MessageBox("Enderal - Forgotten Stories.esm is not loaded! The game will not run properly. Open Data Files and enable it.")
return
EndIf
endfunction
Function Maintenance()
; changes to the actor value healrate will not persist in consecutive saves
@ -157,8 +102,6 @@ Function Maintenance()
EnableDisableKillmove()
ResetArmorWeightPerks()
SetAutoSaveInterval()
FailsafeMQ05PrologueAliases()
@ -180,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