4
Fork 0

Added formlist PlayerPerks to add redundancy in case of overridden Player record by an outdated mod

master
Eddoursul 2 years ago
parent e2987edcff
commit b4622c6f98
  1. BIN
      Enderal - Forgotten Stories.esm
  2. 21
      Enderal - Forgotten Stories.esm.xml
  3. BIN
      Skyrim.esm
  4. BIN
      scripts/_00e_playersetupscript.pex
  5. 57
      source/scripts/_00e_playersetupscript.psc

Binary file not shown.

@ -2,10 +2,10 @@
<plugin version="0.7.4"> <plugin version="0.7.4">
<TES4 flags="0x00000081" id="00000000" day="0" month="0" lastUserID="0" currentUserID="0" version="44" unknown="0x0000"> <TES4 flags="0x00000081" id="00000000" day="0" month="0" lastUserID="0" currentUserID="0" version="44" unknown="0x0000">
<HEDR> <HEDR>
<struct version="1.70000005" numRecords="42830" nextObjectID="00014cf3" /> <struct version="1.70000005" numRecords="42831" nextObjectID="00014cf3" />
</HEDR> </HEDR>
<CNAM>Niseam</CNAM> <CNAM>Niseam</CNAM>
<SNAM>Enderal: Forgotten Stories (Special Edition) 2.0.11</SNAM> <SNAM>Enderal: Forgotten Stories (Special Edition) 2.0.12</SNAM>
<MAST>Skyrim.esm</MAST> <MAST>Skyrim.esm</MAST>
<DATA>0</DATA> <DATA>0</DATA>
<MAST>Update.esm</MAST> <MAST>Update.esm</MAST>
@ -140639,6 +140639,9 @@
<property name="Levelsystem" type="1" status="1"> <property name="Levelsystem" type="1" status="1">
<object formID="00010aa2" alias="65535" unused="0x0000" /> <object formID="00010aa2" alias="65535" unused="0x0000" />
</property> </property>
<property name="" type="1" status="1">
<object formID="000493b8" alias="65535" unused="0x0000" />
</property>
</script> </script>
<script name="_00E_StanceLoadFailsafeSC" status="0"> <script name="_00E_StanceLoadFailsafeSC" status="0">
<property name="_00E_Class_Vandal_P04_Talent_SkaraggianStance_02" type="1" status="1"> <property name="_00E_Class_Vandal_P04_Talent_SkaraggianStance_02" type="1" status="1">
@ -854073,6 +854076,20 @@
<LNAM>0202e68e</LNAM> <LNAM>0202e68e</LNAM>
<LNAM>0201e8fc</LNAM> <LNAM>0201e8fc</LNAM>
</FLST> </FLST>
<FLST flags="0x00000000" id="000493b8" day="0" month="0" lastUserID="0" currentUserID="0" version="44" unknown="0x0000">
<EDID>PlayerPerks</EDID>
<LNAM>000cb40d</LNAM>
<LNAM>000cb40e</LNAM>
<LNAM>000cb40f</LNAM>
<LNAM>000cb410</LNAM>
<LNAM>000cb411</LNAM>
<LNAM>000cb412</LNAM>
<LNAM>000cb413</LNAM>
<LNAM>000cb414</LNAM>
<LNAM>00052190</LNAM>
<LNAM>0202f218</LNAM>
<LNAM>0202f219</LNAM>
</FLST>
<FLST flags="0x00000000" id="00082f6e" day="0" month="0" lastUserID="0" currentUserID="0" version="44" unknown="0x0000"> <FLST flags="0x00000000" id="00082f6e" day="0" month="0" lastUserID="0" currentUserID="0" version="44" unknown="0x0000">
<EDID>TrapGasMagicDrawn</EDID> <EDID>TrapGasMagicDrawn</EDID>
<LNAM>00035d7f</LNAM> <LNAM>00035d7f</LNAM>

Binary file not shown.

