4
Fork 0

Crafting refactoring update

master
Eddoursul 2 years ago
parent 4737d589a2
commit 7b379f4af5
  1. BIN
      scripts/PRKF__00E_CraftQuestPotionPe_0300146D.pex
  2. BIN
      scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.pex
  3. BIN
      scripts/_00e_fs_nq05_functions.pex
  4. BIN
      scripts/_00e_fs_nq07_functions.pex
  5. BIN
      scripts/_00e_fs_smelter_workbench.pex
  6. BIN
      scripts/_00e_func_checkdependencies.pex
  7. BIN
      scripts/_00e_playerhousingmaster.pex
  8. BIN
      scripts/_00e_playersetupscript.pex
  9. 2
      source/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.psc
  10. 2
      source/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.psc
  11. 35
      source/scripts/_00e_fs_nq05_functions.psc
  12. 18
      source/scripts/_00e_fs_nq07_functions.psc
  13. 1
      source/scripts/_00e_func_checkdependencies.psc
  14. 8
      source/scripts/_00e_playersetupscript.psc

@ -5,7 +5,7 @@ Scriptname PRKF__00E_CraftQuestPotionPe_0300146D Extends Perk Hidden
;BEGIN FRAGMENT Fragment_7
Function Fragment_7(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
if FS_NQ05.GetStage() >= 40
if FS_NQ05.GetCurrentStageID() >= 40
Game.GetPlayer().RemovePerk(Self)
return
endif

@ -5,7 +5,7 @@ Scriptname PRKF__00E_FS_NQ07_CraftPotio_0300146E Extends Perk Hidden
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
if FS_NQ07.GetStage() >= 120
if FS_NQ07.GetCurrentStageID() >= 120
Game.GetPlayer().RemovePerk(Self)
return
endif

@ -48,7 +48,7 @@ Function UpdateGlobals()
ModObjectiveGlobal(0, _00E_FS_NQ05_MothWingMonarchCountGlobal, 38, 1, true, true, false)
ModObjectiveGlobal(0, _00E_FS_NQ05_VynrootCountGlobal, 39, 1, true, true, false)
ReferenceAlias PlayerAlias = Self.GetAlias(6) as ReferenceAlias
ReferenceAlias PlayerAlias = GetAlias(6) as ReferenceAlias
PlayerAlias.ForceRefTo(PlayerREF)
PlayerAlias.AddInventoryEventFilter(SkeeverTail)
PlayerAlias.AddInventoryEventFilter(Garlic)
@ -57,15 +57,6 @@ Function UpdateGlobals()
EndFunction
Function TestFunction() ;DELETE FOR RELEASE
PlayerREF.AddItem(Vynroot, 1)
PlayerREF.AddItem(SkeeverTail, 1)
PlayerREF.AddItem(MothWingMonarch, 1)
PlayerREF.AddItem(Garlic, 1)
EndFunction
Function MoveMirellStandby()
Tochter.RemoveItem(FS_NQ05_Elixier, 1, false, PlayerREF)
@ -88,7 +79,7 @@ Function PrepareKeller()
FS_NQ05_CollisionsBox.Disable()
FS_NQ05AushangStatic.Disable()
Wait(2)
SetStage(60)
SetCurrentStageID(60)
FS_NQ05_SceneTochter.ForceStart()
EndFunction
@ -99,7 +90,7 @@ Function Warten()
wait(3)
Mirell.MoveTo(FS_NQ05MirellWohnzimmerMarker)
Levelsystem.FadeToBlackBack()
SetStage(75)
SetCurrentStageID(75)
EndFunction
@ -141,7 +132,7 @@ EndFunction
Function MirellAttacksPlayer()
Mirell.RemoveFromAllFactions()
Mirell.setAv("Aggression", 2)
Mirell.SetActorValue("Aggression", 2)
Mirell.AddItem(FS_NQ05_Amulett, 1)
Mirell.SetGhost(false)
wait(0.1)
@ -153,7 +144,7 @@ Function PrepareEnde2()
Levelsystem.GiveEP(350)
Tochter.SetGhost(false)
Tochter.setAv("Aggression", 2)
Tochter.SetActorValue("Aggression", 2)
Tochter.RemoveFromAllFactions()
EndFunction
@ -199,10 +190,10 @@ EndFunction
Function AskCreatePotion()
Int qStage = Self.GetStage()
Int qStage = GetCurrentStageID()
If qStage >= 30 && qStage < 40
If FS_NQ05_AlchemyMessagebox.Show() == 0
Self.SetStage(40)
SetCurrentStageID(40)
PlayerREF.RemoveItem(Vynroot, 1)
PlayerREF.RemoveItem(SkeeverTail, 1)
PlayerREF.RemoveItem(MothWingMonarch, 1)
@ -218,14 +209,14 @@ EndFunction
;=====================================================================================
Event OnUpdateGameTime() ; because of how we registered, this event occurs every 30 minutes of game time
if (GameDaysPassed.GetValue() + 1 >= GameDay && GetStage() == 80)
SetStage(90)
if (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 80)
SetCurrentStageID(90)
UnregisterForUpdateGameTime()
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetStage() == 150)
SetStage(160)
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 150)
SetCurrentStageID(160)
UnregisterForUpdateGameTime()
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetStage() == 180)
SetStage(190)
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 180)
SetCurrentStageID(190)
UnregisterForUpdateGameTime()
Endif
EndEvent

