1
Fork 0

Merge branch 'development' into merging + added remaining gavrant's fixes

# Conflicts:
#	scripts/_00e_questfunctions.pex
#	source/scripts/_00e_questfunctions.psc
development
Eddoursul 3 years ago
parent 0eae024fce
commit bd6ebd82b7
  1. BIN
      GavrantFixes_210510.esp
  2. BIN
      meshes/actors/mammoth/character assets/skeleton_triceratops.nif
  3. BIN
      meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif
  4. BIN
      meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif
  5. BIN
      scripts/_00e_apparitionfxscript.pex
  6. BIN
      scripts/_00e_bedscript.pex
  7. BIN
      scripts/_00e_blockactivationforplayer.pex
  8. BIN
      scripts/_00e_bonespiritcontrolscript.pex
  9. BIN
      scripts/_00e_class_openclassmenuscript.pex
  10. BIN
      scripts/_00e_class_perkscript.pex
  11. BIN
      scripts/_00e_cqc05_functions.pex
  12. BIN
      scripts/_00e_cqj05_functions.pex
  13. BIN
      scripts/_00e_frozenmescript.pex
  14. BIN
      scripts/_00e_fs_affinity_absoulcallersc.pex
  15. BIN
      scripts/_00e_fs_affinity_ghostblade_onattack.pex
  16. BIN
      scripts/_00e_fs_dreameatersc.pex
  17. BIN
      scripts/_00e_fs_nq07_dinnercontrolsc.pex
  18. BIN
      scripts/_00e_fs_nqr05_perversionsc.pex
  19. BIN
      scripts/_00e_fs_psychosissc.pex
  20. BIN
      scripts/_00e_fs_theriantrophist_allowtemptsc.pex
  21. BIN
      scripts/_00e_fs_voicedletterscript.pex
  22. BIN
      scripts/_00e_game_skillmenusc.pex
  23. BIN
      scripts/_00e_mq10a_functions.pex
  24. BIN
      scripts/_00e_mq12c_functions.pex
  25. BIN
      scripts/_00e_mq12c_harbirsiegesc.pex
  26. BIN
      scripts/_00e_mq13a_functions.pex
  27. BIN
      scripts/_00e_mq13a_grammophonesc.pex
  28. BIN
      scripts/_00e_nq_g_07_functions.pex
  29. BIN
      scripts/_00e_perkblutrauschffaimedscript.pex
  30. BIN
      scripts/_00e_phasmalist_newapparitionalias.pex
  31. BIN
      scripts/_00e_phasmalist_workbench.pex
  32. BIN
      scripts/_00e_questfunctions.pex
  33. BIN
      scripts/_00e_smokingpipescript.pex
  34. BIN
      scripts/_00e_theriantrophist_blockcraftingsc.pex
  35. BIN
      scripts/_00e_theriantrophist_wolfattributes.pex
  36. BIN
      scripts/_00e_weathercontrolscriptsc.pex
  37. BIN
      scripts/_60e_fs_mystical_thoughtimplosionsc.pex
  38. BIN
      scripts/_fs_phasmalist_controlquest.pex
  39. BIN
      scripts/frostslowfix.pex
  40. BIN
      scripts/fs_nq05_alchemyscript.pex
  41. BIN
      scripts/fs_nq07_alchemyscript.pex
  42. BIN
      scripts/fxwitchlightattachscript.pex
  43. 19
      source/scripts/_00e_bedscript.psc
  44. 4
      source/scripts/_00e_blockactivationforplayer.psc
  45. 4
      source/scripts/_00e_class_openclassmenuscript.psc
  46. 182
      source/scripts/_00e_class_perkscript.psc
  47. 11
      source/scripts/_00e_cqc05_functions.psc
  48. 7
      source/scripts/_00e_cqj05_functions.psc
  49. 207
      source/scripts/_00e_frozenmescript.psc
  50. 6
      source/scripts/_00e_fs_affinity_absoulcallersc.psc
  51. 1
      source/scripts/_00e_fs_affinity_ghostblade_onattack.psc
  52. 2
      source/scripts/_00e_fs_dreameatersc.psc
  53. 2
      source/scripts/_00e_fs_nq07_dinnercontrolsc.psc
  54. 6
      source/scripts/_00e_fs_nqr05_perversionsc.psc
  55. 38
      source/scripts/_00e_fs_psychosissc.psc
  56. 39
      source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc
  57. 3
      source/scripts/_00e_game_skillmenusc.psc
  58. 3
      source/scripts/_00e_mq10a_functions.psc
  59. 3
      source/scripts/_00e_mq12c_functions.psc
  60. 11
      source/scripts/_00e_mq12c_harbirsiegesc.psc
  61. 9
      source/scripts/_00e_mq13a_functions.psc
  62. 124
      source/scripts/_00e_mq13a_grammophonesc.psc
  63. 5
      source/scripts/_00e_nq_g_07_functions.psc
  64. 5
      source/scripts/_00e_perkblutrauschffaimedscript.psc
  65. 167
      source/scripts/_00e_phasmalist_newapparitionalias.psc
  66. 118
      source/scripts/_00e_phasmalist_workbench.psc
  67. 11
      source/scripts/_00e_questfunctions.psc
  68. 8
      source/scripts/_00e_smokingpipescript.psc
  69. 37
      source/scripts/_00e_theriantrophist_blockcraftingsc.psc
  70. 6
      source/scripts/_00e_theriantrophist_wolfattributes.psc
  71. 16
      source/scripts/_00e_weathercontrolscriptsc.psc
  72. 55
      source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc
  73. 9
      source/scripts/_fs_phasmalist_controlquest.psc
  74. 56
      source/scripts/frostslowfix.psc
  75. 31
      source/scripts/fs_nq05_alchemyscript.psc
  76. 28
      source/scripts/fs_nq07_alchemyscript.psc
  77. 52
      source/scripts/fxwitchlightattachscript.psc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,23 +1,24 @@
Scriptname _00E_BedScript extends ObjectReference Scriptname _00E_BedScript extends ObjectReference
{Magically bypasses the whole waiting/resting-system thingy} {Magically bypasses the whole waiting/resting-system thingy}
Quest Property MQ14 Auto
Message Property _00E_MQ14_CantRestNowMessage Auto
Actor Property PlayerREF Auto
Bool bActivationBlocked = False
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
if (akActionRef == PlayerREF) If MQ14.GetStage() < 20
if !(MQ14.GetStage() >= 20)
Game.SetInChargen(False, False, False) Game.SetInChargen(False, False, False)
Self.Activate(PlayerREF, True) Self.Activate(PlayerREF, True)
Game.SetInChargen(False, True, False) Game.SetInChargen(False, True, False)
Else Else
_00E_MQ14_CantRestNowMessage.Show() _00E_MQ14_CantRestNowMessage.Show()
EndIf EndIf
endif
bActivationBlocked = False
EndIf
EndEvent EndEvent
Actor Property PlayerREF Auto
Quest Property MQ14 Auto
Message Property _00E_MQ14_CantRestNowMessage Auto

@ -9,7 +9,9 @@ EndEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer() && Self.IsActivationBlocked() If akActionRef == Game.GetPlayer() && Self.IsActivationBlocked()
_00E_BlockedMessage.Show() If _00E_BlockedMessage
_00E_BlockedMessage.Show()
EndIf
Else Else
Self.Activate(akActionRef, True) Self.Activate(akActionRef, True)
EndIf EndIf

@ -26,7 +26,7 @@ Event OnEffectStart(Actor TheTarget, Actor TheCaster)
Else Else
if !(PlayerREF.IsInLocation(_00E_ClassMenuLocation)) if !(PlayerREF.IsInLocation(_00E_ClassMenuLocation))
If _00E_Meditate_Allowed.GetValueInt() == 0 If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace || _00E_Meditate_Allowed.GetValueInt() == 0
_00E_Meditation_sCantMeditateNow.Show() _00E_Meditation_sCantMeditateNow.Show()
bDoSettleDownWait = False bDoSettleDownWait = False
ElseIf PlayerREF.IsInCombat() ElseIf PlayerREF.IsInCombat()
@ -124,3 +124,5 @@ GlobalVariable Property _00E_Meditate_FirstPerson Auto
GlobalVariable Property _00E_Meditate_Allowed Auto GlobalVariable Property _00E_Meditate_Allowed Auto
ReferenceAlias Property Player Auto ReferenceAlias Property Player Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto

@ -6,103 +6,101 @@ Import Game
; EVENTS ; EVENTS
;===================================================================================== ;=====================================================================================
Event onActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If akActionRef != PlayerREF
Return
EndIf
int iButton GoToState("DoNothing")
iButton = __Config_DisplayMessage.Show() Int iButton = __Config_DisplayMessage.Show()
If __Config_MultipleLevelsConfirm If __Config_MultipleLevelsConfirm
__Config_MultipleLevels=true __Config_MultipleLevels = True
EndIf EndIf
If (__Config_MultipleLevels) && !(__Config_MultipleLevelsTwoLevels)
If iButton < 3 If __Config_MultipleLevels
If (__Config_TeachesTalent)
TeachTalent() If __Config_MultipleLevelsTwoLevels
Elseif !(__Config_TeachesTalent) If iButton < 2
TeachPerk() TeachPerk()
FinalizeUnlock()
Return
EndIf
Else ; __Config_MultipleLevelsTwoLevels == False
If iButton < 3
If __Config_TeachesTalent
TeachTalent()
Else
TeachPerk()
EndIf
FinalizeUnlock()
Return
EndIf EndIf
TalentPoints.SetValue(TalentPoints.GetValueInt() - 1)
PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt())
PlayVisuals()
EndIf EndIf
ElseIf (__Config_MultipleLevels) && (__Config_MultipleLevelsTwoLevels) Else ; __Config_MultipleLevels == False
If iButton < 2
TeachPerk()
TalentPoints.SetValue(TalentPoints.GetValueInt() - 1)
PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt())
PlayVisuals()
EndIf
Elseif !__Config_MultipleLevels
If iButton == 0 If iButton == 0
PlayerREF.AddPerk(__Config_PerkToTeach1) TeachFirstPerk()
If __Config_QuestToStart != None FinalizeUnlock()
__Config_QuestToStart.Start() Return
EndIf
If ( AdditionalPerk )
PlayerREF.AddPerk(AdditionalPerk)
EndIf
If sendModEventOnUnlock
SendModEvent(modEventName)
Endif
TalentPoints.SetValue(TalentPoints.GetValueInt() - 1)
PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt())
PlayVisuals()
EndIf EndIf
EndIf EndIf
GoToState("")
EndEvent EndEvent
State DoNothing
Event OnActivate(ObjectReference akActionRef)
; Do nothing
EndEvent
EndState
;===================================================================================== ;=====================================================================================
; FUNCTIONS ; FUNCTIONS
;===================================================================================== ;=====================================================================================
Function TeachPerk() Function TeachPerk()
If PlayerREF.HasPerk(__Config_PerkToTeach1) == False
if !(PlayerREF.HasPerk(__Config_PerkToTeach1)) TeachFirstPerk()
PlayerREF.AddPerk(__Config_PerkToTeach1) ElseIf PlayerREF.HasPerk(__Config_PerkToTeach2) == False
If __Config_QuestToStart != None
__Config_QuestToStart.start()
EndIf
if sendModEventOnUnlock
SendModEvent(modEventName)
Endif
if ( AdditionalPerk )
PlayerREF.AddPerk(AdditionalPerk)
endif
elseif (PlayerREF.HasPerk(__Config_PerkToTeach1)) && !(PlayerREF.HasPerk(__Config_PerkToTeach2))
PlayerREF.AddPerk(__Config_PerkToTeach2) PlayerREF.AddPerk(__Config_PerkToTeach2)
else Else
PlayerREF.AddPerk(__Config_PerkToTeach3) PlayerREF.AddPerk(__Config_PerkToTeach3)
endif EndIf
EndFunction EndFunction
Function TeachTalent() Function TeachTalent()
If Game.IsWordUnlocked(__Config_WordToTeach1) == False
if !(Game.IsWordUnlocked(__Config_WordToTeach1))
PlayerREF.AddShout(__Config_TalentToTeach) PlayerREF.AddShout(__Config_TalentToTeach)
WordToTeach = __Config_WordToTeach1 WordToTeach = __Config_WordToTeach1
PlayerREF.AddPerk(__Config_PerkToTeach1) TeachFirstPerk(False)
If __Config_QuestToStart != None ElseIf Game.IsWordUnlocked(__Config_WordToTeach2) == False
__Config_QuestToStart.start()
EndIf
if sendModEventOnUnlock
SendModEvent(modEventName)
Endif
elseif (Game.IsWordUnlocked(__Config_WordToTeach1)) && !(Game.IsWordUnlocked(__Config_WordToTeach2))
WordToTeach = __Config_WordToTeach2 WordToTeach = __Config_WordToTeach2
PlayerREF.AddPerk(__Config_PerkToTeach2) PlayerREF.AddPerk(__Config_PerkToTeach2)
else Else
WordToTeach = __Config_WordToTeach3 WordToTeach = __Config_WordToTeach3
PlayerREF.AddPerk(__Config_PerkToTeach3) PlayerREF.AddPerk(__Config_PerkToTeach3)
endif EndIf
Game.UnlockWord(WordToTeach) Game.UnlockWord(WordToTeach)
Game.TeachWord(WordToTeach) Game.TeachWord(WordToTeach)
SetRecoveryTime(WordToTeach) SetRecoveryTime(WordToTeach)
EndFunction
Function TeachFirstPerk(Bool bTeachAdditionalPerk = True)
PlayerREF.AddPerk(__Config_PerkToTeach1)
If __Config_QuestToStart
__Config_QuestToStart.Start()
EndIf
If AdditionalPerk && bTeachAdditionalPerk
PlayerREF.AddPerk(AdditionalPerk)
EndIf
If sendModEventOnUnlock
SendModEvent(modEventName)
EndIf
EndFunction EndFunction
Function SetRecoveryTime(WordOfPower WordToTeach) Function SetRecoveryTime(WordOfPower WordToTeach)
@ -116,56 +114,54 @@ Function SetRecoveryTime(WordOfPower WordToTeach)
__Config_TalentToTeach.SetNthRecoveryTime(1, fRecoveryTime03) __Config_TalentToTeach.SetNthRecoveryTime(1, fRecoveryTime03)
__Config_TalentToTeach.SetNthRecoveryTime(2, fRecoveryTime03) __Config_TalentToTeach.SetNthRecoveryTime(2, fRecoveryTime03)
EndIf EndIf
EndFunction EndFunction
Function PlayVisuals() Function PlayVisuals()
;Fix for ERB-1355, somehow _00E_TalentpointsRemaining was not filled in that save game on all perk activators ;Fix for ERB-1355, somehow _00E_TalentpointsRemaining was not filled in that save game on all perk activators
If _00E_TalentpointsRemaining == None If _00E_TalentpointsRemaining == None
_00E_TalentpointsRemaining = Game.GetFormFromFile(0x000431FB, "Skyrim.esm") as Message _00E_TalentpointsRemaining = Game.GetFormFromFile(0x000431FB, "Skyrim.esm") as Message
EndIf EndIf
_00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt())
_00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt() as Int)
ObjectReference MemoryPoint = Self.GetLinkedRef() ObjectReference MemoryPoint = Self.GetLinkedRef()
MAGConjureImpact.Play(PlayerREF) MAGConjureImpact.Play(PlayerREF)
MemoryPoint.PlayAnimation("PlayAnim02") MemoryPoint.PlayAnimation("PlayAnim02")
if( MemoryPoint.GetLinkedRef(TestLine) ) PlayUnlockAnimationOnLinkedRef(MemoryPoint, TestLine)
MemoryPoint.GetLinkedRef(TestLine).PlayAnimation("Unlock") PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine01)
endif PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine02)
if( MemoryPoint.GetLinkedRef(__PerkLine01) ) PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine03)
MemoryPoint.GetLinkedRef(__PerkLine01).PlayAnimation("Unlock") PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine04)
endif PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine05)
if( MemoryPoint.GetLinkedRef(__PerkLine02) ) PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine06)
MemoryPoint.GetLinkedRef(__PerkLine02).PlayAnimation("Unlock")
endif GoToState("") ; Time to unlock OnActivate
if( MemoryPoint.GetLinkedRef(__PerkLine03) )
MemoryPoint.GetLinkedRef(__PerkLine03).PlayAnimation("Unlock")
endif
if( MemoryPoint.GetLinkedRef(__PerkLine04) )
MemoryPoint.GetLinkedRef(__PerkLine04).PlayAnimation("Unlock")
endif
if( MemoryPoint.GetLinkedRef(__PerkLine05) )
MemoryPoint.GetLinkedRef(__PerkLine05).PlayAnimation("Unlock")
endif
if( MemoryPoint.GetLinkedRef(__PerkLine06) )
MemoryPoint.GetLinkedRef(__PerkLine06).PlayAnimation("Unlock")
endif
Sound unlockSound = Game.GetForm(0x0003A1E7) as Sound
Sound unlockSound = Game.GetFormFromFile(0x0003A1E7, "Skyrim.esm") as Sound
unlockSound.Play(PlayerREF) unlockSound.Play(PlayerREF)
MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8 , MemoryPoint) MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8, MemoryPoint)
_00E_UnlockClassIMOD.Apply() _00E_UnlockClassIMOD.Apply()
Utility.Wait(0.1) Utility.Wait(0.1)
_00E_Class_MemoryAbsorbFXS.Play(playerREF) _00E_Class_MemoryAbsorbFXS.Play(PlayerREF)
Utility.Wait(3) Utility.Wait(3)
_00E_Class_MemoryAbsorbFXS.Stop(playerREF) _00E_Class_MemoryAbsorbFXS.Stop(PlayerREF)
Utility.Wait(2) Utility.Wait(2)
MAGDragonPowerAbsorbManEffect.Stop(PlayerREF) MAGDragonPowerAbsorbManEffect.Stop(PlayerREF)
EndFunction
Function PlayUnlockAnimationOnLinkedRef(ObjectReference MemoryPoint, Keyword linkedKwd)
ObjectReference ref = MemoryPoint.GetLinkedRef(linkedKwd)
If ref
ref.PlayAnimation("Unlock")
EndIf
EndFunction
Function FinalizeUnlock()
TalentPoints.Mod(-1)
PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt())
PlayVisuals()
EndFunction EndFunction

@ -126,13 +126,12 @@ EndFunction
Function PlayKiss() Function PlayKiss()
; Solves "torch in body" problem while kissing
_00E_MC_CaliaREF.UnEquipItem(Torch01, True) _00E_MC_CaliaREF.UnEquipItem(Torch01, True)
;Solves "torch in body" problem while kissing
_FS_TheriantrophistControlQuest.TransformBackIfTransformed() _FS_TheriantrophistControlQuest.TransformBackIfTransformed()
if Player.GetRace() == HighElfRace If Player.GetRace() == HighElfRace
fPlayerScale = PlayerREF.GetScale() fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92)
PlayerREF.SetScale(1.0) EndIf
endif
Int iHand = 0 Int iHand = 0
if PlayerREF.GetEquippedItemType(iHand) == 11 if PlayerREF.GetEquippedItemType(iHand) == 11
@ -180,11 +179,11 @@ Function FadeOut()
CQC05_SC02_DoorREF.BlockActivation(True) CQC05_SC02_DoorREF.BlockActivation(True)
CaliaRomance.SetValueInt(1) CaliaRomance.SetValueInt(1)
PlayerREF.SetScale(1.0)
FadeToBlackIMOD.Apply() FadeToBlackIMOD.Apply()
Utility.Wait(2) Utility.Wait(2)
FadeToBlackHoldIMOD.ApplyCrossFade(1) FadeToBlackHoldIMOD.ApplyCrossFade(1)
Utility.Wait(1) Utility.Wait(1)
PlayerREF.SetScale(1.0) ; TODO, Gavrant, 2021-06-21: probably delete it. There is another revert of the scale later, in FadeBack.
_00E_MC_CaliaREF.SetUnconscious(False) _00E_MC_CaliaREF.SetUnconscious(False)
PlayerREF.SetUnconscious(False) PlayerREF.SetUnconscious(False)

@ -49,8 +49,7 @@ Function PlayKissAnimation()
_00E_QuestFunctions.EndWerewolfModeWhenTransformed() _00E_QuestFunctions.EndWerewolfModeWhenTransformed()
If Player.GetRace() == HighElfRace If Player.GetRace() == HighElfRace
fPlayerScale = PlayerREF.GetScale() fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92)
PlayerREF.SetScale(1.0)
EndIf EndIf
If PlayerREF.GetEquippedShield() != None If PlayerREF.GetEquippedShield() != None
@ -103,9 +102,9 @@ Function FadeOut()
PlayerREF.SetUnconscious(False) PlayerREF.SetUnconscious(False)
Debug.ToggleMenus() Debug.ToggleMenus()
Debug.ToggleCollisions() Debug.ToggleCollisions()
if Player.GetRace() == HighElfRace If Player.GetRace() == HighElfRace
PlayerREF.SetScale(fPlayerScale) PlayerREF.SetScale(fPlayerScale)
endif EndIf
_00E_MC_JesparREF.MoveTo(MQ13a_StarshipBedREF) _00E_MC_JesparREF.MoveTo(MQ13a_StarshipBedREF)
_00E_MC_JesparREF.MoveTo(CQJ05_SC01_JesparLayMarker) _00E_MC_JesparREF.MoveTo(CQJ05_SC01_JesparLayMarker)
PlayerREF.MoveTo(MQ13a_StarshipBedREF) PlayerREF.MoveTo(MQ13a_StarshipBedREF)

