diff --git a/GavrantFixes_210510.esp b/GavrantFixes_210510.esp new file mode 100644 index 00000000..5acb1dff Binary files /dev/null and b/GavrantFixes_210510.esp differ diff --git a/meshes/actors/mammoth/character assets/skeleton_triceratops.nif b/meshes/actors/mammoth/character assets/skeleton_triceratops.nif new file mode 100644 index 00000000..749dbea3 --- /dev/null +++ b/meshes/actors/mammoth/character assets/skeleton_triceratops.nif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9c772d16b6c88539dd529da93f5ce15a402ad7dea3f03d2d4f3eb556a8e8b9a +size 22753 diff --git a/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif b/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif index 78ab4750..b87b8195 100644 --- a/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif +++ b/meshes/enderal/armor/common/mercenary/vanguardhelmetclosed_1.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce333c3daf8dc33657b2f11b26df456e702f4d38235160527d497259ad958c44 +oid sha256:9ac2b32767a1357a2be371ca3a55537f664ec33c62c06b310dffeeaab3b94b72 size 231444 diff --git a/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif b/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif index 908d4c6f..72bb7e86 100644 --- a/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif +++ b/meshes/enderal/armor/steelplatearmor/hounskull_bascinet.nif @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35c81d8296ba8f0c70a6b112659dc1209468dcd2f2556971349879559ed02e55 +oid sha256:fd85e65f15ae31618b6f9236217a6a53336035f37d1c95b0eac1d71249d0fcdc size 69533 diff --git a/scripts/_00e_apparitionfxscript.pex b/scripts/_00e_apparitionfxscript.pex index 17cdb784..0f1b1eb9 100644 Binary files a/scripts/_00e_apparitionfxscript.pex and b/scripts/_00e_apparitionfxscript.pex differ diff --git a/scripts/_00e_bedscript.pex b/scripts/_00e_bedscript.pex index 4695f0bf..0c25fc66 100644 Binary files a/scripts/_00e_bedscript.pex and b/scripts/_00e_bedscript.pex differ diff --git a/scripts/_00e_blockactivationforplayer.pex b/scripts/_00e_blockactivationforplayer.pex index b4e6d172..e5ad7ecc 100644 Binary files a/scripts/_00e_blockactivationforplayer.pex and b/scripts/_00e_blockactivationforplayer.pex differ diff --git a/scripts/_00e_bonespiritcontrolscript.pex b/scripts/_00e_bonespiritcontrolscript.pex index eb9a9c8a..890ea26f 100644 Binary files a/scripts/_00e_bonespiritcontrolscript.pex and b/scripts/_00e_bonespiritcontrolscript.pex differ diff --git a/scripts/_00e_class_openclassmenuscript.pex b/scripts/_00e_class_openclassmenuscript.pex index a8f5f6b8..c3584f50 100644 Binary files a/scripts/_00e_class_openclassmenuscript.pex and b/scripts/_00e_class_openclassmenuscript.pex differ diff --git a/scripts/_00e_class_perkscript.pex b/scripts/_00e_class_perkscript.pex index a23cb17b..347d0c56 100644 Binary files a/scripts/_00e_class_perkscript.pex and b/scripts/_00e_class_perkscript.pex differ diff --git a/scripts/_00e_cqc05_functions.pex b/scripts/_00e_cqc05_functions.pex index 17ebc3e5..23a4157e 100644 Binary files a/scripts/_00e_cqc05_functions.pex and b/scripts/_00e_cqc05_functions.pex differ diff --git a/scripts/_00e_cqj05_functions.pex b/scripts/_00e_cqj05_functions.pex index 13315724..ea354165 100644 Binary files a/scripts/_00e_cqj05_functions.pex and b/scripts/_00e_cqj05_functions.pex differ diff --git a/scripts/_00e_frozenmescript.pex b/scripts/_00e_frozenmescript.pex index d3f726d7..31f164eb 100644 Binary files a/scripts/_00e_frozenmescript.pex and b/scripts/_00e_frozenmescript.pex differ diff --git a/scripts/_00e_fs_affinity_absoulcallersc.pex b/scripts/_00e_fs_affinity_absoulcallersc.pex index 67fc4a42..d117de3d 100644 Binary files a/scripts/_00e_fs_affinity_absoulcallersc.pex and b/scripts/_00e_fs_affinity_absoulcallersc.pex differ diff --git a/scripts/_00e_fs_affinity_ghostblade_onattack.pex b/scripts/_00e_fs_affinity_ghostblade_onattack.pex index c5911457..961cb4da 100644 Binary files a/scripts/_00e_fs_affinity_ghostblade_onattack.pex and b/scripts/_00e_fs_affinity_ghostblade_onattack.pex differ diff --git a/scripts/_00e_fs_dreameatersc.pex b/scripts/_00e_fs_dreameatersc.pex index 6924925e..f282ba21 100644 Binary files a/scripts/_00e_fs_dreameatersc.pex and b/scripts/_00e_fs_dreameatersc.pex differ diff --git a/scripts/_00e_fs_nq07_dinnercontrolsc.pex b/scripts/_00e_fs_nq07_dinnercontrolsc.pex index 9ea0f0ed..8a632e85 100644 Binary files a/scripts/_00e_fs_nq07_dinnercontrolsc.pex and b/scripts/_00e_fs_nq07_dinnercontrolsc.pex differ diff --git a/scripts/_00e_fs_nqr05_perversionsc.pex b/scripts/_00e_fs_nqr05_perversionsc.pex index 07047472..8eb56d24 100644 Binary files a/scripts/_00e_fs_nqr05_perversionsc.pex and b/scripts/_00e_fs_nqr05_perversionsc.pex differ diff --git a/scripts/_00e_fs_psychosissc.pex b/scripts/_00e_fs_psychosissc.pex index f38656af..3071e696 100644 Binary files a/scripts/_00e_fs_psychosissc.pex and b/scripts/_00e_fs_psychosissc.pex differ diff --git a/scripts/_00e_fs_theriantrophist_allowtemptsc.pex b/scripts/_00e_fs_theriantrophist_allowtemptsc.pex index 72922c1c..727d0778 100644 Binary files a/scripts/_00e_fs_theriantrophist_allowtemptsc.pex and b/scripts/_00e_fs_theriantrophist_allowtemptsc.pex differ diff --git a/scripts/_00e_fs_voicedletterscript.pex b/scripts/_00e_fs_voicedletterscript.pex index 5a08415a..651ea395 100644 Binary files a/scripts/_00e_fs_voicedletterscript.pex and b/scripts/_00e_fs_voicedletterscript.pex differ diff --git a/scripts/_00e_game_skillmenusc.pex b/scripts/_00e_game_skillmenusc.pex index a034d206..a3af012b 100644 Binary files a/scripts/_00e_game_skillmenusc.pex and b/scripts/_00e_game_skillmenusc.pex differ diff --git a/scripts/_00e_mq10a_functions.pex b/scripts/_00e_mq10a_functions.pex index 91f52c35..72351d8d 100644 Binary files a/scripts/_00e_mq10a_functions.pex and b/scripts/_00e_mq10a_functions.pex differ diff --git a/scripts/_00e_mq12c_functions.pex b/scripts/_00e_mq12c_functions.pex index ca66ea51..0ebd72ba 100644 Binary files a/scripts/_00e_mq12c_functions.pex and b/scripts/_00e_mq12c_functions.pex differ diff --git a/scripts/_00e_mq12c_harbirsiegesc.pex b/scripts/_00e_mq12c_harbirsiegesc.pex index 1dc2a47c..9efa2b95 100644 Binary files a/scripts/_00e_mq12c_harbirsiegesc.pex and b/scripts/_00e_mq12c_harbirsiegesc.pex differ diff --git a/scripts/_00e_mq13a_functions.pex b/scripts/_00e_mq13a_functions.pex index ac88641a..d3294e98 100644 Binary files a/scripts/_00e_mq13a_functions.pex and b/scripts/_00e_mq13a_functions.pex differ diff --git a/scripts/_00e_mq13a_grammophonesc.pex b/scripts/_00e_mq13a_grammophonesc.pex index cdc6e67c..b3e8e1bf 100644 Binary files a/scripts/_00e_mq13a_grammophonesc.pex and b/scripts/_00e_mq13a_grammophonesc.pex differ diff --git a/scripts/_00e_nq_g_07_functions.pex b/scripts/_00e_nq_g_07_functions.pex index 2de0e727..bc2099ec 100644 Binary files a/scripts/_00e_nq_g_07_functions.pex and b/scripts/_00e_nq_g_07_functions.pex differ diff --git a/scripts/_00e_perkblutrauschffaimedscript.pex b/scripts/_00e_perkblutrauschffaimedscript.pex new file mode 100644 index 00000000..51d9d797 Binary files /dev/null and b/scripts/_00e_perkblutrauschffaimedscript.pex differ diff --git a/scripts/_00e_phasmalist_newapparitionalias.pex b/scripts/_00e_phasmalist_newapparitionalias.pex index 1f143f1b..a96482f1 100644 Binary files a/scripts/_00e_phasmalist_newapparitionalias.pex and b/scripts/_00e_phasmalist_newapparitionalias.pex differ diff --git a/scripts/_00e_phasmalist_workbench.pex b/scripts/_00e_phasmalist_workbench.pex index 8659c619..5d0f0b62 100644 Binary files a/scripts/_00e_phasmalist_workbench.pex and b/scripts/_00e_phasmalist_workbench.pex differ diff --git a/scripts/_00e_questfunctions.pex b/scripts/_00e_questfunctions.pex index cc85b825..bd821ba7 100644 Binary files a/scripts/_00e_questfunctions.pex and b/scripts/_00e_questfunctions.pex differ diff --git a/scripts/_00e_smokingpipescript.pex b/scripts/_00e_smokingpipescript.pex index a1fd0376..adddfc67 100644 Binary files a/scripts/_00e_smokingpipescript.pex and b/scripts/_00e_smokingpipescript.pex differ diff --git a/scripts/_00e_theriantrophist_blockcraftingsc.pex b/scripts/_00e_theriantrophist_blockcraftingsc.pex index 83293df2..5c1bcdfa 100644 Binary files a/scripts/_00e_theriantrophist_blockcraftingsc.pex and b/scripts/_00e_theriantrophist_blockcraftingsc.pex differ diff --git a/scripts/_00e_theriantrophist_wolfattributes.pex b/scripts/_00e_theriantrophist_wolfattributes.pex index 9bb812b3..666d2173 100644 Binary files a/scripts/_00e_theriantrophist_wolfattributes.pex and b/scripts/_00e_theriantrophist_wolfattributes.pex differ diff --git a/scripts/_00e_weathercontrolscriptsc.pex b/scripts/_00e_weathercontrolscriptsc.pex index 846d4ed2..8ff7626e 100644 Binary files a/scripts/_00e_weathercontrolscriptsc.pex and b/scripts/_00e_weathercontrolscriptsc.pex differ diff --git a/scripts/_60e_fs_mystical_thoughtimplosionsc.pex b/scripts/_60e_fs_mystical_thoughtimplosionsc.pex index 2a83d7d4..a8da67f5 100644 Binary files a/scripts/_60e_fs_mystical_thoughtimplosionsc.pex and b/scripts/_60e_fs_mystical_thoughtimplosionsc.pex differ diff --git a/scripts/_fs_phasmalist_controlquest.pex b/scripts/_fs_phasmalist_controlquest.pex index fd785beb..90158a3b 100644 Binary files a/scripts/_fs_phasmalist_controlquest.pex and b/scripts/_fs_phasmalist_controlquest.pex differ diff --git a/scripts/frostslowfix.pex b/scripts/frostslowfix.pex index 31054933..c3db84ba 100644 Binary files a/scripts/frostslowfix.pex and b/scripts/frostslowfix.pex differ diff --git a/scripts/fs_nq05_alchemyscript.pex b/scripts/fs_nq05_alchemyscript.pex index be676964..b7437595 100644 Binary files a/scripts/fs_nq05_alchemyscript.pex and b/scripts/fs_nq05_alchemyscript.pex differ diff --git a/scripts/fs_nq07_alchemyscript.pex b/scripts/fs_nq07_alchemyscript.pex index d9115b0a..783c2e2c 100644 Binary files a/scripts/fs_nq07_alchemyscript.pex and b/scripts/fs_nq07_alchemyscript.pex differ diff --git a/scripts/fxwitchlightattachscript.pex b/scripts/fxwitchlightattachscript.pex new file mode 100644 index 00000000..916ffe1c Binary files /dev/null and b/scripts/fxwitchlightattachscript.pex differ diff --git a/source/scripts/_00e_bedscript.psc b/source/scripts/_00e_bedscript.psc index f72789b3..49074464 100644 --- a/source/scripts/_00e_bedscript.psc +++ b/source/scripts/_00e_bedscript.psc @@ -1,23 +1,24 @@ Scriptname _00E_BedScript extends ObjectReference {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) + 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) Self.Activate(PlayerREF, True) Game.SetInChargen(False, True, False) Else _00E_MQ14_CantRestNowMessage.Show() EndIf - endif + bActivationBlocked = False + EndIf EndEvent - -Actor Property PlayerREF Auto -Quest Property MQ14 Auto - -Message Property _00E_MQ14_CantRestNowMessage Auto - diff --git a/source/scripts/_00e_blockactivationforplayer.psc b/source/scripts/_00e_blockactivationforplayer.psc index ec555b49..e8d4b62c 100644 --- a/source/scripts/_00e_blockactivationforplayer.psc +++ b/source/scripts/_00e_blockactivationforplayer.psc @@ -9,7 +9,9 @@ EndEvent Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() && Self.IsActivationBlocked() - _00E_BlockedMessage.Show() + If _00E_BlockedMessage + _00E_BlockedMessage.Show() + EndIf Else Self.Activate(akActionRef, True) EndIf diff --git a/source/scripts/_00e_class_openclassmenuscript.psc b/source/scripts/_00e_class_openclassmenuscript.psc index 8ab50292..a6bff738 100644 --- a/source/scripts/_00e_class_openclassmenuscript.psc +++ b/source/scripts/_00e_class_openclassmenuscript.psc @@ -26,7 +26,7 @@ Event OnEffectStart(Actor TheTarget, Actor TheCaster) Else 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() bDoSettleDownWait = False ElseIf PlayerREF.IsInCombat() @@ -124,3 +124,5 @@ GlobalVariable Property _00E_Meditate_FirstPerson Auto GlobalVariable Property _00E_Meditate_Allowed Auto ReferenceAlias Property Player Auto + +Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto diff --git a/source/scripts/_00e_class_perkscript.psc b/source/scripts/_00e_class_perkscript.psc index a1c89423..3f652fee 100644 --- a/source/scripts/_00e_class_perkscript.psc +++ b/source/scripts/_00e_class_perkscript.psc @@ -6,103 +6,101 @@ Import Game ; 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 - __Config_MultipleLevels=true + __Config_MultipleLevels = True EndIf - If (__Config_MultipleLevels) && !(__Config_MultipleLevelsTwoLevels) - If iButton < 3 - If (__Config_TeachesTalent) - TeachTalent() - Elseif !(__Config_TeachesTalent) + + If __Config_MultipleLevels + + If __Config_MultipleLevelsTwoLevels + If iButton < 2 TeachPerk() + FinalizeUnlock() + Return + EndIf + Else ; __Config_MultipleLevelsTwoLevels == False + If iButton < 3 + If __Config_TeachesTalent + TeachTalent() + Else + TeachPerk() + EndIf + FinalizeUnlock() + Return EndIf - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() EndIf - ElseIf (__Config_MultipleLevels) && (__Config_MultipleLevelsTwoLevels) - If iButton < 2 - TeachPerk() - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() - EndIf - - Elseif !__Config_MultipleLevels + Else ; __Config_MultipleLevels == False + If iButton == 0 - PlayerREF.AddPerk(__Config_PerkToTeach1) - If __Config_QuestToStart != None - __Config_QuestToStart.Start() - EndIf - If ( AdditionalPerk ) - PlayerREF.AddPerk(AdditionalPerk) - EndIf - If sendModEventOnUnlock - SendModEvent(modEventName) - Endif - - TalentPoints.SetValue(TalentPoints.GetValueInt() - 1) - PlayerREF.SetAV("dragonsouls", TalentPoints.GetValueInt()) - PlayVisuals() + TeachFirstPerk() + FinalizeUnlock() + Return EndIf EndIf - + + GoToState("") EndEvent +State DoNothing + Event OnActivate(ObjectReference akActionRef) + ; Do nothing + EndEvent +EndState + ;===================================================================================== ; FUNCTIONS ;===================================================================================== Function TeachPerk() - - if !(PlayerREF.HasPerk(__Config_PerkToTeach1)) - PlayerREF.AddPerk(__Config_PerkToTeach1) - 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)) + If PlayerREF.HasPerk(__Config_PerkToTeach1) == False + TeachFirstPerk() + ElseIf PlayerREF.HasPerk(__Config_PerkToTeach2) == False PlayerREF.AddPerk(__Config_PerkToTeach2) - else + Else PlayerREF.AddPerk(__Config_PerkToTeach3) - endif + EndIf EndFunction Function TeachTalent() - - if !(Game.IsWordUnlocked(__Config_WordToTeach1)) + If Game.IsWordUnlocked(__Config_WordToTeach1) == False PlayerREF.AddShout(__Config_TalentToTeach) WordToTeach = __Config_WordToTeach1 - PlayerREF.AddPerk(__Config_PerkToTeach1) - If __Config_QuestToStart != None - __Config_QuestToStart.start() - EndIf - if sendModEventOnUnlock - SendModEvent(modEventName) - Endif - elseif (Game.IsWordUnlocked(__Config_WordToTeach1)) && !(Game.IsWordUnlocked(__Config_WordToTeach2)) + TeachFirstPerk(False) + ElseIf Game.IsWordUnlocked(__Config_WordToTeach2) == False WordToTeach = __Config_WordToTeach2 PlayerREF.AddPerk(__Config_PerkToTeach2) - else + Else WordToTeach = __Config_WordToTeach3 PlayerREF.AddPerk(__Config_PerkToTeach3) - endif + EndIf + Game.UnlockWord(WordToTeach) Game.TeachWord(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 Function SetRecoveryTime(WordOfPower WordToTeach) @@ -116,56 +114,54 @@ Function SetRecoveryTime(WordOfPower WordToTeach) __Config_TalentToTeach.SetNthRecoveryTime(1, fRecoveryTime03) __Config_TalentToTeach.SetNthRecoveryTime(2, fRecoveryTime03) EndIf - EndFunction Function PlayVisuals() - ;Fix for ERB-1355, somehow _00E_TalentpointsRemaining was not filled in that save game on all perk activators If _00E_TalentpointsRemaining == None _00E_TalentpointsRemaining = Game.GetFormFromFile(0x000431FB, "Skyrim.esm") as Message EndIf - - _00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt() as Int) + _00E_TalentpointsRemaining.Show(TalentPoints.GetValueInt()) ObjectReference MemoryPoint = Self.GetLinkedRef() + MAGConjureImpact.Play(PlayerREF) + MemoryPoint.PlayAnimation("PlayAnim02") - if( MemoryPoint.GetLinkedRef(TestLine) ) - MemoryPoint.GetLinkedRef(TestLine).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine01) ) - MemoryPoint.GetLinkedRef(__PerkLine01).PlayAnimation("Unlock") - endif - if( MemoryPoint.GetLinkedRef(__PerkLine02) ) - MemoryPoint.GetLinkedRef(__PerkLine02).PlayAnimation("Unlock") - endif - 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 + PlayUnlockAnimationOnLinkedRef(MemoryPoint, TestLine) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine01) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine02) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine03) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine04) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine05) + PlayUnlockAnimationOnLinkedRef(MemoryPoint, __PerkLine06) + + GoToState("") ; Time to unlock OnActivate + Sound unlockSound = Game.GetFormFromFile(0x0003A1E7, "Skyrim.esm") as Sound unlockSound.Play(PlayerREF) - MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8 , MemoryPoint) + MAGDragonPowerAbsorbManEffect.Play(PlayerREF, 8, MemoryPoint) _00E_UnlockClassIMOD.Apply() Utility.Wait(0.1) - _00E_Class_MemoryAbsorbFXS.Play(playerREF) + _00E_Class_MemoryAbsorbFXS.Play(PlayerREF) Utility.Wait(3) - _00E_Class_MemoryAbsorbFXS.Stop(playerREF) + _00E_Class_MemoryAbsorbFXS.Stop(PlayerREF) Utility.Wait(2) 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 diff --git a/source/scripts/_00e_cqc05_functions.psc b/source/scripts/_00e_cqc05_functions.psc index 927a713b..23c3dba3 100644 --- a/source/scripts/_00e_cqc05_functions.psc +++ b/source/scripts/_00e_cqc05_functions.psc @@ -126,13 +126,12 @@ EndFunction Function PlayKiss() + ; Solves "torch in body" problem while kissing _00E_MC_CaliaREF.UnEquipItem(Torch01, True) - ;Solves "torch in body" problem while kissing _FS_TheriantrophistControlQuest.TransformBackIfTransformed() - if Player.GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(1.0) - endif + If Player.GetRace() == HighElfRace + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) + EndIf Int iHand = 0 if PlayerREF.GetEquippedItemType(iHand) == 11 @@ -180,11 +179,11 @@ Function FadeOut() CQC05_SC02_DoorREF.BlockActivation(True) CaliaRomance.SetValueInt(1) - PlayerREF.SetScale(1.0) FadeToBlackIMOD.Apply() Utility.Wait(2) FadeToBlackHoldIMOD.ApplyCrossFade(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) PlayerREF.SetUnconscious(False) diff --git a/source/scripts/_00e_cqj05_functions.psc b/source/scripts/_00e_cqj05_functions.psc index b0b2157f..a598bfd2 100644 --- a/source/scripts/_00e_cqj05_functions.psc +++ b/source/scripts/_00e_cqj05_functions.psc @@ -49,8 +49,7 @@ Function PlayKissAnimation() _00E_QuestFunctions.EndWerewolfModeWhenTransformed() If Player.GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(1.0) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) EndIf If PlayerREF.GetEquippedShield() != None @@ -103,9 +102,9 @@ Function FadeOut() PlayerREF.SetUnconscious(False) Debug.ToggleMenus() Debug.ToggleCollisions() - if Player.GetRace() == HighElfRace + If Player.GetRace() == HighElfRace PlayerREF.SetScale(fPlayerScale) - endif + EndIf _00E_MC_JesparREF.MoveTo(MQ13a_StarshipBedREF) _00E_MC_JesparREF.MoveTo(CQJ05_SC01_JesparLayMarker) PlayerREF.MoveTo(MQ13a_StarshipBedREF) diff --git a/source/scripts/_00e_frozenmescript.psc b/source/scripts/_00e_frozenmescript.psc index 06399333..68975e30 100644 --- a/source/scripts/_00e_frozenmescript.psc +++ b/source/scripts/_00e_frozenmescript.psc @@ -6,119 +6,117 @@ Scriptname _00E_FrozenMEScript extends activemagiceffect ;===================================================================================== 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) - - 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 - + Debug.Trace(self + ", OnEffectStart (Default): done") + EndEvent EndState -;======================================FROZEN STATE================================ +;====================================== FROZEN STATE ================================= State Frozen + ;/ + Event OnBeginState() + Debug.Trace(self + ", OnBeginState (Frozen)") + PositionMarkerRef = FrozenActor.PlaceAtMe(XMarker) + Debug.Trace(self + ", OnBeginState (Frozen): done") + EndEvent /; -Event OnUpdate() - - bHitLock = False + Event OnUpdate() + 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) - - ShatterChance = __Config_BaseShatterChance - + Float fShatterChance + If PlayerREF.HasPerk(_04E_30_UNI_SongOfWinterFrostDamagePerk) + fShatterChance = __Config_BaseShatterChance * 2.0 Else - - ShatterChance = __Config_BaseShatterChance*2 - + fShatterChance = __Config_BaseShatterChance EndIf - If !bHitLock - + If bHitLock == False bHitLock = True If akSource.HasKeyword(WeaponTypeBluntWeapon) - ShatterChance = (ShatterChance + __Config_ShatterChanceBluntWeaponBonus) + fShatterChance += __Config_ShatterChanceBluntWeaponBonus EndIf - - If abPowerAttack == True - ShatterChance = (ShatterChance + __Config_ShatterChancePowerAttackBonus) + If abPowerAttack + fShatterChance += __Config_ShatterChancePowerAttackBonus EndIf - If ShockSpells.HasForm(akSource) - ShatterChance = (ShatterChance + __Config_ShatterChanceShockSpellBonus) + fShatterChance += __Config_ShatterChanceShockSpellBonus + fShatterChance += 1.0 EndIf - If akSource == _00E_A1_OnslaughtCloakDMG - ShatterChance = (ShatterChance + __Config_ShatterChanceOnslaughtSpellBonus) - + fShatterChance += __Config_ShatterChanceOnslaughtSpellBonus If _00E_Synergy_ArcticWindOnslaught.GetValueInt() == 0 _00E_Synergy_ArcticWindOnslaught.SetValueInt(1) Levelsystem.ShowSynergyMessage() EndIf - EndIf - If Utility.RandomFloat() < ShatterChance - HasBeenShattered = true - ShatterEnemy() - GoToState("Finished") + If Utility.RandomFloat() < fShatterChance + If bNoShatter == False + GoToState("Finished") + ShatterEnemy() + Debug.Trace(self + ", OnHit: shatter!") + EndIf + Else + If bNoShatter == False + RegisterForSingleUpdate(1.5) + EndIf EndIf - - RegisterForSingleUpdate(fHitTimer) - - Endif - - EndIf - -EndEvent - -Event OnDying(Actor akKiller) - - FrozenActor.EnableAI(True) - Self.Dispel() - -EndEvent + EndIf -Event OnEffectFinish(Actor akTarget, Actor akCaster) - - ;If FrozenActor.GetAV("Health") < 1 && !_00E_NoShatterNPCFormList.HasForm(FrozenActor.GetActorBase()) - ; ShatterEnemy() - ;Else + Debug.Trace(self + ", OnHit: done") + EndEvent + + Event OnDying(Actor akKiller) + 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) FrozenActor.SetAlpha(1.0, true) - ;EndIf - FrozenActor.EnableAI(True) - FrozenActor.RemovePerk(_00E_FrozenPerk) - If Utility.GetINIBool("bVATSDisable:VATS") == 0 - KillMove.SetValueInt(1) - EndIf - GoToState("Finished") + ; Debug.Trace(self + ", OnEffectFinish: distance from the marker: " + FrozenActor.GetDistance(PositionMarkerRef)) -EndEvent - + EnableTargetAI() + FrozenActor.RemovePerk(_00E_FrozenPerk) + + ; DeletePositionMarker() + + Debug.Trace(self + ", OnEffectFinish: done") + EndEvent EndState -;======================================FINISHED STATE================================ +;====================================== FINISHED STATE =============================== State Finished @@ -131,19 +129,19 @@ EndState ;===================================================================================== Function ShatterEnemy() - + ; EnableTargetAI() FrozenActor.Kill(PlayerREF) Utility.Wait(0.1) FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion02) - if FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace + If FrozenActor.HasKeyword(ActorTypeNPC) || FrozenActor.GetRace() == DraugrRace FrozenActor.PlaceAtMe(_00E_FS_MAGIceGoreExplosion) Else FrozenActor.PlaceAtMe(_00E_FrostShatteringExplosion) EndIf - FrozenActor.SetAlpha (0.0, true) FrozenActor.SetCriticalStage(FrozenActor.CritStage_DisintegrateStart) + FrozenActor.SetAlpha(0.0, true) FrozenActor.AttachAshPile(_00E_ShatteredEnemyPile) WPNImpactBladeVsIce.Play(FrozenActor) Game.ShakeCamera(afStrength = 0.3) @@ -154,31 +152,48 @@ Function ShatterEnemy() Game.UnlockAchievement("END_FROZEN_01") _00E_FrozenAchievementUnlocked.SetValueInt(1) 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 ;===================================================================================== ; PROPERTIES ;===================================================================================== -float ShatterChance -float KillMoveChanceOriginal -bool HasBeenShattered -bool bHitLock +Bool bHitLock +Bool bReenabledAI +Bool bNoShatter -float fHitTimer = 1.5 +Actor FrozenActor +ObjectReference PositionMarkerRef -float __Config_BaseShatterChance = 0.06 -float __Config_ShatterChancePowerAttackBonus = 0.035 -float __Config_ShatterChanceBluntWeaponBonus = 0.02 -float __Config_ShatterChanceShockSpellBonus = 0.025 -float __Config_ShatterChanceOnslaughtSpellBonus = 0.04 +Float Property __Config_BaseShatterChance = 0.06 AutoReadOnly +Float Property __Config_ShatterChancePowerAttackBonus = 0.035 AutoReadOnly +Float Property __Config_ShatterChanceBluntWeaponBonus = 0.02 AutoReadOnly +Float Property __Config_ShatterChanceShockSpellBonus = 0.025 AutoReadOnly +Float Property __Config_ShatterChanceOnslaughtSpellBonus = 0.04 AutoReadOnly _00E_QuestFunctions Property Levelsystem Auto -Actor FrozenActor - -GlobalVariable Property KillMove Auto GlobalVariable Property _00E_Synergy_ArcticWindOnslaught Auto GlobalVariable Property _00E_FrozenAchievementUnlocked Auto GlobalVariable Property _00E_AchievementsEnabled Auto @@ -207,4 +222,4 @@ Perk Property _04E_30_UNI_SongOfWinterFrostDamagePerk Auto Sound Property WPNImpactBladeVsIce Auto -FormList Property _00E_NoShatterNPCFormList Auto \ No newline at end of file +Static Property XMarker Auto diff --git a/source/scripts/_00e_fs_affinity_absoulcallersc.psc b/source/scripts/_00e_fs_affinity_absoulcallersc.psc index c62ae3e6..51f7e074 100644 --- a/source/scripts/_00e_fs_affinity_absoulcallersc.psc +++ b/source/scripts/_00e_fs_affinity_absoulcallersc.psc @@ -4,8 +4,10 @@ WordOfPower Property _00E_Affinity_Soulcaller_TransformApparation_Word01 Auto Shout Property _00E_Affinity_Soulcaller_TransformApparation Auto Event OnEffectStart(Actor akTarget, Actor akCaster) - Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) - Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + If Game.IsWordUnlocked(_00E_Affinity_Soulcaller_TransformApparation_Word01) == False + Game.TeachWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + Game.UnlockWord(_00E_Affinity_Soulcaller_TransformApparation_Word01) + EndIf akTarget.AddShout(_00E_Affinity_Soulcaller_TransformApparation) Endevent diff --git a/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc b/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc index d5eab38a..979b61a0 100644 --- a/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc +++ b/source/scripts/_00e_fs_affinity_ghostblade_onattack.psc @@ -6,6 +6,7 @@ Spell Property _00E_FakeArrowSP Auto Spell Property _00E_FS_Ghostblade_FakeAttackSpellSP Auto Event OnEffectStart(Actor akTarget, Actor akCaster) + Debug.Trace("_00E_FS_Affinity_Ghostblade_OnSneakAttack: OnEffectStart") Actor akApparition = PhasmalistControlQuest.GetApparitionFailsafeRef() If akApparition Int iEquippedItemType = akApparition.GetEquippedItemType(1) diff --git a/source/scripts/_00e_fs_dreameatersc.psc b/source/scripts/_00e_fs_dreameatersc.psc index bdbfa643..acbff15b 100644 --- a/source/scripts/_00e_fs_dreameatersc.psc +++ b/source/scripts/_00e_fs_dreameatersc.psc @@ -35,6 +35,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster) If akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP) + akTarget.DispelSpell(_00E_FS_PsychosisWeaknessSP_NoSlow) EndIf EndEvent @@ -69,3 +70,4 @@ Message Property _00E_FS_FakeStealthMsg Auto Sound Property UISneakAttackM Auto Spell Property _00E_FS_PsychosisWeaknessSP Auto +Spell Property _00E_FS_PsychosisWeaknessSP_NoSlow Auto diff --git a/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc b/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc index 6472ee53..6013673a 100644 --- a/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc +++ b/source/scripts/_00e_fs_nq07_dinnercontrolsc.psc @@ -52,4 +52,4 @@ Potion Property FoodCabbagePotatoSoup Auto GlobalVariable Property FS_NQ07_HoneyWineBought Auto GlobalVariable Property FS_NQ07_ChickenCooked Auto -GlobalVariable Property FS_NQ07_SoupBrewed Auto \ No newline at end of file +GlobalVariable Property FS_NQ07_SoupBrewed Auto diff --git a/source/scripts/_00e_fs_nqr05_perversionsc.psc b/source/scripts/_00e_fs_nqr05_perversionsc.psc index 4fded896..d1827f0c 100644 --- a/source/scripts/_00e_fs_nqr05_perversionsc.psc +++ b/source/scripts/_00e_fs_nqr05_perversionsc.psc @@ -41,8 +41,10 @@ Function PlayDeathFX() SetCriticalStage(CritStage_DisintegrateEnd) myActorBase.SetEssential(True) - If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp) - ; Player receives EXP + If RewardExp > 0 + If (Game.GetPlayer() as _00E_EPUpdateFunctions).receiveEP(RewardExp) + ; Player receives EXP + EndIf EndIf EndFunction diff --git a/source/scripts/_00e_fs_psychosissc.psc b/source/scripts/_00e_fs_psychosissc.psc index 3e295c13..4c04cf1c 100644 --- a/source/scripts/_00e_fs_psychosissc.psc +++ b/source/scripts/_00e_fs_psychosissc.psc @@ -24,42 +24,39 @@ EndEvent ;===================================================================================== Function CheckForPsychosis() - - If !akVictim.HasSpell(_00E_FS_PsychosisWeaknessSP) - - If !akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) + If akVictim.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) == False + If akVictim.HasSpell(_00E_FS_PsychosisCounter_01_SP) == False akVictim.AddSpell(_00E_FS_PsychosisCounter_01_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) + ElseIf akVictim.HasSpell(_00E_FS_PsychosisCounter_02_SP) == False + akVictim.AddSpell(_00E_FS_PsychosisCounter_02_SP, False) Else AddDebuff() EndIf - EndIf - EndFunction Function AddDebuff() - + Spell weaknessSpell = _00E_FS_PsychosisWeaknessSP_NoSlow If caster == PlayerREF + If PlayerREF.HasPerk(_00E_Class_Sinistrope_P08_C_Illusionist) + weaknessSpell = _00E_FS_PsychosisWeaknessSP + EndIf _00E_FS_Psychosis_Weakened.Show() EndIf - float fResist = caster.GetActorValue("Illusion")/2 + Float fResist = caster.GetActorValue("Illusion") * 0.5 - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) + weaknessSpell.SetNthEffectMagnitude(0, fResist) + weaknessSpell.SetNthEffectMagnitude(1, fResist) + weaknessSpell.SetNthEffectMagnitude(2, fResist) + weaknessSpell.SetNthEffectMagnitude(3, fResist) + weaknessSpell.SetNthEffectMagnitude(4, 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_02_SP) - EndFunction ;===================================================================================== @@ -71,7 +68,10 @@ Actor caster Actor Property PlayerREF 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 diff --git a/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc b/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc index 508be80b..41436723 100644 --- a/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc +++ b/source/scripts/_00e_fs_theriantrophist_allowtemptsc.psc @@ -1,47 +1,16 @@ Scriptname _00E_FS_Theriantrophist_AllowTempTSC extends ObjectReference Event OnTriggerEnter(ObjectReference akActionRef) - - if akActionRef == PlayerREF - + If akActionRef == PlayerREF _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(1) - - if bCrampyDungeon - fOriginalScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.92) - endif - - endif - - - + EndIf EndEvent Event OnTriggerLeave(ObjectReference akActionRef) - - if akActionRef == PlayerREF - + If akActionRef == PlayerREF _00E_FS_Theriantrophist_AllowTemporaryTransform.SetValueInt(0) - - if bCrampyDungeon - - if fOriginalScale > 0 - PlayerREF.SetScale(fOriginalScale) - else - PlayerREF.SetScale(1.0) - endif - - endif - - endif - - + EndIf EndEvent -float fOriginalScale = 1.0 - -bool Property bCrampyDungeon = False Auto -; This makes the werewolf a bit smaller - Actor Property PlayerREF Auto GlobalVariable Property _00E_FS_Theriantrophist_AllowTemporaryTransform Auto \ No newline at end of file diff --git a/source/scripts/_00e_game_skillmenusc.psc b/source/scripts/_00e_game_skillmenusc.psc index d1e22ef3..9c63de52 100644 --- a/source/scripts/_00e_game_skillmenusc.psc +++ b/source/scripts/_00e_game_skillmenusc.psc @@ -39,8 +39,7 @@ Event OnKeyDown(Int KeyCode) If KeyCode == iHeroMenuKeycode || (MenuOpen && (KeyCode == iExitHeroMenuKeycode1 || KeyCode == iExitHeroMenuKeycode2)) If !MenuOpen - If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && bReadyToOpen && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location - bReadyToOpen = False + If Utility.IsInMenuMode() == False && UI.IsTextInputEnabled() == False && PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location && bReadyToOpen bReadyToOpen = False InitializeActorValueInfos() OpenSkillmenu() diff --git a/source/scripts/_00e_mq10a_functions.psc b/source/scripts/_00e_mq10a_functions.psc index 996c1bea..8ee16e07 100644 --- a/source/scripts/_00e_mq10a_functions.psc +++ b/source/scripts/_00e_mq10a_functions.psc @@ -15,8 +15,7 @@ Function SetUpScene() MQ10a_SC1_HeartParentREF.Enable() Levelsystem.RemoveSilence() PlayerREF.MoveTo(PlayerStartMarkerNew) - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.85) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) Levelsystem.SkipTimeToHour(18.4) Game.ForceFirstPerson() _00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0 diff --git a/source/scripts/_00e_mq12c_functions.psc b/source/scripts/_00e_mq12c_functions.psc index 1cec8cc4..b02dc706 100644 --- a/source/scripts/_00e_mq12c_functions.psc +++ b/source/scripts/_00e_mq12c_functions.psc @@ -254,8 +254,7 @@ Function StartSC03() _00E_QuestFunctions.PlayerAIWalkStop() Game.ShowFirstPersonGeometry(False) Game.RequestAutoSave() - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.85) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) TimeScale.SetValue(0.1) Levelsystem.SkipTimeToHour(18.5) ImageSpaceModifier.RemoveCrossFade(3) diff --git a/source/scripts/_00e_mq12c_harbirsiegesc.psc b/source/scripts/_00e_mq12c_harbirsiegesc.psc index 72f3d18f..f3b14ee7 100644 --- a/source/scripts/_00e_mq12c_harbirsiegesc.psc +++ b/source/scripts/_00e_mq12c_harbirsiegesc.psc @@ -6,8 +6,7 @@ Scriptname _00E_MQ12c_HarbirSiegeSC extends ObjectReference Conditional Event OnTriggerEnter(ObjectReference akActionRef) - If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF - _00E_EnderalOvercast.SetActive(True) + If akActionRef == PlayerREF bInTrigger = True RegisterForSingleUpdate(1) SpotPlayer() @@ -17,9 +16,8 @@ EndEvent Event OnTriggerLeave(ObjectReference akActionRef) - If MQ12c.GetStage() >= 5 && akActionRef == PlayerREF + If akActionRef == PlayerREF bInTrigger = False - Weather.ReleaseOverride() if MQ12c_OpenFire.GetValueInt() == 1 StopFireOnPlayer() EndIf @@ -49,6 +47,7 @@ State KillPlayerState EndEvent EndState + ;===================================================================================== ; FUNCTIONS ;===================================================================================== @@ -150,13 +149,9 @@ Message Property _00E_MQ12c_CaughtByNehrimese Auto MusicType Property _00E_Music_Combat_BonehunterNoCond Auto -Weather Property _00E_EnderalOvercast Auto - Sound Property MAGVampireSunlight Auto Spell Property _00E_MQ12c_BallistaSpell Auto -Quest Property MQ12c Auto - Topic Property MQ12c_D01_NehrimeseScoutBranchTopic Auto Topic Property BanditDialogue_NormalToCombat Auto \ No newline at end of file diff --git a/source/scripts/_00e_mq13a_functions.psc b/source/scripts/_00e_mq13a_functions.psc index ad268690..fdffcf35 100644 --- a/source/scripts/_00e_mq13a_functions.psc +++ b/source/scripts/_00e_mq13a_functions.psc @@ -326,10 +326,13 @@ Function CleanUpAndSetUpSC07() PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(0), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(1), 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) - EndIf + EndIf /; Weather.ReleaseOverride() MQ13a_Door02_REF.Enable() diff --git a/source/scripts/_00e_mq13a_grammophonesc.psc b/source/scripts/_00e_mq13a_grammophonesc.psc index 1dd1c870..fb03f968 100644 --- a/source/scripts/_00e_mq13a_grammophonesc.psc +++ b/source/scripts/_00e_mq13a_grammophonesc.psc @@ -1,21 +1,127 @@ 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 Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && bMusicLocked == False + bMusicLocked = True - If !bIsPlaying - bIsPlaying = True - _00E_MUS_Special_DrachenflugM.Play(Self) - RegisterForSingleUpdate(160) + If iSoundID == -1 + PlayMusic(_00E_MUS_Special_DrachenflugM, MUSIC_LENGTH) + Else + ChangeMusicVolume() + EndIf + + bMusicLocked = False EndIf - 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 \ No newline at end of file + Event OnUnload() + ; Do nothing + EndEvent +EndState diff --git a/source/scripts/_00e_nq_g_07_functions.psc b/source/scripts/_00e_nq_g_07_functions.psc index 3a530d44..d64f7feb 100644 --- a/source/scripts/_00e_nq_g_07_functions.psc +++ b/source/scripts/_00e_nq_g_07_functions.psc @@ -486,8 +486,7 @@ EndFunction Function PlayKiss() If PlayerREF.GetActorBase().GetRace() == HighElfRace - fPlayerScale = PlayerREF.GetScale() - PlayerREF.SetScale(0.92) + fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) EndIf PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) @@ -529,9 +528,7 @@ Function FadeOut() PlayerREF.RemoveSpell(_00E_Game_abSlowTime) If PlayerREF.GetActorBase().GetRace() == HighElfRace - PlayerREF.SetScale(fPlayerScale) - EndIf PlayerREF.SetUnconscious(False) diff --git a/source/scripts/_00e_perkblutrauschffaimedscript.psc b/source/scripts/_00e_perkblutrauschffaimedscript.psc new file mode 100644 index 00000000..36d5bd5d --- /dev/null +++ b/source/scripts/_00e_perkblutrauschffaimedscript.psc @@ -0,0 +1,5 @@ +Scriptname _00E_PerkBlutrauschFFAimedScript extends activemagiceffect + +Event OnEffectStart(Actor akTarget, Actor akCaster) + Debug.Trace("Bloodlust: OnEffectStart") +EndEvent \ No newline at end of file diff --git a/source/scripts/_00e_phasmalist_newapparitionalias.psc b/source/scripts/_00e_phasmalist_newapparitionalias.psc index 7c999a08..9143ea62 100644 --- a/source/scripts/_00e_phasmalist_newapparitionalias.psc +++ b/source/scripts/_00e_phasmalist_newapparitionalias.psc @@ -47,6 +47,8 @@ Int Property iGhostlyWarriorBoostArmorSkill1 = 7 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill2 = 17 AutoReadOnly Int Property iGhostlyWarriorBoostArmorSkill3 = 30 AutoReadOnly +Float Property DEFAULT_HEAL_RATE = 50.0 AutoReadOnly + Explosion Property _00E_Phasmalist_EnterWorldExp 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 Actor Property AliasFailsafeRef = None Auto Hidden +Bool bTeleportHealRate = False + ;===================================================================================== ; SUMMON & SETUP @@ -108,6 +112,7 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo SummonTrinket = trinket bActivationBusy = bPhasmalismTankMode ; Reset just in case + bTeleportHealRate = False ; Reset just in case _00E_Phasmalist_IsApparitionSummoned.SetValue(1) Setup() ; init stats before any armor buffs are applied @@ -158,11 +163,8 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo EndFunction Function PlaySummonExplosion(ObjectReference markerRef) - ObjectReference expMarker = markerRef.placeAtMe(XMarker) - expMarker.MoveTo(markerRef, 0.0, 0.0, 15) - expMarker.PlaceAtMe(_00E_Phasmalist_EnterWorldExp) - expMarker.Disable() - expMarker.Delete() + ObjectReference expMarker = _PlaceExplosionEx(_00E_Phasmalist_EnterWorldExp, markerRef, 15.0) + _DeleteMarker(expMarker) EndFunction Int Property BOOST_CLASS_MAGE = 0 AutoReadOnly @@ -219,11 +221,19 @@ EndFunction Function SetupNotPersistentStats(Actor akSelf) 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) ;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) EndFunction @@ -290,8 +300,11 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel) akSelf.ModAV("HeavyArmor", iBoostArmor) ;akSelf.ForceAV("LightArmor", akSelf.GetAV("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.ModAV("MeleeDamage", iBoostMelee) + ;akSelf.ModAV("MeleeDamage", iBoostMelee) + akSelf.ModAV("OneHanded", iBoostMelee) + akSelf.ModAV("TwoHanded", iBoostMelee) Else Debug.Notification("Phasmalist Control Quest has issues: Unsupported boost class " + iBoostClass) EndIf @@ -393,12 +406,20 @@ EndFunction Function TeleportToPlayer(Bool bTeleportInFront, Bool bSilent) Actor akSelf = Self.GetActorReference() 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() _MoveToPlayer(akSelf, bTeleportInFront) akSelf.Enable() If bSilent == False akSelf.PlaceAtMe(_00E_Phasmalist_EnterWorldExp) EndIf + + RegisterForSingleUpdate(2.0) EndIf EndFunction @@ -460,10 +481,11 @@ FormList Property _00E_Phasmalist_CombatStyleWerewolfList Auto Spell Property _00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP Auto Idle Property WerewolfTransformBack Auto Idle Property IdleWerewolfTransformation Auto -Idle Property _00E_IdleStomp Auto Explosion Property _00E_FS_Theriantrophist_TransEXP Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace 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_HEALTH_BOOST = 40.0 AutoReadOnly @@ -475,34 +497,38 @@ Bool Function IsTransformedToWerewolf() EndFunction Function TransformToWerewolf(Actor akSpellTarget) + ObjectReference expMarker + Actor akSelf = GetActorReference() If (akSelf == None) || (akSelf != akSpellTarget) Return EndIf - akSelf.SetPlayerTeammate(False) + bActivationBusy = True - Utility.Wait(0.2) - akSelf.UnequipAll() + akSelf.SetPlayerTeammate(False) + akSelf.EvaluatePackage() WerewolfTranform_OriginalRace = akSelf.getRace() + Utility.Wait(0.2) akSelf.PlayIdle(IdleWerewolfTransformation) + Utility.Wait(0.8) _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(1, WEREWOLF_TRANSFORM_HEALTH_BOOST) akSelf.AddSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) - - Utility.Wait(1) - - ObjectReference expMarker = akSelf.PlaceAtMe(XMarker) - expMarker.MoveTo(akSelf, 0.0, 0.0, 100.0) - expMarker.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) + expMarker = _PlaceExplosionEx(_00E_FS_Theriantrophist_TransEXP, akSelf, 100.0) + 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 + akSelf.UnequipAll() akSelf.SetRace(_00E_Theriantrophist_PlayerWerewolfRace) - expMarker.Disable() - expMarker.Delete() - Utility.Wait(0.2) + _DeleteMarker(expMarker) + Utility.Wait(0.2) akSelf.SetPlayerTeammate(True) + akSelf.EvaluatePackage() + + bActivationBusy = False EndFunction Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSilent) @@ -511,6 +537,9 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi Return EndIf + bActivationBusy = True + bTeleportHealRate = False + If akSelf.IsDead() _TransformFromWerewolfDead(akSelf, bIsUnsummoned, bSilent) Else @@ -518,25 +547,33 @@ Function TransformFromWerewolf(Actor akSpellTarget, Bool bIsUnsummoned, Bool bSi EndIf WerewolfTranform_OriginalRace = None + + bActivationBusy = False EndFunction Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) + ObjectReference expMarker = None + 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.SetPlayerTeammate(False) akSelf.Resurrect() _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) - - Utility.Wait(0.2) - - If bSilent == False - akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) - EndIf + Utility.Wait(0.2) ; Pause for the ragdoll to settle. Without it the apparition appears in the air on SetRace _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) akSelf.RemoveSpell(_00E_FS_Affinity_Soulcaller_ApparationWolfBoostSP) + If expMarker + _DeleteMarker(expMarker) + expMarker = None + EndIf akSelf.SetRace(WerewolfTranform_OriginalRace) - - Utility.Wait(0.2) + _TriggerEquipmentUpdate(akSelf, False) + akSelf.ClearLookAt() ; Reenable headtracking If bIsUnsummoned == False GoToState("Working") @@ -545,27 +582,42 @@ Function _TransformFromWerewolfDead(Actor akSelf, Bool bIsUnsummoned, Bool bSile EndFunction Function _TransformFromWerewolfAlive(Actor akSelf, Bool bIsUnsummoned, Bool bSilent) + ObjectReference expMarker = None + akSelf.SetPlayerTeammate(False) - If bSilent == False - akSelf.PlaceAtMe(_00E_FS_Theriantrophist_TransEXP) - EndIf + akSelf.EvaluatePackage() akSelf.PlayIdle(WerewolfTransformBack) - _SetCombatStyle(akSelf, SummonTrinket.GetUsedCombatStyle()) 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) - ; RemoveAllItems is necessary to correctly reequip items - akSelf.RemoveAllItems(_00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest) - _00E_FS_Affinity_Soulcaller_RemoveAndAddApparationItemsChest.RemoveAllItems(akSelf) - akSelf.PlayIdle(_00E_IdleStomp) - If bIsUnsummoned - Utility.Wait(0.2) - Else - Utility.Wait(0.1) + _TriggerEquipmentUpdate(akSelf, True) + If expMarker + _DeleteMarker(expMarker) + expMarker = None + EndIf + Utility.Wait(0.2) + akSelf.ClearLookAt() ; Reenable headtracking + If bIsUnsummoned == False SetupBehaviour(akSelf) SetupNotPersistentStats(akSelf) + akSelf.EvaluatePackage() EndIf 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 @@ -629,6 +681,18 @@ Function _UnregisterSpellBook(Actor akSelf, Form akBaseItem) EndIf 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 @@ -650,12 +714,14 @@ State Working UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 0, "$View_Attributes") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 0, "$View_Attributes") - - 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") + + If IsTransformedToWerewolf() == False + 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") + EndIf UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionText", 5, "$Quit") UIExtensions.SetMenuPropertyIndexString("UIWheelMenu", "optionLabelText", 5, "$Quit") @@ -708,4 +774,11 @@ State Working EndIf EndEvent + Event OnUpdate() + If bTeleportHealRate + bTeleportHealRate = False + GetActorReference().ForceAV("HealRate", DEFAULT_HEAL_RATE) + EndIf + EndEvent + EndState diff --git a/source/scripts/_00e_phasmalist_workbench.psc b/source/scripts/_00e_phasmalist_workbench.psc index 33535a91..c3f2b001 100644 --- a/source/scripts/_00e_phasmalist_workbench.psc +++ b/source/scripts/_00e_phasmalist_workbench.psc @@ -1,21 +1,21 @@ Scriptname _00E_Phasmalist_Workbench extends ObjectReference ; 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 Property reallyDespectralize auto -_FS_Phasmalist_ControlQuest Property phasmalistControlQuest auto -ObjectReference Property spectralizerContainer auto +Message Property reallyDespectralize Auto +_FS_Phasmalist_ControlQuest Property phasmalistControlQuest Auto +ObjectReference Property spectralizerContainer Auto {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 Message Property _00E_Theriantrophist_CantCraftMSG Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto -_00E_PlayerhousingMaster Property PlayerhousingMaster Auto GlobalVariable Property _00E_Phasmalist_TankMode Auto +Static Property _00E_NPCMarkerBlue Auto Bool bApparitionPrepared = False bool bApparitionSummoned = False @@ -24,6 +24,10 @@ String Property CRAFTING_MENU = "Crafting Menu" AutoReadOnly String Property CONTAINER_MENU = "ContainerMenu" AutoReadOnly +;===================================================================================== +; EVENTS +;===================================================================================== + Event OnInit() BlockActivation() EndEvent @@ -40,20 +44,36 @@ Event OnActivate(ObjectReference akActionRef) If akActionRef == PlayerREF GoToState("Waiting") - If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace - _00E_Theriantrophist_CantCraftMSG.Show() - ElseIf (((Self as ObjectReference) as _00E_Playerhousing_Furniture) == None) || PlayerhousingMaster.GetState() == "Buildmode" - ShowMainMenu() + If _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) + If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace + _00E_Theriantrophist_CantCraftMSG.Show() + Else + ShowMainMenu() + Return + EndIf EndIf + + GoToState("") Else Activate(akActionRef, true) EndIf EndEvent +State Waiting + Event OnActivate(ObjectReference akActionRef) + ; Do nothing + EndEvent +EndState + + +;===================================================================================== +; PHASMALISM MENU +;===================================================================================== + ; Summons the apparition and places it in the tank Function PrepareApparition() If bApparitionPrepared == False - ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) + ObjectReference tankMarkerRef = GetTankMarker() If bApparitionPrepared == False bApparitionPrepared = True _00E_Phasmalist_TankMode.SetValue(1) @@ -76,7 +96,7 @@ EndFunction Function ResetApparitionOnInventoryChange() If bApparitionPrepared - ObjectReference tankMarkerRef = GetlinkedRef(_00E_Phasmalist_CraftingWorkbench_NPCMarker) + ObjectReference tankMarkerRef = GetTankMarker() Actor akApparition = phasmalistControlQuest.GetApparitionRef() If akApparition akApparition.Disable() @@ -264,7 +284,7 @@ State Spectralize EndState State Despectralize - Event onBeginState() + Event OnBeginState() Actor akApparition = phasmalistControlQuest.GetApparitionRef() If akApparition reallyDespectralize.show() @@ -299,8 +319,68 @@ State Despectralize EndEvent EndState -State Waiting - Event OnActivate(ObjectReference akActionRef) - ; Do nothing - EndEvent -EndState + +;===================================================================================== +; PLACEABLE WORKBENCH +;===================================================================================== + +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 \ No newline at end of file diff --git a/source/scripts/_00e_questfunctions.psc b/source/scripts/_00e_questfunctions.psc index 213fa428..ff55b944 100644 --- a/source/scripts/_00e_questfunctions.psc +++ b/source/scripts/_00e_questfunctions.psc @@ -133,14 +133,7 @@ endFunction Function DisableDialogueQuitting() Global {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) EndFunction @@ -1235,7 +1228,7 @@ Message Property _00E_PleaseRemoveMoney Auto GlobalVariable Property GameHour Auto -;--------------------------------------VISION-----------------------------------; +;--------------------------------------VISION----------------------------------- float PlayerSpeed int VisionSound diff --git a/source/scripts/_00e_smokingpipescript.psc b/source/scripts/_00e_smokingpipescript.psc index e93f9460..29cab54c 100644 --- a/source/scripts/_00e_smokingpipescript.psc +++ b/source/scripts/_00e_smokingpipescript.psc @@ -1,10 +1,14 @@ -Scriptname _00E_SmokingPipeScript extends ObjectReference +Scriptname _00E_SmokingPipeScript extends ObjectReference _00E_PeaceweedControlScript Property PeaceweedControl Auto Actor Property PlayerRef Auto Event OnEquipped(Actor akActor) 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 EndEvent \ No newline at end of file diff --git a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc index 580eac2d..fba5a5af 100644 --- a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc +++ b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc @@ -1,27 +1,30 @@ 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 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() - elseif !((self as ObjectReference) as _00E_Playerhousing_Furniture) - Activate(akActionRef, true) - endif - - else - Activate(akActionRef, true) - endif + If PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace + _00E_Theriantrophist_CantCraftMSG.Show() + Else + Activate(akActionRef, true) + EndIf + bActivationBlocked = False + EndIf + Else + Activate(akActionRef, true) + EndIf EndEvent - -Actor Property PlayerREF Auto -Message Property _00E_Theriantrophist_CantCraftMSG Auto -Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto \ No newline at end of file diff --git a/source/scripts/_00e_theriantrophist_wolfattributes.psc b/source/scripts/_00e_theriantrophist_wolfattributes.psc index 7465767b..6b36d61f 100644 --- a/source/scripts/_00e_theriantrophist_wolfattributes.psc +++ b/source/scripts/_00e_theriantrophist_wolfattributes.psc @@ -141,6 +141,12 @@ State WolfForm carryCapacityMod = PlayerREF.getAV("CarryWeight") - WerewolfBaseCarryCapacity 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 temporarySpeedMultMod = 0 renewNotPersistentStats() diff --git a/source/scripts/_00e_weathercontrolscriptsc.psc b/source/scripts/_00e_weathercontrolscriptsc.psc index a6e899de..59a52062 100644 --- a/source/scripts/_00e_weathercontrolscriptsc.psc +++ b/source/scripts/_00e_weathercontrolscriptsc.psc @@ -78,6 +78,14 @@ Event OnLocationChange(Location akOldLoc, Location akNewLoc) bGradualTransition = True 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 SetNewWeather(iNewWeather, bGradualTransition) @@ -158,8 +166,10 @@ Bool Function LocationIsSuntemple(Location lc) EndFunction Bool Function LocationIsArk(Location lc) - If lc && ((lc == CapitalCityLocation) || lc.isChild(CapitalCityLocation)) - Return True + If lc + If (lc == CapitalCityLocation) || (lc == ArkSiegeWeather) || lc.isChild(CapitalCityLocation) + Return True + EndIf EndIf Return False @@ -244,6 +254,8 @@ Int iCurrentArkWeather = 0 Bool bGameTimeUpdatesActive = False Location Property CapitalCityLocation Auto +Location Property ArkSiegeWeather Auto +Location Property ArkSiegeWeatherEdge Auto FormList Property _00E_SuntempleLocations Auto Weather Property _00E_EnderalOvercast Auto diff --git a/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc b/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc index a775f796..fd417ce4 100644 --- a/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc +++ b/source/scripts/_60e_fs_mystical_thoughtimplosionsc.psc @@ -4,19 +4,16 @@ Scriptname _60E_FS_Mystical_ThoughtImplosionSC extends ActiveMagicEffect ; EVENTS ;===================================================================================== - 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 - Elseif iChance >= 33 && iChance < 66 + ElseIf iChance < 66 || akTarget.HasMagicEffect(_00E_FS_PsychosisWeaknessVisualME) PushBack(akTarget) - Elseif iChance >= 66 + Else Weaken(akTarget) EndIf - EndEvent ;===================================================================================== @@ -24,34 +21,39 @@ EndEvent ;===================================================================================== Function PushBack(Actor Target) - MAGAlterationTelekinesisThrow.Play(Target) - float fPushStrength = (PlayerREF.GetActorValue("Illusion")/10) - - if fPushStrength < 4 + Float fPushStrength = PlayerREF.GetActorValue("Illusion") / 10.0 + If fPushStrength < 4 _00E_FS_PsionicPushStaggerSP.Cast(Target, Target) Else - PlayerREF.PushActorAway(Target, (PlayerREF.GetActorValue("Illusion")/10)) + PlayerREF.PushActorAway(Target, fPushStrength) EndIf - EndFunction 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() - float fResist = PlayerREF.GetActorValue("Illusion")/2 + Float fResist = PlayerREF.GetActorValue("Illusion") * 0.5 - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(0, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(1, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(2, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(3, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(4, fResist) - _00E_FS_PsychosisWeaknessSP.SetNthEffectMagnitude(5, fResist) + weaknessSpell.SetNthEffectMagnitude(0, fResist) + weaknessSpell.SetNthEffectMagnitude(1, fResist) + weaknessSpell.SetNthEffectMagnitude(2, fResist) + weaknessSpell.SetNthEffectMagnitude(3, fResist) + weaknessSpell.SetNthEffectMagnitude(4, 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 ;===================================================================================== @@ -60,9 +62,16 @@ EndFunction Actor Property PlayerREF Auto -Spell Property _00E_FS_PsychosisWeaknessSP Auto Spell Property _00E_FS_PsionicPushStaggerSP Auto Sound Property MAGAlterationTelekinesisThrow Auto -Message Property _00E_FS_Psychosis_Weakened Auto \ No newline at end of file +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 diff --git a/source/scripts/_fs_phasmalist_controlquest.psc b/source/scripts/_fs_phasmalist_controlquest.psc index f015632f..17aaadae 100644 --- a/source/scripts/_fs_phasmalist_controlquest.psc +++ b/source/scripts/_fs_phasmalist_controlquest.psc @@ -22,12 +22,14 @@ GlobalVariable Property _00E_Phasmalist_TankMode Auto Message Property _00E_Phasmalist_NoApparitionCurrentlySummoned Auto +Perk Property _00E_Class_Phasmalist_P05_C_Violence_01 Auto + Actor Property PlayerREF Auto Bool bCreatedFirstTrinket = false Int iScriptVersion = 0 -Int Property CURRENT_SCRIPT_VERSION = 1 AutoReadOnly +Int Property CURRENT_SCRIPT_VERSION = 2 AutoReadOnly ;===================================================================================== @@ -78,6 +80,11 @@ Function LoadGameFailsave() RegisterTeleportKey() ((self as Quest) as _FS_Phasmalist_AffinityControlQuest).OnGameLoad() ; Obsolete, not needed anymore, so shut it down bDoApparitionOnLoadGame = False + Else + If iScriptVersion < 2 && PlayerREF.HasPerk(_00E_Class_Phasmalist_P05_C_Violence_01) && IsApparitionSpawned() + SummonApparition(PlayerREF, False, True) + bDoApparitionOnLoadGame = False + EndIf EndIf iScriptVersion = CURRENT_SCRIPT_VERSION diff --git a/source/scripts/frostslowfix.psc b/source/scripts/frostslowfix.psc index 86eaefef..5d14aeb8 100644 --- a/source/scripts/frostslowfix.psc +++ b/source/scripts/frostslowfix.psc @@ -1,43 +1,37 @@ 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.} +Keyword Property MagicSlowDownTarget Auto -MagicEffect Property FrostSlowFFAimed Auto -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) +Actor Target -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) - - If (akTarget.HasMagicEffect(FrostSlowFFAimed)||akTarget.HasMagicEffect(FrostSlowConcAimed)||akTarget.HasMagicEffect(FrostSlowFFContact)||akTarget.HasMagicEffect(FrostSlowFFSelfArea100))==0 - basespeed=akTarget.GetBaseActorValue("Fame") - akTarget.SetActorValue("Speedmult", basespeed) - akTarget.SetActorValue("Fame", 0) + If Target == None ; version update + Target = akTarget 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 diff --git a/source/scripts/fs_nq05_alchemyscript.psc b/source/scripts/fs_nq05_alchemyscript.psc index c148176b..f819f265 100644 --- a/source/scripts/fs_nq05_alchemyscript.psc +++ b/source/scripts/fs_nq05_alchemyscript.psc @@ -10,21 +10,24 @@ Ingredient Property MothWingMonarch Auto Ingredient Property Garlic 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) - int iButton = FS_NQ05_AlchemyMessagebox.Show() - - if iButton == 0 - PlayerREF.RemoveItem(Nirnroot, 1) - PlayerREF.RemoveItem(SkeeverTail, 1) - PlayerREF.RemoveItem(MothWingMonarch, 1) - PlayerREF.RemoveItem(Garlic, 1) - PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) - FS_NQ05.SetStage(40) - ElseIf iButton == 1 - Return +Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True + + Int qStage = FS_NQ05.GetStage() + If qStage >= 30 && qStage < 40 + If FS_NQ05_AlchemyMessagebox.Show() == 0 + PlayerREF.RemoveItem(Nirnroot, 1) + PlayerREF.RemoveItem(SkeeverTail, 1) + PlayerREF.RemoveItem(MothWingMonarch, 1) + PlayerREF.RemoveItem(Garlic, 1) + PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) + FS_NQ05.SetStage(40) + EndIf EndIf - Endif + bActivationBlocked = False + EndIf EndEvent \ No newline at end of file diff --git a/source/scripts/fs_nq07_alchemyscript.psc b/source/scripts/fs_nq07_alchemyscript.psc index fd3299d8..5b827ac8 100644 --- a/source/scripts/fs_nq07_alchemyscript.psc +++ b/source/scripts/fs_nq07_alchemyscript.psc @@ -9,21 +9,23 @@ Ingredient Property FrostMirriam Auto Potion Property FoodBananenschnaps Auto Message Property _00E_FS_NQ07_AlchemyMessagebox Auto +Bool bActivationBlocked = False -Event OnActivate(objectReference akActionRef) - If (akActionRef == PlayerREF && FS_NQ07.GetStage() == 115) - int iButton = _00E_FS_NQ07_AlchemyMessagebox.Show() - - if iButton == 0 - PlayerREF.RemoveItem(FoodMead, 1) - PlayerREF.RemoveItem(FrostMirriam, 2) - PlayerREF.RemoveItem(FoodBananenschnaps, 1) - PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) - FS_NQ07.SetStage(120) - ElseIf iButton == 1 - Return +Event OnActivate(ObjectReference akActionRef) + If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False + bActivationBlocked = True + + If FS_NQ07.GetStage() == 115 + If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0 + PlayerREF.RemoveItem(FoodMead, 1) + PlayerREF.RemoveItem(FrostMirriam, 2) + PlayerREF.RemoveItem(FoodBananenschnaps, 1) + PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) + FS_NQ07.SetStage(120) + EndIf EndIf - EndIf + bActivationBlocked = False + EndIf EndEvent diff --git a/source/scripts/fxwitchlightattachscript.psc b/source/scripts/fxwitchlightattachscript.psc new file mode 100644 index 00000000..a79358a6 --- /dev/null +++ b/source/scripts/fxwitchlightattachscript.psc @@ -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 +