@ -18,7 +18,7 @@ Function SetupSC01()
_00E_FS_NQ07_MaxusREF.MoveTo(_00E_FS_NQ07_MaxusTavernMarker)
PlayerREF.MoveTo(_00E_FS_NQ07_PlayerTavernMarker)
Levelsystem.FadeToBlackBack()
SetStage(30)
SetCurrentStageID(30)
EndFunction
@ -106,7 +106,7 @@ Function ResetAurora()
; gets also called from the _00E_PlayerSetUpScript, hence we only want it to happen on stage 135,
; so we don't mess anything else up accidentally
If GetStage() == 135
If GetCurrentStageID() == 135
_00E_FS_NQ07_AuroraREF.Reset(_00E_FS_NQ07_AuroraREF)
EndIf
@ -131,7 +131,7 @@ Function GiveAuroraTrank()
Levelsystem.FadeToBlackBack()
wait(1)
SetStage(135)
SetCurrentStageID(135)
EndFunction
@ -150,7 +150,7 @@ Function GiveAuroraTrankNight()
wait(0.1)
SkyrimClear.ForceActive(True)
SetStage(135)
SetCurrentStageID(135)
EndFunction
@ -529,7 +529,7 @@ Function UpdateGlobals()
ModObjectiveGlobal(0, FS_NQ07_ChickenCooked, 120, 2, true, true, false)
ModObjectiveGlobal(0, FS_NQ07_SoupBrewed, 130, 2, true, true, false)
ReferenceAlias PlayerAlias = Self.GetAlias(14) as ReferenceAlias
ReferenceAlias PlayerAlias = GetAlias(14) as ReferenceAlias
PlayerAlias.ForceRefTo(PlayerREF)
PlayerAlias.AddInventoryEventFilter(_00E_DalSarkerHoneywine)
PlayerAlias.AddInventoryEventFilter(FoodChickenCooked)
@ -546,8 +546,8 @@ EndFunction
Function UpdateAarosCarryTraySpell() ; Version 2.0.8 Update
If _00E_FS_NQ07_AarosREF.HasSpell(_00E_AbCarryDrinkTray_Old)
_00E_FS_NQ07_AarosREF.RemoveSpell(_00E_AbCarryDrinkTray_Old)
Utility.Wait(1.0)
Int iCurStage = GetStage()
Wait(1.0)
Int iCurStage = GetCurrentStageID()
If iCurStage >= 35 && iCurStage < 50
AarosAddSpell()
EndIf
@ -556,9 +556,9 @@ EndFunction
Function AskCreatePotion()
If Self.GetStage() == 115
If GetCurrentStageID() == 115
If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0
Self.SetStage(120)
SetCurrentStageID(120)
PlayerREF.RemoveItem(FoodMead, 1)
PlayerREF.RemoveItem(FrostMirriam, 2)
PlayerREF.RemoveItem(FoodBananenschnaps, 1)

@ -7,6 +7,7 @@ Function CheckDependencies() global
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
; Skip all other check on non-PC/non-VR platforms (for future ports)

@ -71,9 +71,9 @@ EndState
;=====================================================================================
Function UpdateMQ12b_206()
_00E_MQ12b_Functions MQ12bFunctions = Game.GetFormFromFile(0x0002EBAD, "Skyrim.esm") as _00E_MQ12b_Functions
_00E_MQ12b_Functions MQ12bFunctions = Game.GetForm(0x2EBAD) as _00E_MQ12b_Functions
Quest MQ15 = Game.GetFormFromFile(0x0002EBB0, "Skyrim.esm") as Quest
If MQ12bFunctions.GetStage() >= 135 && MQ15.GetStage() < 5
If MQ12bFunctions.GetCurrentStageID() >= 135 && MQ15.GetCurrentStageID() < 5
MQ12bFunctions.OldReenableDisabledNPC()
EndIf
EndFunction
@ -86,7 +86,7 @@ EndFunction
Function Update_208()
; Obsolete abilities cleanup
_00E_FS_NQ07_Functions FS_NQ07_Quest = Game.GetFormFromFile(0x0001CA09, "Enderal - Forgotten Stories.esm") as _00E_FS_NQ07_Functions
Int iFS_NQ07Stage = FS_NQ07_Quest.GetStage()
Int iFS_NQ07Stage = FS_NQ07_Quest.GetCurrentStageID()
If iFS_NQ07Stage >= 5 && iFS_NQ07Stage < 410
FS_NQ07_Quest.UpdateAarosCarryTraySpell()
Else
@ -163,7 +163,7 @@ EndFunction
Function AddPlayerPerks()
if PlayerPerks == None
PlayerPerks = Game.GetForm(0x000493B8) as FormList
PlayerPerks = Game.GetForm(0x493B8) as FormList
endif
Perk kPerk

Loading…
Cancel
Save