@ -6,119 +6,117 @@ Scriptname _00E_FrozenMEScript extends activemagiceffect
;===================================================================================== ;=====================================================================================
Auto State Default Auto State Default
Event OnEffectStart(Actor akTarget, Actor akCaster)
Debug.Trace(self + ", OnEffectStart (Default): akTarget = " + akTarget + "; akCaster = " + akCaster)
FrozenActor = akCaster
If FrozenActor && FrozenActor.GetAVPercentage("Health") > 0.1 && FrozenActor.HasPerk(_00E_FrozenPerk) == False
_00E_A1_ArcticWindFreezeM.Play(akTarget)
FrozenActor.AddPerk(_00E_FrozenPerk)
FrozenActor.EnableAI(False)
FrozenActor.SetAV("Paralysis", 1.0) ; Prevents movement and attacking.
GoToState("Frozen")
EndIf
Event OnEffectStart(Actor TheTarget, Actor TheCaster) Debug.Trace(self + ", OnEffectStart (Default): done")
EndEvent
FrozenActor = TheCaster
If FrozenActor.GetAVPercentage("Health") > 0.1
KillMove.SetValueInt(0)
_00E_A1_ArcticWindFreezeM.Play(TheTarget)
FrozenActor.AddPerk(_00E_FrozenPerk)
FrozenActor.EnableAI(False)
GoToState("Frozen")
EndIf
EndEvent
EndState EndState
;======================================FROZEN STATE================================ ;====================================== FROZEN STATE =================================
State Frozen State Frozen
;/
Event OnBeginState()
Debug.Trace(self + ", OnBeginState (Frozen)")
PositionMarkerRef = FrozenActor.PlaceAtMe(XMarker)
Debug.Trace(self + ", OnBeginState (Frozen): done")
EndEvent /;
Event OnUpdate() Event OnUpdate()
bHitLock = False
bHitLock = False EndEvent
EndEvent Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
Debug.Trace(self + ", OnHit: akAggressor = " + akAggressor + "; akSource = " + akSource + "; akProjectile = " + akProjectile + "; abPowerAttack = " + abPowerAttack + "; abSneakAttack = " + abSneakAttack + "; abBashAttack = " + abBashAttack + "; abBashAttack = " + abHitBlocked)
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) WPNImpactBladeVsIce.Play(FrozenActor)
WPNImpactBladeVsIce.Play(FrozenActor)
If !_00E_NoShatterNPCFormList.HasForm(FrozenActor.GetActorBase()) If FrozenActor.IsEssential()
Return
EndIf
If !PlayerREF.HasPerk(_04E_30_UNI_SongOfWinterFrostDamagePerk) Float fShatterChance
If PlayerREF.HasPerk(_04E_30_UNI_SongOfWinterFrostDamagePerk)
ShatterChance = __Config_BaseShatterChance fShatterChance = __Config_BaseShatterChance * 2.0
Else Else
fShatterChance = __Config_BaseShatterChance
ShatterChance = __Config_BaseShatterChance*2
EndIf EndIf
If !bHitLock If bHitLock == False
bHitLock = True bHitLock = True
If akSource.HasKeyword(WeaponTypeBluntWeapon) If akSource.HasKeyword(WeaponTypeBluntWeapon)
ShatterChance = (ShatterChance + __Config_ShatterChanceBluntWeaponBonus) fShatterChance += __Config_ShatterChanceBluntWeaponBonus
EndIf EndIf
If abPowerAttack
If abPowerAttack == True fShatterChance += __Config_ShatterChancePowerAttackBonus
ShatterChance = (ShatterChance + __Config_ShatterChancePowerAttackBonus)
EndIf EndIf
If ShockSpells.HasForm(akSource) If ShockSpells.HasForm(akSource)
ShatterChance = (ShatterChance + __Config_ShatterChanceShockSpellBonus) fShatterChance += __Config_ShatterChanceShockSpellBonus
fShatterChance += 1.0
EndIf EndIf
If akSource == _00E_A1_OnslaughtCloakDMG If akSource == _00E_A1_OnslaughtCloakDMG
ShatterChance = (ShatterChance + __Config_ShatterChanceOnslaughtSpellBonus) fShatterChance += __Config_ShatterChanceOnslaughtSpellBonus
If _00E_Synergy_ArcticWindOnslaught.GetValueInt() == 0 If _00E_Synergy_ArcticWindOnslaught.GetValueInt() == 0
_00E_Synergy_ArcticWindOnslaught.SetValueInt(1) _00E_Synergy_ArcticWindOnslaught.SetValueInt(1)
Levelsystem.ShowSynergyMessage() Levelsystem.ShowSynergyMessage()
EndIf EndIf
EndIf EndIf
If Utility.RandomFloat() < ShatterChance If Utility.RandomFloat() < fShatterChance
HasBeenShattered = true If bNoShatter == False
ShatterEnemy() GoToState("Finished")
GoToState("Finished") ShatterEnemy()
Debug.Trace(self + ", OnHit: shatter!")
EndIf
Else
If bNoShatter == False
RegisterForSingleUpdate(1.5)
EndIf
EndIf EndIf
EndIf
RegisterForSingleUpdate(fHitTimer)
Endif
EndIf
EndEvent
Event OnDying(Actor akKiller)
FrozenActor.EnableAI(True)
Self.Dispel()
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Debug.Trace(self + ", OnHit: done")
EndEvent
;If FrozenActor.GetAV("Health") < 1 && !_00E_NoShatterNPCFormList.HasForm(FrozenActor.GetActorBase())
; ShatterEnemy() Event OnDying(Actor akKiller)
;Else Debug.Trace(self + ", OnDying")
bNoShatter = True
EnableTargetAI()
; FrozenActor.EnableAI(True)
; Self.Dispel()
Debug.Trace(self + ", OnDying: done")
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
Debug.Trace(self + ", OnEffectFinish")
bNoShatter = True
GoToState("Finished")
_00E_A1_ArcticWindFreezeM.Play(akTarget) _00E_A1_ArcticWindFreezeM.Play(akTarget)
FrozenActor.SetAlpha(1.0, true) FrozenActor.SetAlpha(1.0, true)
;EndIf
FrozenActor.EnableAI(True) ; Debug.Trace(self + ", OnEffectFinish: distance from the marker: " + FrozenActor.GetDistance(PositionMarkerRef))
FrozenActor.RemovePerk(_00E_FrozenPerk)
If Utility.GetINIBool("bVATSDisable:VATS") == 0
KillMove.SetValueInt(1)
EndIf
GoToState("Finished")
EndEvent EnableTargetAI()
FrozenActor.RemovePerk(_00E_FrozenPerk)
; DeletePositionMarker()
Debug.Trace(self + ", OnEffectFinish: done")
EndEvent
EndState EndState
;======================================FINISHED STATE================================ ;====================================== FINISHED STATE ===============================
State Finished State Finished
@ -131,19 +129,19 @@ EndState
;===================================================================================== ;=====================================================================================
Function ShatterEnemy() Function ShatterEnemy()
; EnableTargetAI()
FrozenActor.Kill(PlayerREF) FrozenActor.Kill(PlayerREF)
Utility.Wait(0.1) Utility.Wait(0.1)
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02) FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02)
if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace If FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace
FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion) FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion)
Else Else
FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion) FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion)
EndIf EndIf
FrozenActor.SetAlpha (0.0, true)
FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart) FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart)
FrozenActor.SetAlpha(0.0, true)
FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile) FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile)
WPNImpactBladeVsIce.Play(FrozenActor) WPNImpactBladeVsIce.Play(FrozenActor)
Game.ShakeCamera(afStrength = 0.3) Game.ShakeCamera(afStrength = 0.3)
@ -154,31 +152,48 @@ Function ShatterEnemy()
Game.UnlockAchievement("END_FROZEN_01") Game.UnlockAchievement("END_FROZEN_01")
_00E_FrozenAchievementUnlocked.SetValueInt(1) _00E_FrozenAchievementUnlocked.SetValueInt(1)
EndIf EndIf
; DeletePositionMarker()
EndFunction
Function DeletePositionMarker()
If PositionMarkerRef
PositionMarkerRef.Disable()
PositionMarkerRef.Delete()
PositionMarkerRef = None
EndIf
EndFunction
Function EnableTargetAI()
If bReenabledAI == False
bReenabledAI = True
FrozenActor.SetAV("Paralysis", 0)
;/ If PositionMarkerRef
FrozenActor.MoveTo(PositionMarkerRef)
EndIf /;
FrozenActor.EnableAI(True)
EndIf
EndFunction EndFunction
;===================================================================================== ;=====================================================================================
; PROPERTIES ; PROPERTIES
;===================================================================================== ;=====================================================================================
float ShatterChance Bool bHitLock
float KillMoveChanceOriginal Bool bReenabledAI
bool HasBeenShattered Bool bNoShatter
bool bHitLock
float fHitTimer = 1.5 Actor FrozenActor
ObjectReference PositionMarkerRef
float __Config_BaseShatterChance = 0.06 Float Property __Config_BaseShatterChance = 0.06 AutoReadOnly
float __Config_ShatterChancePowerAttackBonus = 0.035 Float Property __Config_ShatterChancePowerAttackBonus = 0.035 AutoReadOnly
float __Config_ShatterChanceBluntWeaponBonus = 0.02 Float Property __Config_ShatterChanceBluntWeaponBonus = 0.02 AutoReadOnly
float __Config_ShatterChanceShockSpellBonus = 0.025 Float Property __Config_ShatterChanceShockSpellBonus = 0.025 AutoReadOnly
float __Config_ShatterChanceOnslaughtSpellBonus = 0.04 Float Property __Config_ShatterChanceOnslaughtSpellBonus = 0.04 AutoReadOnly
_00E_QuestFunctions Property Levelsystem Auto _00E_QuestFunctions Property Levelsystem Auto
Actor FrozenActor
GlobalVariable Property KillMove Auto
GlobalVariable Property _00E_Synergy_ArcticWindOnslaught Auto GlobalVariable Property _00E_Synergy_ArcticWindOnslaught Auto
GlobalVariable Property _00E_FrozenAchievementUnlocked Auto GlobalVariable Property _00E_FrozenAchievementUnlocked Auto
GlobalVariable Property _00E_AchievementsEnabled Auto GlobalVariable Property _00E_AchievementsEnabled Auto
@ -207,4 +222,4 @@ Perk Property _04E_30_UNI_SongOfWinterFrostDamagePerk Auto
Sound Property WPNImpactBladeVsIce Auto Sound Property WPNImpactBladeVsIce Auto
FormList Property _00E_NoShatterNPCFormList Auto Static Property XMarker Auto

@ -4,8 +4,10 @@ WordOfPower Property _00E_Affinity_Soulcaller_TransformApparation_Word01 Auto
Shout Property _00E_Affinity_Soulcaller_TransformApparation Auto Shout Property _00E_Affinity_Soulcaller_TransformApparation Auto
Event OnEffectStart(Actor akTarget, Actor akCaster) Event OnEffectStart(Actor akTarget, Actor akCaster)
Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) If Game.IsWordUnlocked(_00E_Affinity_Soulcaller_TransformApparation_Word01) == False
Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01)
Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01)
EndIf
akTarget.AddShout(_00E_Affinity_Soulcaller_TransformApparation) akTarget.AddShout(_00E_Affinity_Soulcaller_TransformApparation)
Endevent Endevent

@ -6,6 +6,7 @@ Spell Property _00E_FakeArrowSP Auto
Spell Property _00E_FS_Ghostblade_FakeAttackSpellSP Auto Spell Property _00E_FS_Ghostblade_FakeAttackSpellSP Auto
Event OnEffectStart(Actor akTarget, Actor akCaster) Event OnEffectStart(Actor akTarget, Actor akCaster)
Debug.Trace("_00E_FS_Affinity_Ghostblade_OnSneakAttack: OnEffectStart")
Actor akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef() Actor akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef()
If akApparition If akApparition
Int iEquippedItemType = akApparition.GetEquippedItemType(1) Int iEquippedItemType = akApparition.GetEquippedItemType(1)

@ -35,6 +35,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP) akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP)
akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP_NoSlow)
EndIf EndIf
EndEvent EndEvent
@ -69,3 +70,4 @@ Message Property _00E_FS_FakeStealthMsg Auto
Sound Property UISneakAttackM Auto Sound Property UISneakAttackM Auto
Spell Property _00E_FS_PsychosisWeaknessSP Auto Spell Property _00E_FS_PsychosisWeaknessSP Auto
Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto

