@ -1,5 +1,5 @@
Scriptname _00E_PlayerSetUpScript extends ObjectReference
Scriptname _00E_PlayerSetUpScript extends ObjectReference
{Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes}
{Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes. This script is important for proper updating, do not overwrite it. }
Float Property CURRENT_PATCH_VERSION = 2.10 AutoReadOnly
Float Property CURRENT_PATCH_VERSION = 2.10 AutoReadOnly
@ -10,6 +10,10 @@ Float Property CURRENT_PATCH_VERSION = 2.10 AutoReadOnly
Event OnInit()
Event OnInit()
If self != (PlayerREF as ObjectReference)
return
EndIf
; needs the IsInMenuMode() check to prevent stuck messages when FS is not loaded
; needs the IsInMenuMode() check to prevent stuck messages when FS is not loaded
While Utility.IsInMenuMode()
While Utility.IsInMenuMode()
Utility.WaitMenuMode(0.1)
Utility.WaitMenuMode(0.1)
@ -17,8 +21,6 @@ Event OnInit()
_00E_Func_CheckDependencies.CheckDependencies()
_00E_Func_CheckDependencies.CheckDependencies()
If self == (PlayerREF as ObjectReference)
If fPatchVersion == 0.00
If fPatchVersion == 0.00
fPatchVersion = CURRENT_PATCH_VERSION
fPatchVersion = CURRENT_PATCH_VERSION
EndIf
EndIf
@ -31,13 +33,6 @@ Event OnInit()
; Added in 1.5.8.0
; Added in 1.5.8.0
; adds the new Balancing perks for alchemy potions to the player, this is needed because of the changes with the Lycanthropy
PlayerREF.AddPerk(_00E_FS_Alchemy_BalancingPerk)
PlayerREF.AddPerk(_00E_FS_Alchemy_BalancingPerk_RestorePotions)
; Disables regular waiting by adding the no-wait ability
PlayerREF.AddSpell(_00E_AbBlockWaiting, False)
; starts all quests that are in the formlist
; starts all quests that are in the formlist
Int iIndex = QuestsToStart.GetSize()
Int iIndex = QuestsToStart.GetSize()
While iIndex
While iIndex
@ -46,8 +41,6 @@ Event OnInit()
kQuest.Start()
kQuest.Start()
endwhile
endwhile
EndIf
EndEvent
EndEvent
Event OnPlayerLoadGame()
Event OnPlayerLoadGame()
@ -329,15 +322,12 @@ Function Maintenance()
endif
endif
if fPatchVersion < CURRENT_PATCH_VERSION
if fPatchVersion < CURRENT_PATCH_VERSION
; only do this once when update 2.0.6 (SE) is applied
If fPatchVersion < 2.06
If fPatchVersion < 2.06
UpdateMQ12b_206()
UpdateMQ12b_206()
EndIf
EndIf
; only do this once when update 2.0.8 (SE) is applied
If fPatchVersion < 2.08
If fPatchVersion < 2.08
Update_208()
Update_208()
EndIf
EndIf
; only do this once when update 2.0.10 (SE) is applied
If fPatchVersion < 2.10
If fPatchVersion < 2.10
Update_210()
Update_210()
EndIf
EndIf
@ -376,23 +366,12 @@ EndFunction
;=====================================================================================
;=====================================================================================
float fPatchVersion
float fPatchVersion
bool bdoOnce = false
bool bFSWasNotLoadedBefore = false
_00E_MQ05Prologue_Functions Property MQ05PrologueFunctions Auto
_00E_MQ05Prologue_Functions Property MQ05PrologueFunctions Auto
Perk Property _00E_FS_Alchemy_BalancingPerk Auto
Perk Property _00E_FS_Alchemy_BalancingPerk_RestorePotions Auto
Spell Property _00E_AbBlockWaiting Auto
Actor Property PlayerREF Auto
Actor Property PlayerREF Auto
FormList Property QuestsToStart Auto
FormList Property QuestsToStart Auto
FormList Property FSQuestsToStartFailsafePatch1560 Auto
Message Property _00E_Game_OldSaves_01 Auto
Message Property _00E_Game_OldSaves_02 Auto
Message Property _00E_Game_ForgottenStoriesNotLoaded Auto
GlobalVariable Property KillMove Auto
GlobalVariable Property KillMove Auto