Reworked Mesmerize to work without SKSE

This commit is contained in:
Eddoursul 2024-02-12 15:14:17 +01:00
parent 23831ed3da
commit 589285c5da
3 changed files with 12 additions and 8 deletions

BIN
Mezmerize update.esp Normal file

Binary file not shown.

Binary file not shown.

View File

@ -19,14 +19,14 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
Else Else
PlayerREF.AddPerk(_00E_FS_MesmerizePerk)
if SKSE.GetVersion() if SKSE.GetVersion()
float fBuff = ((PlayerREF.GetActorValue("Illusion")/6 as Int) + Self.GetMagnitude())/100 fMagnitude = GetMagnitude()
endif
_00E_FS_MesmerizePerk.SetNthEntryValue(0, 0, (1.0-fBuff)) float fBuff = ((PlayerREF.GetActorValue("Illusion") / 6 as Int) + fMagnitude) / 100
_00E_FS_MesmerizePerk.SetNthEntryValue(1, 0, (1.0+fBuff)) PlayerREF.SetActorValue(sActorValue, fBuff)
endIf
PlayerREF.AddPerk(_00E_FS_MesmerizePerk)
EndIf EndIf
@ -35,6 +35,7 @@ EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Event OnEffectFinish(Actor akTarget, Actor akCaster)
PlayerREF.RemovePerk(_00E_FS_MesmerizePerk) PlayerREF.RemovePerk(_00E_FS_MesmerizePerk)
PlayerREF.SetActorValue(sActorValue, 0.0)
EndEvent EndEvent
@ -42,6 +43,9 @@ EndEvent
; PROPERTIES ; PROPERTIES
;===================================================================================== ;=====================================================================================
Float Property fMagnitude = 7.0 Auto
String Property sActorValue = "Variable07" Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Perk Property _00E_FS_MesmerizePerk Auto Perk Property _00E_FS_MesmerizePerk Auto