@ -52,4 +52,4 @@ Potion Property FoodCabbagePotatoSoup Auto
GlobalVariable Property FS_NQ07_HoneyWineBought Auto GlobalVariable Property FS_NQ07_HoneyWineBought Auto
GlobalVariable Property FS_NQ07_ChickenCooked Auto GlobalVariable Property FS_NQ07_ChickenCooked Auto
GlobalVariable Property FS_NQ07_SoupBrewed Auto GlobalVariable Property FS_NQ07_SoupBrewed Auto

@ -41,8 +41,10 @@ Function PlayDeathFX()
SetCriticalStage(CritStage_DisintegrateEnd) SetCriticalStage(CritStage_DisintegrateEnd)
myActorBase.SetEssential(True) myActorBase.SetEssential(True)
If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp) If RewardExp > 0
; Player receives EXP If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp)
; Player receives EXP
EndIf
EndIf EndIf
EndFunction EndFunction

@ -24,42 +24,39 @@ EndEvent
;===================================================================================== ;=====================================================================================
Function CheckForPsychosis() Function CheckForPsychosis()
If akVictim.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) == False
If !akVictim.HasSpell(_00E_FS_PsychosisWeaknessSP) If akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) == False
If !akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP)
akVictim.AddSpell(_00E_FS_PsychosisCounter_01_SP, False) akVictim.AddSpell(_00E_FS_PsychosisCounter_01_SP, False)
ElseIf akVictim.HasSpell(_00E_FS_PsychosisCounter_02_SP) == False
ElseIf akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) && !akVictim.HasSpell(_00E_FS_PsychosisCounter_02_SP) akVictim.AddSpell(_00E_FS_PsychosisCounter_02_SP, False)
akVictim.AddSpell(_00E_FS_PsychosisCounter_02_SP, false)
Else Else
AddDebuff() AddDebuff()
EndIf EndIf
EndIf EndIf
EndFunction EndFunction
Function AddDebuff() Function AddDebuff()
Spell weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow
If caster == PlayerREF If caster == PlayerREF
If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist)
weaknessSpell = _00E_FS_PsychosisWeaknessSP
EndIf
_00E_FS_Psychosis_Weakened.Show() _00E_FS_Psychosis_Weakened.Show()
EndIf EndIf
float fResist = caster.GetActorValue("Illusion")/2 Float fResist = caster.GetActorValue("Illusion") * 0.5
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) weaknessSpell.SetNthEffectMagnitude(0, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) weaknessSpell.SetNthEffectMagnitude(1, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) weaknessSpell.SetNthEffectMagnitude(2, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) weaknessSpell.SetNthEffectMagnitude(3, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) weaknessSpell.SetNthEffectMagnitude(4, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) weaknessSpell.SetNthEffectMagnitude(5, fResist)
_00E_FS_PsychosisWeaknessSP.Cast(akVictim, akVictim) weaknessSpell.Cast(akVictim, akVictim)
akVictim.RemoveSpell(_00E_FS_PsychosisCounter_01_SP) akVictim.RemoveSpell(_00E_FS_PsychosisCounter_01_SP)
akVictim.RemoveSpell(_00E_FS_PsychosisCounter_02_SP) akVictim.RemoveSpell(_00E_FS_PsychosisCounter_02_SP)
EndFunction EndFunction
;===================================================================================== ;=====================================================================================
@ -71,7 +68,10 @@ Actor caster
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Perk Property _00E_Class_Sinistrope_P08_C_Illusionist Auto
Spell Property _00E_FS_PsychosisWeaknessSP Auto Spell Property _00E_FS_PsychosisWeaknessSP Auto
Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto
MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto
Spell Property _00E_FS_PsychosisCounter_01_SP Auto Spell Property _00E_FS_PsychosisCounter_01_SP Auto
Spell Property _00E_FS_PsychosisCounter_02_SP Auto Spell Property _00E_FS_PsychosisCounter_02_SP Auto

@ -1,47 +1,16 @@
Scriptname _00E_FS_Theriantrophist_AllowTempTSC extends ObjectReference Scriptname _00E_FS_Theriantrophist_AllowTempTSC extends ObjectReference
Event OnTriggerEnter(ObjectReference akActionRef) Event OnTriggerEnter(ObjectReference akActionRef)
If akActionRef == PlayerREF
if akActionRef == PlayerREF
_00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(1) _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(1)
EndIf
if bCrampyDungeon
fOriginalScale = PlayerREF.GetScale()
PlayerREF.SetScale(0.92)
endif
endif
EndEvent EndEvent
Event OnTriggerLeave(ObjectReference akActionRef) Event OnTriggerLeave(ObjectReference akActionRef)
If akActionRef == PlayerREF
if akActionRef == PlayerREF
_00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(0) _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(0)
EndIf
if bCrampyDungeon
if fOriginalScale > 0
PlayerREF.SetScale(fOriginalScale)
else
PlayerREF.SetScale(1.0)
endif
endif
endif
EndEvent EndEvent
float fOriginalScale = 1.0
bool Property bCrampyDungeon = False Auto
; This makes the werewolf a bit smaller
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
GlobalVariable Property _00E_FS_Theriantrophist_AllowTemporaryTransform Auto GlobalVariable Property _00E_FS_Theriantrophist_AllowTemporaryTransform Auto

@ -39,8 +39,7 @@ Event OnKeyDown(Int KeyCode)
If KeyCode == iHeroMenuKeycode || (MenuOpen && (KeyCode == iExitHeroMenuKeycode1 || KeyCode == iExitHeroMenuKeycode2)) If KeyCode == iHeroMenuKeycode || (MenuOpen && (KeyCode == iExitHeroMenuKeycode1 || KeyCode == iExitHeroMenuKeycode2))
If !MenuOpen If !MenuOpen
If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && bReadyToOpen && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location && bReadyToOpen
bReadyToOpen = False
bReadyToOpen = False bReadyToOpen = False
InitializeActorValueInfos() InitializeActorValueInfos()
OpenSkillmenu() OpenSkillmenu()

@ -15,8 +15,7 @@ Function SetUpScene()
MQ10a_SC1_HeartParentREF.Enable() MQ10a_SC1_HeartParentREF.Enable()
Levelsystem.RemoveSilence() Levelsystem.RemoveSilence()
PlayerREF.MoveTo(PlayerStartMarkerNew) PlayerREF.MoveTo(PlayerStartMarkerNew)
fPlayerScale = PlayerREF.GetScale() fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85)
PlayerREF.SetScale(0.85)
Levelsystem.SkipTimeToHour(18.4) Levelsystem.SkipTimeToHour(18.4)
Game.ForceFirstPerson() Game.ForceFirstPerson()
_00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0 _00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0

@ -254,8 +254,7 @@ Function StartSC03()
_00E_QuestFunctions.PlayerAIWalkStop() _00E_QuestFunctions.PlayerAIWalkStop()
Game.ShowFirstPersonGeometry(False) Game.ShowFirstPersonGeometry(False)
Game.RequestAutoSave() Game.RequestAutoSave()
fPlayerScale = PlayerREF.GetScale() fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85)
PlayerREF.SetScale(0.85)
TimeScale.SetValue(0.1) TimeScale.SetValue(0.1)
Levelsystem.SkipTimeToHour(18.5) Levelsystem.SkipTimeToHour(18.5)
ImageSpaceModifier.RemoveCrossFade(3) ImageSpaceModifier.RemoveCrossFade(3)

@ -6,8 +6,7 @@ Scriptname _00E_MQ12c_HarbirSiegeSC extends ObjectReference Conditional
Event OnTriggerEnter(ObjectReference akActionRef) Event OnTriggerEnter(ObjectReference akActionRef)
If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF If akActionRef == PlayerREF
_00E_EnderalOvercast.SetActive(True)
bInTrigger = True bInTrigger = True
RegisterForSingleUpdate(1) RegisterForSingleUpdate(1)
SpotPlayer() SpotPlayer()
@ -17,9 +16,8 @@ EndEvent
Event OnTriggerLeave(ObjectReference akActionRef) Event OnTriggerLeave(ObjectReference akActionRef)
If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF If akActionRef == PlayerREF
bInTrigger = False bInTrigger = False
Weather.ReleaseOverride()
if MQ12c_OpenFire.GetValueInt() == 1 if MQ12c_OpenFire.GetValueInt() == 1
StopFireOnPlayer() StopFireOnPlayer()
EndIf EndIf
@ -49,6 +47,7 @@ State KillPlayerState
EndEvent EndEvent
EndState EndState
;===================================================================================== ;=====================================================================================
; FUNCTIONS ; FUNCTIONS
;===================================================================================== ;=====================================================================================
@ -150,13 +149,9 @@ Message Property _00E_MQ12c_CaughtByNehrimese Auto
MusicType Property _00E_Music_Combat_BonehunterNoCond Auto MusicType Property _00E_Music_Combat_BonehunterNoCond Auto
Weather Property _00E_EnderalOvercast Auto
Sound Property MAGVampireSunlight Auto Sound Property MAGVampireSunlight Auto
Spell Property _00E_MQ12c_BallistaSpell Auto Spell Property _00E_MQ12c_BallistaSpell Auto
Quest Property MQ12c Auto
Topic Property MQ12c_D01_NehrimeseScoutBranchTopic Auto Topic Property MQ12c_D01_NehrimeseScoutBranchTopic Auto
Topic Property BanditDialogue_NormalToCombat Auto Topic Property BanditDialogue_NormalToCombat Auto

@ -326,10 +326,13 @@ Function CleanUpAndSetUpSC07()
PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(0), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(0), false, true)
PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(1), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(1), false, true)
PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true)
If PlayerREF.GetActorBase().GetRace() == HighElfRace && PlayerREF.GetActorBase().GetSex() == 0 ; TODO, Gavrant, 2021-06-21: No idea what the commented-out code below was supposed to do.
; But it would conflict with the follow-up romance kiss scenes that attempt to do the same, but for both sexes of HighElfRace
; Why only for males and why no scale reverts if no romance happens are a mystery. Target this for later purge.
;/ If PlayerREF.GetActorBase().GetRace() == HighElfRace && PlayerREF.GetActorBase().GetSex() == 0
PlayerREF.SetScale(0.92) PlayerREF.SetScale(0.92)
EndIf EndIf /;
Weather.ReleaseOverride() Weather.ReleaseOverride()
MQ13a_Door02_REF.Enable() MQ13a_Door02_REF.Enable()

