Replaced scripted implementation of silent shouts with a perk
This commit is contained in:
parent
8d71367ba4
commit
79b6c5f6fe
BIN
Silent shouts perk.esp
Normal file
BIN
Silent shouts perk.esp
Normal file
Binary file not shown.
Binary file not shown.
@ -51,18 +51,6 @@ EndEvent
|
|||||||
|
|
||||||
Event OnPlayerLoadGame()
|
Event OnPlayerLoadGame()
|
||||||
If self == PlayerREF ; A check just in case. Most likely this condition is always True
|
If self == PlayerREF ; A check just in case. Most likely this condition is always True
|
||||||
If GetState() != "RealPlayer" ; Post-1.2.5.0 version update
|
|
||||||
GoToState("RealPlayer")
|
|
||||||
|
|
||||||
; In the previous version the player could end with a permament QuietCasting perk by mistake.
|
|
||||||
If HasPerk(QuietCasting)
|
|
||||||
RemovePerk(QuietCasting)
|
|
||||||
Debug.Trace(self + ": Removed QuietCasting perk on version update")
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
RefreshCooldownSpell()
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
RegisterForActions()
|
RegisterForActions()
|
||||||
EndIf
|
EndIf
|
||||||
EndEvent
|
EndEvent
|
||||||
@ -101,21 +89,6 @@ State RealPlayer
|
|||||||
; _00E_A1_Tutorial_Onslaught.ShowAsHelpMessage("Onslaught", 5, 1, 1)
|
; _00E_A1_Tutorial_Onslaught.ShowAsHelpMessage("Onslaught", 5, 1, 1)
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If actionType == 3 && _00E_Game_SilentShouts.HasForm(shoutUsed)
|
|
||||||
QuietCastCounter += 1
|
|
||||||
Int curQuietCastCounter = QuietCastCounter
|
|
||||||
AddPerk(QuietCasting)
|
|
||||||
|
|
||||||
; The real RemovePerk(QuietCasting) should happen in OnSpellCast.
|
|
||||||
; But in case it won't for any reason, we'll wait for fShoutTime2 setting + extra padding, and force it.
|
|
||||||
Float waitTime = Game.GetGameSettingFloat("fShoutTime2") + 1.5
|
|
||||||
Utility.Wait(waitTime)
|
|
||||||
|
|
||||||
If QuietCastCounter == curQuietCastCounter
|
|
||||||
RemovePerk(QuietCasting)
|
|
||||||
EndIf
|
|
||||||
EndIf
|
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnSpellCast(Form maybeSpell)
|
Event OnSpellCast(Form maybeSpell)
|
||||||
@ -128,7 +101,6 @@ State RealPlayer
|
|||||||
If (castSpell == LastShoutUsed.GetNthSpell(0) || castSpell == LastShoutUsed.GetNthSpell(1) || castSpell == LastShoutUsed.GetNthSpell(2))
|
If (castSpell == LastShoutUsed.GetNthSpell(0) || castSpell == LastShoutUsed.GetNthSpell(1) || castSpell == LastShoutUsed.GetNthSpell(2))
|
||||||
LastShoutUsed = None
|
LastShoutUsed = None
|
||||||
CooldownMagicEffect.OnShoutCast()
|
CooldownMagicEffect.OnShoutCast()
|
||||||
RemovePerk(QuietCasting)
|
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
@ -136,21 +108,10 @@ State RealPlayer
|
|||||||
|
|
||||||
EndState
|
EndState
|
||||||
|
|
||||||
|
|
||||||
Event OnActorAction(int actionType, Actor akActor, Form source, int slot)
|
|
||||||
; If we get here, most likely it's not the real player, it's a copy.
|
|
||||||
; So clear its pre-1.2.5.0 action registrations to not waste resources on this ever again.
|
|
||||||
If self != PlayerREF
|
|
||||||
UnregisterForActions()
|
|
||||||
EndIf
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
;=====================================================================================
|
;=====================================================================================
|
||||||
|
|
||||||
Formlist Property _00E_Game_SilentShouts Auto
|
|
||||||
|
|
||||||
Actor Property PlayerREF Auto
|
Actor Property PlayerREF Auto
|
||||||
|
|
||||||
;Message Property _00E_A1_Tutorial_Onslaught Auto
|
;Message Property _00E_A1_Tutorial_Onslaught Auto
|
||||||
@ -160,11 +121,7 @@ Spell Property _00E_Game_AbTalentCooldown Auto
|
|||||||
|
|
||||||
GlobalVariable Property _00E_Game_TalentControl_CooldownResetDesired Auto
|
GlobalVariable Property _00E_Game_TalentControl_CooldownResetDesired Auto
|
||||||
|
|
||||||
Perk Property QuietCasting Auto
|
|
||||||
|
|
||||||
Shout Property _00E_A1_Onslaught Auto
|
Shout Property _00E_A1_Onslaught Auto
|
||||||
|
|
||||||
_00E_Game_TalentCooldownSC CooldownMagicEffect = None
|
_00E_Game_TalentCooldownSC CooldownMagicEffect = None
|
||||||
Shout LastShoutUsed = None
|
Shout LastShoutUsed = None
|
||||||
|
|
||||||
Int QuietCastCounter = 0
|
|
||||||
|
Loading…
Reference in New Issue
Block a user