Compare commits

..

No commits in common. "54dfde9cbf75665f014093a83ec34e82e5825593" and "b3bc5a68b7f4c0f999974f6a25b4cbf11b8f2882" have entirely different histories.

11 changed files with 60 additions and 67 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,25 +0,0 @@
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,11 +8,6 @@ Event OnInit()
; MQP01 ; MQP01
if (Game.GetForm(0x46F1A) as Quest).GetStageDone(10) 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.") 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() ;Game.QuitToMainMenu()
endif endif

View File

@ -1,37 +0,0 @@
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

@ -15,6 +15,17 @@ Event OnInit()
return return
EndIf 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("speedMult", 95)
PlayerREF.SetActorValue("Healrate", 0) PlayerREF.SetActorValue("Healrate", 0)
@ -32,10 +43,26 @@ EndEvent
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
If self == (PlayerREF as ObjectReference) ; A check just in case. Most likely this condition is always True 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() Maintenance()
If GetState() != "RealPlayer"
GoToState("RealPlayer")
EndIf
EndIf EndIf
EndEvent EndEvent
State RealPlayer
;/ Event OnBeginState()
Debug.Trace(self + ": OnBeginState RealPlayer")
EndEvent /;
EndState
;===================================================================================== ;=====================================================================================
; ALL UPDATES ; ALL UPDATES
@ -79,11 +106,39 @@ Function RefreshMountNamesOnLoad()
EndFunction 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 ; 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() Function Maintenance()
; changes to the actor value healrate will not persist in consecutive saves ; changes to the actor value healrate will not persist in consecutive saves
@ -102,6 +157,8 @@ Function Maintenance()
EnableDisableKillmove() EnableDisableKillmove()
ResetArmorWeightPerks()
SetAutoSaveInterval() SetAutoSaveInterval()
FailsafeMQ05PrologueAliases() FailsafeMQ05PrologueAliases()
@ -123,3 +180,6 @@ Actor Property PlayerREF Auto
FormList Property QuestsToStart Auto FormList Property QuestsToStart Auto
GlobalVariable Property KillMove Auto GlobalVariable Property KillMove Auto
Perk Property _00E_Class_Keeper_P05_C_Conditioning Auto
Perk Property _00E_Class_Vagrant_P05_B_Lightweight Auto