@ -1,21 +1,127 @@
Scriptname _00E_MQ13a_GrammophoneSC extends ObjectReference Scriptname _00E_MQ13a_GrammophoneSC extends ObjectReference
Event OnUpdate() Actor Property PlayerREF Auto
Sound Property _00E_MUS_Special_DrachenflugM Auto
Message Property _00E_PlayerhousingKoppophonVolume Auto
Int iSoundID = -1
Float fVolume = 0.5
Bool bMusicLocked = False
Float Property MUSIC_LENGTH = 243.0 AutoReadOnly
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function PlayMusic(Sound musicSound, Float fMusicLength)
If fVolume <= 0.0 || fVolume > 1.0
fVolume = 0.5
EndIf
RegisterForModEvent("BardsLoadGame", "OnBardsLoadGame")
iSoundID = musicSound.Play(Self)
Sound.SetInstanceVolume(iSoundID, fVolume)
RegisterForSingleUpdate(_00E_QuestFunctions.AdjustTimePeriodByEngineTimerError(fMusicLength))
GoToState("")
_00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0)
EndFunction
Function ChangeMusicVolume()
If fVolume >= 0.0 && fVolume < 1.0
fVolume += 0.25
Else ; fVolume >= 1.0 or something is wrong with fVolume
fVolume = 0.0
EndIf
Sound.SetInstanceVolume(iSoundID, fVolume)
_00E_PlayerhousingKoppophonVolume.Show(fVolume * 100.0)
EndFunction
Function StopMusic()
bMusicLocked = True
GoToState("DoneCleanup")
UnregisterForModEvent("BardsLoadGame")
UnregisterForUpdate()
If iSoundID != -1
Sound.StopInstance(iSoundID)
iSoundID = -1
EndIf
bMusicLocked = False
EndFunction
Function TryStopMusic()
If bMusicLocked == False
StopMusic()
Else
RegisterForSingleUpdate(0.5)
EndIf
EndFunction
bIsPlaying = False ;=====================================================================================
; EVENTS
;=====================================================================================
Event OnInit()
GoToState("DoneCleanup")
EndEvent EndEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF && bMusicLocked == False
bMusicLocked = True
If !bIsPlaying If iSoundID == -1
bIsPlaying = True PlayMusic(_00E_MUS_Special_DrachenflugM, MUSIC_LENGTH)
_00E_MUS_Special_DrachenflugM.Play(Self) Else
RegisterForSingleUpdate(160) ChangeMusicVolume()
EndIf
bMusicLocked = False
EndIf EndIf
EndEvent EndEvent
bool bIsPlaying Event OnUpdate()
TryStopMusic()
EndEvent
Event OnBardsLoadGame(string eventName, string strArg, float numArg, Form sender)
; Player just loaded a save with the gramophone playing. The sound is dead by now.
TryStopMusic()
EndEvent
Event OnCellAttach()
TryStopMusic()
EndEvent
Event OnLoad()
TryStopMusic()
EndEvent
Event OnCellDetach()
TryStopMusic()
EndEvent
Event OnUnload()
TryStopMusic()
EndEvent
State DoneCleanup
Event OnCellAttach()
; Do nothing
EndEvent
Event OnLoad()
; Do nothing
EndEvent
Event OnCellDetach()
; Do nothing
EndEvent
Sound Property _00E_MUS_Special_DrachenflugM Auto Event OnUnload()
; Do nothing
EndEvent
EndState

@ -486,8 +486,7 @@ EndFunction
Function PlayKiss() Function PlayKiss()
If PlayerREF.GetActorBase().GetRace() == HighElfRace If PlayerREF.GetActorBase().GetRace() == HighElfRace
fPlayerScale = PlayerREF.GetScale() fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92)
PlayerREF.SetScale(0.92)
EndIf EndIf
PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true)
@ -529,9 +528,7 @@ Function FadeOut()
PlayerREF.RemoveSpell(_00E_Game_abSlowTime) PlayerREF.RemoveSpell(_00E_Game_abSlowTime)
If PlayerREF.GetActorBase().GetRace() == HighElfRace If PlayerREF.GetActorBase().GetRace() == HighElfRace
PlayerREF.SetScale(fPlayerScale) PlayerREF.SetScale(fPlayerScale)
EndIf EndIf
PlayerREF.SetUnconscious(False) PlayerREF.SetUnconscious(False)

@ -0,0 +1,5 @@
Scriptname _00E_PerkBlutrauschFFAimedScript extends activemagiceffect
Event OnEffectStart(Actor akTarget, Actor akCaster)
Debug.Trace("Bloodlust: OnEffectStart")
EndEvent