@ -1,7 +1,7 @@
Scriptname _00E_PlayerSetUpScript extends ObjectReference Scriptname _00E_PlayerSetUpScript extends ObjectReference
{Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes. This script is important for proper updating, do not overwrite it.} {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.11 AutoReadOnly Float Property CURRENT_PATCH_VERSION = 2.12 AutoReadOnly
;===================================================================================== ;=====================================================================================
@ -35,12 +35,16 @@ Event OnInit()
; 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 > 0
iIndex -= 1 iIndex -= 1
Quest kQuest = QuestsToStart.GetAt(iIndex) as Quest Quest kQuest = QuestsToStart.GetAt(iIndex) as Quest
kQuest.Start() kQuest.Start()
endwhile endwhile
; Added in 2.0.12
AddPlayerPerks()
EndEvent EndEvent
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
@ -148,6 +152,33 @@ Function Update_210()
EndFunction EndFunction
;=====================================================================================
; 2.0.12
;=====================================================================================
Function Update_212()
;
EndFunction
Function AddPlayerPerks()
if PlayerPerks == None
PlayerPerks = Game.GetForm(0x000493B8) as FormList
endif
Perk kPerk
int iIndex = PlayerPerks.GetSize()
While iIndex > 0
iIndex -= 1
kPerk = PlayerPerks.GetAt(iIndex) as Perk
if ! PlayerREF.HasPerk(kPerk)
PlayerREF.AddPerk(kPerk)
endif
endwhile
EndFunction
;===================================================================================== ;=====================================================================================
; ALL UPDATES ; ALL UPDATES
;===================================================================================== ;=====================================================================================
@ -177,7 +208,7 @@ Function FailsafeMQ05PrologueAliases()
; failsafe for issue 1536, fills empty aliases ; failsafe for issue 1536, fills empty aliases
If MQ05PrologueFunctions == None If MQ05PrologueFunctions == None
MQ05PrologueFunctions = Game.GetFormFromFile(0x00033A5B, "Skyrim.esm") as _00E_MQ05Prologue_Functions MQ05PrologueFunctions = Game.GetForm(0x00033A5B) as _00E_MQ05Prologue_Functions
EndIf EndIf
MQ05PrologueFunctions.FillEmptyAliasesFailsafe() MQ05PrologueFunctions.FillEmptyAliasesFailsafe()
@ -331,6 +362,9 @@ Function Maintenance()
If fPatchVersion < 2.10 If fPatchVersion < 2.10
Update_210() Update_210()
EndIf EndIf
If fPatchVersion < 2.12
Update_212()
EndIf
fPatchVersion = CURRENT_PATCH_VERSION fPatchVersion = CURRENT_PATCH_VERSION
endif endif
@ -338,22 +372,24 @@ Function Maintenance()
; every time a save gets loaded the healrate needs to be set to 0, otherwise it will go back again to default at 0.7 ; every time a save gets loaded the healrate needs to be set to 0, otherwise it will go back again to default at 0.7
; this is called before active magic effects of potions or spells are applied to the player which could also alter the value ; this is called before active magic effects of potions or spells are applied to the player which could also alter the value
PlayerREF.SetActorValue("Healrate", 0) PlayerREF.SetActorValue("Healrate", 0)
; Workaround for broken physics on loading saves, made on a mount
If PlayerREF.IsOnMount()
PlayerREF.Dismount()
EndIf
EnableDisableKillmove() EnableDisableKillmove()
ResetArmorWeightPerks() ResetArmorWeightPerks()
AddPlayerPerks()
SetAutoSaveInterval() SetAutoSaveInterval()
FailsafeMQ05PrologueAliases() FailsafeMQ05PrologueAliases()
RefreshMountNamesOnLoad() RefreshMountNamesOnLoad()
; Workaround for broken physics on loading saves, made on a mount
If PlayerREF.IsOnMount()
PlayerREF.Dismount()
EndIf
; fixes properties that were accidentally set to NONE by the "More Affinities" mod ; fixes properties that were accidentally set to NONE by the "More Affinities" mod
If Game.GetModByName("Enderal_FS_More_Affinities.esp") != 255 If Game.GetModByName("Enderal_FS_More_Affinities.esp") != 255
FixMoreAffinitiesMod() FixMoreAffinitiesMod()
@ -372,6 +408,7 @@ _00E_MQ05Prologue_Functions Property MQ05PrologueFunctions Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
FormList Property QuestsToStart Auto FormList Property QuestsToStart Auto
FormList Property PlayerPerks Auto
GlobalVariable Property KillMove Auto GlobalVariable Property KillMove Auto

Loading…
Cancel
Save