4
Fork 0

Moved armor set listener to a separate quest

remove-levelsystem
Eddoursul 4 months ago
parent cc4c637b52
commit d66445da5b
  1. BIN
      Armor set listener.esp
  2. BIN
      Skyrim.esm
  3. BIN
      scripts/_00E_ArmorSetListener.pex
  4. BIN
      scripts/_00e_armorsetscript.pex
  5. 22
      source/scripts/_00E_ArmorSetListener.psc
  6. 16
      source/scripts/_00e_armorsetscript.psc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,22 @@
Scriptname _00E_ArmorSetListener extends Quest Hidden
Function OnArmorSetBonusAdded(Bool bFullSet)
Sound.SetInstanceVolume(MAGIllusionCharm.Play(PlayerREF), 0.4) ; Play MAGIllusionCharm at lower volume
If bFullSet && ! bSetAchievementUnlocked
Steam.UnlockAchievement("END_SET_01")
bSetAchievementUnlocked = True
EndIf
EndFunction
Function OnArmorSetBonusRemoved()
_00E_ArmorSetScript_sSetBonusRemoved.Show()
EndFunction
bool bSetAchievementUnlocked = false
Sound Property MAGIllusionCharm Auto
Actor Property PlayerRef Auto
Message Property _00E_ArmorSetScript_sSetBonusRemoved Auto

@ -7,7 +7,7 @@ Scriptname _00E_ArmorSetScript extends ObjectReference
Event OnEquipped(Actor akActor)
If akActor == PlayerREF
;this event won't be sent by SKSE / SkyUI when using he Equip Mode of SkyUI to directly equip an item from another container.
;this event won't be sent by SKSE / SkyUI when using the Equip Mode of SkyUI to directly equip an item from another container.
;the same goes for the OnObjectEquipped event, hence we need the work around in OnContainerChanged
UpdateSpells()
EndIf
@ -43,15 +43,9 @@ EndEvent
Function UpdateSpells()
Int iIndex
If Levelsystem == None
Levelsystem = Game.GetFormFromFile(0x00010AA2, "Skyrim.esm") As _00E_Questfunctions
EndIf
Int iIndex = 0
Int nEquippedPieces = 0
Form[] setPieces = __Config_SetList.ToArray()
iIndex = 0
While iIndex < setPieces.Length
If PlayerREF.IsEquipped(setPieces[iIndex] as Armor)
nEquippedPieces += 1
@ -86,9 +80,9 @@ Function UpdateSpells()
EndWhile
If bSpellAdded
Levelsystem.OnArmorSetBonusAdded(nEquippedPieces >= setPieces.Length)
ArmorSetListener.OnArmorSetBonusAdded(nEquippedPieces >= setPieces.Length)
ElseIf bSpellRemoved
Levelsystem.OnArmorSetBonusRemoved()
ArmorSetListener.OnArmorSetBonusRemoved()
EndIf
EndFunction
@ -101,7 +95,7 @@ EndFunction
Bool Property __Config_5Pieces Auto
{Does this set have five pieces? Default: False}
_00E_Questfunctions Property Levelsystem Auto
_00E_ArmorSetListener Property ArmorSetListener Auto
GlobalVariable Property __Config_SetGlobal Auto
{The global associated with this set. Example _25E_HSet_FallenOneGlobal.}

Loading…
Cancel
Save