@ -47,6 +47,8 @@ Int Property iGhostlyWarriorBoostArmorSkill1 = 7 AutoReadOnly
Int Property iGhostlyWarriorBoostArmorSkill2 = 17 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill2 = 17 AutoReadOnly
Int Property iGhostlyWarriorBoostArmorSkill3 = 30 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill3 = 30 AutoReadOnly
Float Property DEFAULT_HEAL_RATE = 50.0 AutoReadOnly
Explosion Property _00E_Phasmalist_EnterWorldExp Auto Explosion Property _00E_Phasmalist_EnterWorldExp Auto
Perk Property _00E_Class_Phasmalist_P03_Talent_SummonApparation_01 Auto Perk Property _00E_Class_Phasmalist_P03_Talent_SummonApparation_01 Auto
@ -98,6 +100,8 @@ _00E_Phasmalist_TrinketSC SummonTrinket
; Needed for the failsafe in OnLoadGame() and some other shenanigans ; Needed for the failsafe in OnLoadGame() and some other shenanigans
Actor Property AliasFailsafeRef = None Auto Hidden Actor Property AliasFailsafeRef = None Auto Hidden
Bool bTeleportHealRate = False
;===================================================================================== ;=====================================================================================
; SUMMON & SETUP ; SUMMON & SETUP
@ -108,6 +112,7 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo
SummonTrinket = trinket SummonTrinket = trinket
bActivationBusy = bPhasmalismTankMode ; Reset just in case bActivationBusy = bPhasmalismTankMode ; Reset just in case
bTeleportHealRate = False ; Reset just in case
_00E_Phasmalist_IsApparitionSummoned.SetValue(1) _00E_Phasmalist_IsApparitionSummoned.SetValue(1)
Setup() ; init stats before any armor buffs are applied Setup() ; init stats before any armor buffs are applied
@ -158,11 +163,8 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo
EndFunction EndFunction
Function PlaySummonExplosion(ObjectReference markerRef) Function PlaySummonExplosion(ObjectReference markerRef)
ObjectReference expMarker = markerRef.placeAtMe(XMarker) ObjectReference expMarker = _PlaceExplosionEx(_00E_Phasmalist_EnterWorldExp, markerRef, 15.0)
expMarker.MoveTo(markerRef, 0.0, 0.0, 15) _DeleteMarker(expMarker)
expMarker.PlaceAtMe(_00E_Phasmalist_EnterWorldExp)
expMarker.Disable()
expMarker.Delete()
EndFunction EndFunction
Int Property BOOST_CLASS_MAGE = 0 AutoReadOnly Int Property BOOST_CLASS_MAGE = 0 AutoReadOnly
@ -219,11 +221,19 @@ EndFunction
Function SetupNotPersistentStats(Actor akSelf) Function SetupNotPersistentStats(Actor akSelf)
akSelf.GetActorBase().SetCombatStyle(SummonTrinket.GetUsedCombatStyle()) akSelf.GetActorBase().SetCombatStyle(SummonTrinket.GetUsedCombatStyle())
akSelf.SetAV("HealRate", 50) If bTeleportHealRate == False
akSelf.SetAV("HealRate", DEFAULT_HEAL_RATE)
Else
akSelf.SetAV("HealRate", 0.0)
EndIf
akSelf.SetAV("MagickaRate", fApparitionManaRate) akSelf.SetAV("MagickaRate", fApparitionManaRate)
;failsafe since setav doesn't work sometimes ;failsafe since setav doesn't work sometimes
akSelf.ForceAV("HealRate", 50) If bTeleportHealRate == False
akSelf.ForceAV("HealRate", DEFAULT_HEAL_RATE)
Else
akSelf.ForceAV("HealRate", 0.0)
EndIf
akSelf.ForceAV("MagickaRate", fApparitionManaRate) akSelf.ForceAV("MagickaRate", fApparitionManaRate)
EndFunction EndFunction
@ -290,8 +300,11 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel)
akSelf.ModAV("HeavyArmor", iBoostArmor) akSelf.ModAV("HeavyArmor", iBoostArmor)
;akSelf.ForceAV("LightArmor", akSelf.GetAV("LightArmor") + iBoostArmor) ;akSelf.ForceAV("LightArmor", akSelf.GetAV("LightArmor") + iBoostArmor)
akSelf.ModAV("LightArmor", iBoostArmor) akSelf.ModAV("LightArmor", iBoostArmor)
; MeleeDamage AV seems to be not working, it's actually always zero
;akSelf.ForceAV("MeleeDamage", akSelf.GetAV("MeleeDamage") + iBoostMelee) ;akSelf.ForceAV("MeleeDamage", akSelf.GetAV("MeleeDamage") + iBoostMelee)
akSelf.ModAV("MeleeDamage", iBoostMelee) ;akSelf.ModAV("MeleeDamage", iBoostMelee)
akSelf.ModAV("OneHanded", iBoostMelee)
akSelf.ModAV("TwoHanded", iBoostMelee)
Else Else
Debug.Notification("Phasmalist Control Quest has issues: Unsupported boost class " + iBoostClass) Debug.Notification("Phasmalist Control Quest has issues: Unsupported boost class " + iBoostClass)
EndIf EndIf
@ -393,12 +406,20 @@ EndFunction
Function TeleportToPlayer(Bool bTeleportInFront, Bool bSilent) Function TeleportToPlayer(Bool bTeleportInFront, Bool bSilent)
Actor akSelf = Self.GetActorReference() Actor akSelf = Self.GetActorReference()
If akSelf If akSelf
; Zero out-of-combat heal rate for teleport and a few seconds after it.
; This is to prevent the apparition regenerating health IN combat on "Call Apparition" spam.
UnregisterForUpdate()
akSelf.ForceAV("HealRate", 0.0)
bTeleportHealRate = True
akSelf.Disable() akSelf.Disable()
_MoveToPlayer(akSelf, bTeleportInFront) _MoveToPlayer(akSelf, bTeleportInFront)
akSelf.Enable() akSelf.Enable()
If bSilent == False If bSilent == False
akSelf.PlaceAtMe(_00E_Phasmalist_EnterWorldExp) akSelf.PlaceAtMe(_00E_Phasmalist_EnterWorldExp)
EndIf EndIf
RegisterForSingleUpdate(2.0)
EndIf EndIf
EndFunction EndFunction
@ -460,10 +481,11 @@ FormList Property _00E_Phasmalist_CombatStyleWerewolfList Auto
Spell Property _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP Auto Spell Property _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP Auto
Idle Property WerewolfTransformBack Auto Idle Property WerewolfTransformBack Auto
Idle Property IdleWerewolfTransformation Auto Idle Property IdleWerewolfTransformation Auto
Idle Property _00E_IdleStomp Auto
Explosion Property _00E_FS_Theriantrophist_TransEXP Auto Explosion Property _00E_FS_Theriantrophist_TransEXP Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
ObjectReference Property _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest Auto ObjectReference Property _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest Auto
Idle Property LooseFullBodyStagger Auto
Armor Property _00E_InvisibleHelmet_Armor Auto
Float Property WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST = 20.0 AutoReadOnly Float Property WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST = 20.0 AutoReadOnly
Float Property WEREWOLF_TRANSFORM_HEALTH_BOOST = 40.0 AutoReadOnly Float Property WEREWOLF_TRANSFORM_HEALTH_BOOST = 40.0 AutoReadOnly
@ -475,34 +497,38 @@ Bool Function IsTransformedToWerewolf()
EndFunction EndFunction
Function TransformToWerewolf(Actor akSpellTarget) Function TransformToWerewolf(Actor akSpellTarget)
ObjectReference expMarker
Actor akSelf = GetActorReference() Actor akSelf = GetActorReference()
If (akSelf == None) || (akSelf != akSpellTarget) If (akSelf == None) || (akSelf != akSpellTarget)
Return Return
EndIf EndIf
akSelf.SetPlayerTeammate(False) bActivationBusy = True
Utility.Wait(0.2) akSelf.SetPlayerTeammate(False)
akSelf.UnequipAll() akSelf.EvaluatePackage()
WerewolfTranform_OriginalRace = akSelf.getRace() WerewolfTranform_OriginalRace = akSelf.getRace()
Utility.Wait(0.2)
akSelf.PlayIdle(IdleWerewolfTransformation) akSelf.PlayIdle(IdleWerewolfTransformation)
Utility.Wait(0.8)
_SetCombatStyle(akSelf, _00E_Phasmalist_CombatStyleWerewolfList.GetAt(0) as CombatStyle) _SetCombatStyle(akSelf, _00E_Phasmalist_CombatStyleWerewolfList.GetAt(0) as CombatStyle)
_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(0, WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST) _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(0, WEREWOLF_TRANSFORM_UNARMED_DAMAGE_BOOST)
_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(1, WEREWOLF_TRANSFORM_HEALTH_BOOST) _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP.SetNthEffectMagnitude(1, WEREWOLF_TRANSFORM_HEALTH_BOOST)
akSelf.AddSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) akSelf.AddSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP)
expMarker = _PlaceExplosionEx(_00E_FS_Theriantrophist_TransEXP, akSelf, 100.0)
Utility.Wait(1) Utility.Wait(0.4) ; Pause to synchronize the explosion with the transformation animation(s)
akSelf.SetLookAt(akSelf) ; Reset headtracking to prevent the head getting stuck looking sideways after the tranformation
ObjectReference expMarker = akSelf.PlaceAtMe(XMarker) akSelf.UnequipAll()
expMarker.MoveTo(akSelf, 0.0, 0.0, 100.0)
expMarker.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP)
akSelf.SetRace(_00E_Theriantrophist_PlayerWerewolfRace) akSelf.SetRace(_00E_Theriantrophist_PlayerWerewolfRace)
expMarker.Disable()
expMarker.Delete()
Utility.Wait(0.2)
_DeleteMarker(expMarker)
Utility.Wait(0.2)
akSelf.SetPlayerTeammate(True) akSelf.SetPlayerTeammate(True)
akSelf.EvaluatePackage()
bActivationBusy = False
EndFunction EndFunction
Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSilent) Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSilent)
@ -511,6 +537,9 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi
Return Return
EndIf EndIf
bActivationBusy = True
bTeleportHealRate = False
If akSelf.IsDead() If akSelf.IsDead()
_TransformFromWerewolfDead(akSelf, bIsUnsummoned, bSilent) _TransformFromWerewolfDead(akSelf, bIsUnsummoned, bSilent)
Else Else
@ -518,25 +547,33 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi
EndIf EndIf
WerewolfTranform_OriginalRace = None WerewolfTranform_OriginalRace = None
bActivationBusy = False
EndFunction EndFunction
Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSilent)
ObjectReference expMarker = None
GoToState("") GoToState("")
If bSilent == False
expMarker = _PlaceExplosionEx(_00E_FS_Theriantrophist_TransEXP, akSelf, 15.0)
EndIf
; RemoveAllItems is needed here for _TriggerEquipmentUpdate to work
akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest) akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest)
akSelf.SetPlayerTeammate(False)
akSelf.Resurrect() akSelf.Resurrect()
_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf)
Utility.Wait(0.2) ; Pause for the ragdoll to settle. Without it the apparition appears in the air on SetRace
Utility.Wait(0.2)
If bSilent == False
akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP)
EndIf
_SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle())
akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP)
If expMarker
_DeleteMarker(expMarker)
expMarker = None
EndIf
akSelf.SetRace(WerewolfTranform_OriginalRace) akSelf.SetRace(WerewolfTranform_OriginalRace)
_TriggerEquipmentUpdate(akSelf, False)
Utility.Wait(0.2) akSelf.ClearLookAt() ; Reenable headtracking
If bIsUnsummoned == False If bIsUnsummoned == False
GoToState("Working") GoToState("Working")
@ -545,27 +582,42 @@ Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSile
EndFunction EndFunction
Function _TransformFromWerewolfAlive(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) Function _TransformFromWerewolfAlive(Actor akSelf, Bool bIsUnsummoned, Bool bSilent)
ObjectReference expMarker = None
akSelf.SetPlayerTeammate(False) akSelf.SetPlayerTeammate(False)
If bSilent == False akSelf.EvaluatePackage()
akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP)
EndIf
akSelf.PlayIdle(WerewolfTransformBack) akSelf.PlayIdle(WerewolfTransformBack)
_SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle())
akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP)
_SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle())
If bSilent == False
expMarker = _PlaceExplosionEx( _00E_FS_Theriantrophist_TransEXP, akSelf, 100.0)
EndIf
akSelf.SetRace(WerewolfTranform_OriginalRace) akSelf.SetRace(WerewolfTranform_OriginalRace)
; RemoveAllItems is necessary to correctly reequip items _TriggerEquipmentUpdate(akSelf, True)
akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest) If expMarker
_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) _DeleteMarker(expMarker)
akSelf.PlayIdle(_00E_IdleStomp) expMarker = None
If bIsUnsummoned EndIf
Utility.Wait(0.2) Utility.Wait(0.2)
Else akSelf.ClearLookAt() ; Reenable headtracking
Utility.Wait(0.1) If bIsUnsummoned == False
SetupBehaviour(akSelf) SetupBehaviour(akSelf)
SetupNotPersistentStats(akSelf) SetupNotPersistentStats(akSelf)
akSelf.EvaluatePackage()
EndIf EndIf
EndFunction EndFunction
Function _TriggerEquipmentUpdate(Actor akSelf, Bool bPlayStaggerIdle)
akSelf.SetPlayerTeammate(True) ; Yes, the apparition has to be a player's teammate for AddItem-EquipItem below to trigger equipment update
If bPlayStaggerIdle
akSelf.PlayIdle(LooseFullBodyStagger)
EndIf
akSelf.AddItem(_00E_InvisibleHelmet_Armor, 1, True)
akSelf.EquipItem(_00E_InvisibleHelmet_Armor, 1)
akSelf.RemoveItem(_00E_InvisibleHelmet_Armor, 1)
EndFunction
;===================================================================================== ;=====================================================================================
; HELPER FUNCTIONS ; HELPER FUNCTIONS
@ -629,6 +681,18 @@ Function _UnregisterSpellBook(Actor akSelf, Form akBaseItem)
EndIf EndIf
EndFunction EndFunction
ObjectReference Function _PlaceExplosionEx(Explosion exp, ObjectReference refSpot, Float fOffsetZ)
ObjectReference expMarker = refSpot.PlaceAtMe(XMarker)
expMarker.MoveTo(refSpot, 0.0, 0.0, fOffsetZ)
expMarker.PlaceAtMe(exp)
Return expMarker
EndFunction
Function _DeleteMarker(ObjectReference refMarker)
refMarker.Disable()
refMarker.Delete()
EndFunction
;===================================================================================== ;=====================================================================================
; EVENTS ; EVENTS
@ -650,12 +714,14 @@ State Working
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 0, "$View_Attributes") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 0, "$View_Attributes")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 0, "$View_Attributes") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 0, "$View_Attributes")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 1, "$Adapt_Combat_Style") If IsTransformedToWerewolf() == False
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 1, "$Adapt_Combat_Style") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 1, "$Adapt_Combat_Style")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 1, "$Adapt_Combat_Style")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 4, "$Currently_Equipped")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 4, "$Currently_Equipped") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 4, "$Currently_Equipped")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 4, "$Currently_Equipped")
EndIf
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 5, "$Quit") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 5, "$Quit")
UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 5, "$Quit") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 5, "$Quit")
@ -708,4 +774,11 @@ State Working
EndIf EndIf
EndEvent EndEvent
Event OnUpdate()
If bTeleportHealRate
bTeleportHealRate = False
GetActorReference().ForceAV("HealRate", DEFAULT_HEAL_RATE)
EndIf
EndEvent
EndState EndState

