4
Fork 0

Optimized ingredient tracking in The Elixir

english-generic-dialogue
Eddoursul 2 years ago
parent d35571ca5e
commit ccdd1b20a4
  1. BIN
      OnItemAdded Optimization.esp
  2. BIN
      scripts/_00e_fs_nq05_functions.pex
  3. BIN
      scripts/_00e_fs_nq05_playeralias.pex
  4. 7
      source/scripts/_00e_fs_nq05_functions.psc
  5. 40
      source/scripts/_00e_fs_nq05_playeralias.psc

Binary file not shown.

@ -48,6 +48,13 @@ 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
PlayerAlias.ForceRefTo(PlayerREF)
PlayerAlias.AddInventoryEventFilter(SkeeverTail)
PlayerAlias.AddInventoryEventFilter(Garlic)
PlayerAlias.AddInventoryEventFilter(MothWingMonarch)
PlayerAlias.AddInventoryEventFilter(Vynroot)
EndFunction
Function TestFunction() ;DELETE FOR RELEASE

@ -1,10 +1,14 @@
Scriptname _00E_FS_NQ05_PlayerAlias extends ReferenceAlias
Event OnInit()
AddInventoryEventFilter(SkeeverTail)
AddInventoryEventFilter(Garlic)
AddInventoryEventFilter(MothWingMonarch)
AddInventoryEventFilter(Vynroot)
AddInventoryEventFilter(_00E_EmptyFormlist)
If FS_NQ05.GetStage() == 35 ; version update
AddInventoryEventFilter(SkeeverTail)
AddInventoryEventFilter(Garlic)
AddInventoryEventFilter(MothWingMonarch)
AddInventoryEventFilter(Vynroot)
endif
_00E_FS_NQ05_GarlicCountGlobal.Value = PlayerREF.GetItemCount(Garlic)
_00E_FS_NQ05_MothWingMonarchCountGlobal.Value = PlayerREF.GetItemCount(MothWingMonarch)
@ -20,13 +24,12 @@ EndEvent
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If FS_NQ05.GetStage() != 35
If FS_NQ05.GetStage() > 35
if akBaseItem != SkeeverTail ; keep the rarest item as filter
RemoveInventoryEventFilter(Garlic)
RemoveInventoryEventFilter(MothWingMonarch)
RemoveInventoryEventFilter(Vynroot)
endif
endif
AddInventoryEventFilter(_00E_EmptyFormlist) ; in case clearing fails
RemoveInventoryEventFilter(Garlic)
RemoveInventoryEventFilter(MothWingMonarch)
RemoveInventoryEventFilter(Vynroot)
RemoveInventoryEventFilter(SkeeverTail)
Self.Clear()
return
endif
@ -55,13 +58,12 @@ EndEvent
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
If FS_NQ05.GetStage() != 35
If FS_NQ05.GetStage() > 35
if akBaseItem != SkeeverTail
RemoveInventoryEventFilter(Garlic)
RemoveInventoryEventFilter(MothWingMonarch)
RemoveInventoryEventFilter(Vynroot)
endif
endif
AddInventoryEventFilter(_00E_EmptyFormlist) ; in case clearing fails
RemoveInventoryEventFilter(Garlic)
RemoveInventoryEventFilter(MothWingMonarch)
RemoveInventoryEventFilter(Vynroot)
RemoveInventoryEventFilter(SkeeverTail)
Self.Clear()
return
endif
@ -132,3 +134,5 @@ GlobalVariable Property _00E_FS_NQ05_SkeeverTailCountGlobal Auto
GlobalVariable Property _00E_FS_NQ05_VynrootCountGlobal Auto
Actor Property PlayerREF Auto
FormList Property _00E_EmptyFormlist Auto

Loading…
Cancel
Save