@ -1,21 +1,21 @@
Scriptname _00E_Phasmalist_Workbench extends ObjectReference Scriptname _00E_Phasmalist_Workbench extends ObjectReference
; script that is attached to all phasmalist workbenches and manages their gui and functions ; script that is attached to all phasmalist workbenches and manages their gui and functions
Message Property illegalTrinket auto Message Property illegalTrinket Auto
{Message objects whose title is the message that is displayed when the player tries to summon an apparition but wears no phasmalist trinket object} {Message objects whose title is the message that is displayed when the player tries to summon an apparition but wears no phasmalist trinket object}
Message Property reallyDespectralize auto Message Property reallyDespectralize Auto
_FS_Phasmalist_ControlQuest Property phasmalistControlQuest auto _FS_Phasmalist_ControlQuest Property phasmalistControlQuest Auto
ObjectReference Property spectralizerContainer auto ObjectReference Property spectralizerContainer Auto
{the container items that should be spectralized are put in; should be the same for all workbenches} {the container items that should be spectralized are put in; should be the same for all workbenches}
ObjectReference Property _00E_Phasmalist_DespectralizingContainerReference auto ObjectReference Property _00E_Phasmalist_DespectralizingContainerReference Auto
Keyword Property _00E_Phasmalist_CraftingWorkbench_NPCMarker auto Keyword Property _00E_Phasmalist_CraftingWorkbench_NPCMarker Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Message Property _00E_Theriantrophist_CantCraftMSG Auto Message Property _00E_Theriantrophist_CantCraftMSG Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
_00E_PlayerhousingMaster Property PlayerhousingMaster Auto
GlobalVariable Property _00E_Phasmalist_TankMode Auto GlobalVariable Property _00E_Phasmalist_TankMode Auto
Static Property _00E_NPCMarkerBlue Auto
Bool bApparitionPrepared = False Bool bApparitionPrepared = False
bool bApparitionSummoned = False bool bApparitionSummoned = False
@ -24,6 +24,10 @@ String Property CRAFTING_MENU = "Crafting Menu" AutoReadOnly
String Property CONTAINER_MENU = "ContainerMenu" AutoReadOnly String Property CONTAINER_MENU = "ContainerMenu" AutoReadOnly
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnInit() Event OnInit()
BlockActivation() BlockActivation()
EndEvent EndEvent
@ -40,20 +44,36 @@ Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF If akActionRef == PlayerREF
GoToState("Waiting") GoToState("Waiting")
If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace If _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self)
_00E_Theriantrophist_CantCraftMSG.Show() If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace
ElseIf (((Self as ObjectReference) as _00E_Playerhousing_Furniture) == None) || PlayerhousingMaster.GetState() == "Buildmode" _00E_Theriantrophist_CantCraftMSG.Show()
ShowMainMenu() Else
ShowMainMenu()
Return
EndIf
EndIf EndIf
GoToState("")
Else Else
Activate(akActionRef, true) Activate(akActionRef, true)
EndIf EndIf
EndEvent EndEvent
State Waiting
Event OnActivate(ObjectReference akActionRef)
; Do nothing
EndEvent
EndState
;=====================================================================================
; PHASMALISM MENU
;=====================================================================================
; Summons the apparition and places it in the tank ; Summons the apparition and places it in the tank
Function PrepareApparition() Function PrepareApparition()
If bApparitionPrepared == False If bApparitionPrepared == False
ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) ObjectReference tankMarkerRef = GetTankMarker()
If bApparitionPrepared == False If bApparitionPrepared == False
bApparitionPrepared = True bApparitionPrepared = True
_00E_Phasmalist_TankMode.SetValue(1) _00E_Phasmalist_TankMode.SetValue(1)
@ -76,7 +96,7 @@ EndFunction
Function ResetApparitionOnInventoryChange() Function ResetApparitionOnInventoryChange()
If bApparitionPrepared If bApparitionPrepared
ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) ObjectReference tankMarkerRef = GetTankMarker()
Actor akApparition = phasmalistControlQuest.GetApparitionRef() Actor akApparition = phasmalistControlQuest.GetApparitionRef()
If akApparition If akApparition
akApparition.Disable() akApparition.Disable()
@ -264,7 +284,7 @@ State Spectralize
EndState EndState
State Despectralize State Despectralize
Event onBeginState() Event OnBeginState()
Actor akApparition = phasmalistControlQuest.GetApparitionRef() Actor akApparition = phasmalistControlQuest.GetApparitionRef()
If akApparition If akApparition
reallyDespectralize.show() reallyDespectralize.show()
@ -299,8 +319,68 @@ State Despectralize
EndEvent EndEvent
EndState EndState
State Waiting
Event OnActivate(ObjectReference akActionRef) ;=====================================================================================
; Do nothing ; PLACEABLE WORKBENCH
EndEvent ;=====================================================================================
EndState
ObjectReference PlaceableTankMarkerRef = None
Float Property FAST_TRANSLATION_SPEED = 1000000.0 AutoReadOnly
ObjectReference Function GetTankMarker()
If PlaceableTankMarkerRef
Return PlaceableTankMarkerRef
EndIf
Return GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker)
EndFunction
Function StartPlacement()
If PlaceableTankMarkerRef
PlaceableTankMarkerRef.Disable()
EndIf
EndFunction
Function OnPickUp()
If PlaceableTankMarkerRef
PlaceableTankMarkerRef.Disable()
PlaceableTankMarkerRef.Delete()
PlaceableTankMarkerRef = None
EndIf
EndFunction
Function FinishPlacement()
If PlaceableTankMarkerRef == None
PlaceableTankMarkerRef = PlaceAtMe(_00E_NPCMarkerBlue, abInitiallyDisabled = True)
Else
PlaceableTankMarkerRef.Disable()
EndIf
; (Re)position the marker
Float fOffsetX = -116.0
Float fOffsetY = 5.0 ; 54 ; 22.4
Float fOffsetZ = 20.0
Float fOffsetAngleZ = 136.0
Float fWorkbenchAngleZ = GetAngleZ()
Float cosZ = Math.Cos(fWorkbenchAngleZ)
Float sinZ = Math.Sin(fWorkbenchAngleZ)
Float mx = GetPositionX() + fOffsetY * sinZ + fOffsetX * cosZ
Float my = GetPositionY() + fOffsetY * cosZ - fOffsetX * sinZ
Float mz = GetPositionZ() + fOffsetZ
PlaceableTankMarkerRef.MoveTo(self)
PlaceableTankMarkerRef.Enable()
_00E_QuestFunctions.WaitForReferenceToLoad(PlaceableTankMarkerRef)
PlaceableTankMarkerRef.TranslateTo(mx, my, mz, 0, 0, fWorkbenchAngleZ + fOffsetAngleZ, FAST_TRANSLATION_SPEED, FAST_TRANSLATION_SPEED)
; PlaceableTankMarkerRef.SetPosition(mx, my, mz)
; PlaceableTankMarkerRef.SetAngle(0, 0, fWorkbenchAngleZ + fOffsetAngleZ)
EndFunction

@ -133,14 +133,7 @@ endFunction
Function DisableDialogueQuitting() Global Function DisableDialogueQuitting() Global
{Disables the TAB Key during dialogue. Resets automatically upon dialogue exit via Goodbye.} {Disables the TAB Key during dialogue. Resets automatically upon dialogue exit via Goodbye.}
if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true
; Suspected non-Enderal dialoguemenu.swf replacer, rechecking value in order to be sure.
UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", True)
if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true
Debug.Notification("Detected incompatible dialoguemenu.swf!")
endif
endif
UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", False) UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", False)
EndFunction EndFunction
@ -1235,7 +1228,7 @@ Message Property _00E_PleaseRemoveMoney Auto
GlobalVariable Property GameHour Auto GlobalVariable Property GameHour Auto
;--------------------------------------VISION-----------------------------------; ;--------------------------------------VISION-----------------------------------
float PlayerSpeed float PlayerSpeed
int VisionSound int VisionSound

@ -1,10 +1,14 @@
Scriptname _00E_SmokingPipeScript extends ObjectReference Scriptname _00E_SmokingPipeScript extends ObjectReference
_00E_PeaceweedControlScript Property PeaceweedControl Auto _00E_PeaceweedControlScript Property PeaceweedControl Auto
Actor Property PlayerRef Auto Actor Property PlayerRef Auto
Event OnEquipped(Actor akActor) Event OnEquipped(Actor akActor)
If akActor == PlayerRef If akActor == PlayerRef
PeaceweedControl.StartSmoking() ; The check of base object is needed because this script somehow gets attached to the quest ref of _00E_FS_NQ07_Rezept (and to various containers)
Form baseObj = GetBaseObject()
If baseObj == None || (baseObj as MiscObject) != None
PeaceweedControl.StartSmoking()
EndIf
EndIf EndIf
EndEvent EndEvent

@ -1,27 +1,30 @@
Scriptname _00E_Theriantrophist_BlockCraftingSC extends ObjectReference Scriptname _00E_Theriantrophist_BlockCraftingSC extends ObjectReference
Event OnInit() Actor Property PlayerREF Auto
Message Property _00E_Theriantrophist_CantCraftMSG Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
Bool bActivationBlocked = False
BlockActivation(True)
Event OnInit()
BlockActivation(True)
EndEvent EndEvent
Event OnActivate(ObjectReference akActionRef) Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF
If _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
if akActionRef == PlayerREF If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace
_00E_Theriantrophist_CantCraftMSG.Show()
if PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace Else
_00E_Theriantrophist_CantCraftMSG.Show() Activate(akActionRef, true)
elseif !((self as ObjectReference) as _00E_Playerhousing_Furniture) EndIf
Activate(akActionRef, true)
endif
else
Activate(akActionRef, true)
endif
bActivationBlocked = False
EndIf
Else
Activate(akActionRef, true)
EndIf
EndEvent EndEvent
Actor Property PlayerREF Auto
Message Property _00E_Theriantrophist_CantCraftMSG Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto

@ -141,6 +141,12 @@ State WolfForm
carryCapacityMod = PlayerREF.getAV("CarryWeight") - WerewolfBaseCarryCapacity carryCapacityMod = PlayerREF.getAV("CarryWeight") - WerewolfBaseCarryCapacity
humanSpeedMult = PlayerREF.getAV("speedMult") humanSpeedMult = PlayerREF.getAV("speedMult")
; If the player is under the influence of a slowdown magic effect, take the player's normal speedMult from Fame AV. See FrostSlowFix.psc
Float fFame = PlayerREF.GetBaseActorValue("Fame")
If fFame > humanSpeedMult
humanSpeedMult = fFame
EndIf
speedMult = humanSpeedMult speedMult = humanSpeedMult
temporarySpeedMultMod = 0 temporarySpeedMultMod = 0
renewNotPersistentStats() renewNotPersistentStats()

@ -78,6 +78,14 @@ Event OnLocationChange(Location akOldLoc, Location akNewLoc)
bGradualTransition = True bGradualTransition = True
EndIf EndIf
ElseIf bArkSpecialWeather && akNewLoc == ArkSiegeWeatherEdge
; If we're leaving Ark's outskirts, keep the current Ark weather for a bit longer.
; This prevents frequent weather switches if we're wondering at the edge of the siege weather zone and regularly crossing that edge.
If (akOldLoc == CapitalCityLocation || akOldLoc == ArkSiegeWeather) && (iCurrentArkWeather == WEATHER_OVERCAST || iCurrentArkWeather == WEATHER_RAIN)
iNewWeather = iCurrentArkWeather
bGradualTransition = True
EndIf
EndIf EndIf
SetNewWeather(iNewWeather, bGradualTransition) SetNewWeather(iNewWeather, bGradualTransition)
@ -158,8 +166,10 @@ Bool Function LocationIsSuntemple(Location lc)
EndFunction EndFunction
Bool Function LocationIsArk(Location lc) Bool Function LocationIsArk(Location lc)
If lc && ((lc == CapitalCityLocation) || lc.isChild(CapitalCityLocation)) If lc
Return True If (lc == CapitalCityLocation) || (lc == ArkSiegeWeather) || lc.isChild(CapitalCityLocation)
Return True
EndIf
EndIf EndIf
Return False Return False
@ -244,6 +254,8 @@ Int iCurrentArkWeather = 0
Bool bGameTimeUpdatesActive = False Bool bGameTimeUpdatesActive = False
Location Property CapitalCityLocation Auto Location Property CapitalCityLocation Auto
Location Property ArkSiegeWeather Auto
Location Property ArkSiegeWeatherEdge Auto
FormList Property _00E_SuntempleLocations Auto FormList Property _00E_SuntempleLocations Auto
Weather Property _00E_EnderalOvercast Auto Weather Property _00E_EnderalOvercast Auto

@ -4,19 +4,16 @@ Scriptname _60E_FS_Mystical_ThoughtImplosionSC extends ActiveMagicEffect
; EVENTS ; EVENTS
;===================================================================================== ;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster) Event OnEffectStart(Actor akTarget, Actor akCaster)
Int iChance = Utility.RandomInt(1, 100)
int iChance = Utility.RandomInt(1, 100)
if iChance > 0 && iChance < 33 If iChance < 33
; Do nothing ; Do nothing
Elseif iChance >= 33 && iChance < 66 ElseIf iChance < 66 || akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME)
PushBack(akTarget) PushBack(akTarget)
Elseif iChance >= 66 Else
Weaken(akTarget) Weaken(akTarget)
EndIf EndIf
EndEvent EndEvent
;===================================================================================== ;=====================================================================================
@ -24,34 +21,39 @@ EndEvent
;===================================================================================== ;=====================================================================================
Function PushBack(Actor Target) Function PushBack(Actor Target)
MAGAlterationTelekinesisThrow.Play(Target) MAGAlterationTelekinesisThrow.Play(Target)
float fPushStrength = (PlayerREF.GetActorValue("Illusion")/10) Float fPushStrength = PlayerREF.GetActorValue("Illusion") / 10.0
If fPushStrength < 4
if fPushStrength < 4
_00E_FS_PsionicPushStaggerSP.Cast(Target, Target) _00E_FS_PsionicPushStaggerSP.Cast(Target, Target)
Else Else
PlayerREF.PushActorAway(Target, (PlayerREF.GetActorValue("Illusion")/10)) PlayerREF.PushActorAway(Target, fPushStrength)
EndIf EndIf
EndFunction EndFunction
Function Weaken(Actor Target) Function Weaken(Actor Target)
Spell weaknessSpell
If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist)
weaknessSpell = _00E_FS_PsychosisWeaknessSP
Else
weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow
EndIf
_00E_FS_Psychosis_Weakened.Show() _00E_FS_Psychosis_Weakened.Show()
float fResist = PlayerREF.GetActorValue("Illusion")/2 Float fResist = PlayerREF.GetActorValue("Illusion") * 0.5
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) weaknessSpell.SetNthEffectMagnitude(0, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) weaknessSpell.SetNthEffectMagnitude(1, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) weaknessSpell.SetNthEffectMagnitude(2, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) weaknessSpell.SetNthEffectMagnitude(3, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) weaknessSpell.SetNthEffectMagnitude(4, fResist)
_00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) weaknessSpell.SetNthEffectMagnitude(5, fResist)
_00E_FS_PsychosisWeaknessSP.Cast(Target, Target) weaknessSpell.Cast(Target, Target)
Target.RemoveSpell(_00E_FS_PsychosisCounter_01_SP)
Target.RemoveSpell(_00E_FS_PsychosisCounter_02_SP)
EndFunction EndFunction
;===================================================================================== ;=====================================================================================
@ -60,9 +62,16 @@ EndFunction
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Spell Property _00E_FS_PsychosisWeaknessSP Auto
Spell Property _00E_FS_PsionicPushStaggerSP Auto Spell Property _00E_FS_PsionicPushStaggerSP Auto
Sound Property MAGAlterationTelekinesisThrow Auto Sound Property MAGAlterationTelekinesisThrow Auto
Message Property _00E_FS_Psychosis_Weakened Auto Message Property _00E_FS_Psychosis_Weakened Auto
Perk Property _00E_Class_Sinistrope_P08_C_Illusionist Auto
Spell Property _00E_FS_PsychosisWeaknessSP Auto
Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto
MagicEffect Property _00E_FS_PsychosisWeaknessVisualME Auto
Spell Property _00E_FS_PsychosisCounter_01_SP Auto
Spell Property _00E_FS_PsychosisCounter_02_SP Auto

@ -22,12 +22,14 @@ GlobalVariable Property _00E_Phasmalist_TankMode Auto
Message Property _00E_Phasmalist_NoApparitionCurrentlySummoned Auto Message Property _00E_Phasmalist_NoApparitionCurrentlySummoned Auto
Perk Property _00E_Class_Phasmalist_P05_C_Violence_01 Auto
Actor Property PlayerREF Auto Actor Property PlayerREF Auto
Bool bCreatedFirstTrinket = false Bool bCreatedFirstTrinket = false
Int iScriptVersion = 0 Int iScriptVersion = 0
Int Property CURRENT_SCRIPT_VERSION = 1 AutoReadOnly Int Property CURRENT_SCRIPT_VERSION = 2 AutoReadOnly
;===================================================================================== ;=====================================================================================
@ -78,6 +80,11 @@ Function LoadGameFailsave()
RegisterTeleportKey() RegisterTeleportKey()
((self as Quest) as _FS_Phasmalist_AffinityControlQuest).OnGameLoad() ; Obsolete, not needed anymore, so shut it down ((self as Quest) as _FS_Phasmalist_AffinityControlQuest).OnGameLoad() ; Obsolete, not needed anymore, so shut it down
bDoApparitionOnLoadGame = False bDoApparitionOnLoadGame = False
Else
If iScriptVersion < 2 && PlayerREF.HasPerk(_00E_Class_Phasmalist_P05_C_Violence_01) && IsApparitionSpawned()
SummonApparition(PlayerREF, False, True)
bDoApparitionOnLoadGame = False
EndIf
EndIf EndIf
iScriptVersion = CURRENT_SCRIPT_VERSION iScriptVersion = CURRENT_SCRIPT_VERSION

@ -1,43 +1,37 @@
Scriptname FrostSlowFix extends activemagiceffect Scriptname FrostSlowFix extends activemagiceffect
{Behebt den Fehler, dass die Verlangsamung von Frostzaubern nicht funktioniert, indem das SpeedMult-Attribut durch kurzzeitige Änderung des InventoryWeight geupdatet wird.} {Behebt den Fehler, dass die Verlangsamung von Frostzaubern nicht funktioniert, indem das SpeedMult-Attribut durch kurzzeitige Änderung des InventoryWeight geupdatet wird.}
Keyword Property MagicSlowDownTarget Auto
MagicEffect Property FrostSlowFFAimed Auto Actor Target
MagicEffect Property FrostSlowConcAimed Auto
MagicEffect Property FrostSlowFFContact Auto
MagicEffect Property FrostSlowFFSelfArea100 Auto
float speed
float basespeed
float slowspeed
Event OnEffectStart(Actor akTarget, Actor akCaster)
If akTarget.GetBaseActorValue("Speedmult") > akTarget.GetBaseActorValue("Fame") ;ensures that the speedmult gets only halved once
basespeed=akTarget.GetBaseActorValue("Speedmult")
akTarget.SetActorValue("Fame", basespeed)
slowspeed=akTarget.GetBaseActorValue("Speedmult")/2
akTarget.SetActorValue("Speedmult", slowspeed)
EndIf
akTarget.ModActorValue("InventoryWeight", -0.1)
Utility.Wait(0.01)
akTarget.ModActorValue("InventoryWeight", 0.1)
Endevent Event OnEffectStart(Actor akTarget, Actor akCaster)
Target = akTarget
Float fBaseSpeed = Target.GetBaseActorValue("Speedmult")
If fBaseSpeed > Target.GetBaseActorValue("Fame") ; ensures that the speedmult gets only halved once
Target.SetActorValue("Fame", fBaseSpeed)
Target.SetActorValue("Speedmult", fBaseSpeed * 0.5)
ForceSpeedMultUpdate()
EndIf
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster) Event OnEffectFinish(Actor akTarget, Actor akCaster)
If Target == None ; version update
If (akTarget.HasMagicEffect(FrostSlowFFAimed)||akTarget.HasMagicEffect(FrostSlowConcAimed)||akTarget.HasMagicEffect(FrostSlowFFContact)||akTarget.HasMagicEffect(FrostSlowFFSelfArea100))==0 Target = akTarget
basespeed=akTarget.GetBaseActorValue("Fame")
akTarget.SetActorValue("Speedmult", basespeed)
akTarget.SetActorValue("Fame", 0)
EndIf EndIf
akTarget.ModActorValue("InventoryWeight", -0.1)
Utility.Wait(0.01)
akTarget.ModActorValue("InventoryWeight", 0.1)
Endevent If Target.HasMagicEffectWithKeyword(MagicSlowDownTarget) == False
Target.SetActorValue("Speedmult", Target.GetBaseActorValue("Fame"))
Target.SetActorValue("Fame", 0)
ForceSpeedMultUpdate()
EndIf
EndEvent
Function ForceSpeedMultUpdate()
Target.ModActorValue("InventoryWeight", -0.1)
Utility.Wait(0.01)
Target.ModActorValue("InventoryWeight", 0.1)
EndFunction

@ -10,21 +10,24 @@ Ingredient Property MothWingMonarch Auto
Ingredient Property Garlic Auto Ingredient Property Garlic Auto
Message Property FS_NQ05_AlchemyMessagebox Auto Message Property FS_NQ05_AlchemyMessagebox Auto
Event OnActivate(objectReference akActionRef) Bool bActivationBlocked = False
If (akActionRef == PlayerREF && FS_NQ05.GetStage() < 40 && FS_NQ05.GetStage() >= 30) Event OnActivate(ObjectReference akActionRef)
int iButton = FS_NQ05_AlchemyMessagebox.Show() If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
if iButton == 0
PlayerREF.RemoveItem(Nirnroot, 1) Int qStage = FS_NQ05.GetStage()
PlayerREF.RemoveItem(SkeeverTail, 1) If qStage >= 30 && qStage < 40
PlayerREF.RemoveItem(MothWingMonarch, 1) If FS_NQ05_AlchemyMessagebox.Show() == 0
PlayerREF.RemoveItem(Garlic, 1) PlayerREF.RemoveItem(Nirnroot, 1)
PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) PlayerREF.RemoveItem(SkeeverTail, 1)
FS_NQ05.SetStage(40) PlayerREF.RemoveItem(MothWingMonarch, 1)
ElseIf iButton == 1 PlayerREF.RemoveItem(Garlic, 1)
Return PlayerREF.RemoveItem(FS_NQ05_Rezept, 1)
FS_NQ05.SetStage(40)
EndIf
EndIf EndIf
Endif
bActivationBlocked = False
EndIf
EndEvent EndEvent

@ -9,21 +9,23 @@ Ingredient Property FrostMirriam Auto
Potion Property FoodBananenschnaps Auto Potion Property FoodBananenschnaps Auto
Message Property _00E_FS_NQ07_AlchemyMessagebox Auto Message Property _00E_FS_NQ07_AlchemyMessagebox Auto
Bool bActivationBlocked = False
Event OnActivate(objectReference akActionRef)
If (akActionRef == PlayerREF && FS_NQ07.GetStage() == 115) Event OnActivate(ObjectReference akActionRef)
int iButton = _00E_FS_NQ07_AlchemyMessagebox.Show() If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
if iButton == 0
PlayerREF.RemoveItem(FoodMead, 1) If FS_NQ07.GetStage() == 115
PlayerREF.RemoveItem(FrostMirriam, 2) If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0
PlayerREF.RemoveItem(FoodBananenschnaps, 1) PlayerREF.RemoveItem(FoodMead, 1)
PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) PlayerREF.RemoveItem(FrostMirriam, 2)
FS_NQ07.SetStage(120) PlayerREF.RemoveItem(FoodBananenschnaps, 1)
ElseIf iButton == 1 PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1)
Return FS_NQ07.SetStage(120)
EndIf
EndIf EndIf
EndIf
bActivationBlocked = False
EndIf
EndEvent EndEvent

@ -0,0 +1,52 @@
Scriptname FXWitchlightAttachSCRIPT extends ActiveMagicEffect conditional
{Attaches and manages witchlights's fx}
VisualEffect Property WitchlightFXAttachEffect Auto
Spell Property WispDrainAttack Auto
Sound Property NPCWitchlightAttackM Auto
Actor Property PlayerREF Auto
ObjectReference selfRef
Event OnEffectStart(Actor Target, Actor Caster)
selfRef = caster
; Small version update.
; The new script properties do not get auto-filled if the NPC ref has been already inited
If PlayerREF == None
PlayerREF = Game.GetPlayer()
EndIf
If WispDrainAttack == None
WispDrainAttack = Game.GetFormFromFile(0x00091F78, "Skyrim.esm") as Spell
EndIf
If NPCWitchlightAttackM == None
NPCWitchlightAttackM = Game.GetFormFromFile(0x00036E7E, "GavrantFixes_210510.esp") as Sound
EndIf
;USKP 2.0.1 - Stop this from attaching to the player.
If selfRef == PlayerREF
Dispel()
Return
EndIf
; only attack FX once the 3D is loaded
Int iLoadCountdown = 50
While selfRef.Is3DLoaded() == False && iLoadCountdown > 0
iLoadCountdown -= 1
EndWhile
;USKP 2.0.2 - So despite ALL THAT above, we still need to check this. Stupid.
If selfRef.Is3DLoaded()
WitchlightFXAttachEffect.Play(selfRef, -1)
EndIf
EndEvent
Event OnSpellCast(Form akSpell)
If akSpell == WispDrainAttack
NPCWitchlightAttackM.Play(selfRef)
EndIf
EndEvent
Event OnEffectFinish(Actor Target, Actor Caster)
WitchlightFXAttachEffect.Stop(selfRef)
EndEvent
Loading…
Cancel
Save