diff --git a/Enderal SE v2.1.4 Changelog.txt b/Enderal SE v2.1.4 Changelog.txt index 7e0fc644e..934f09723 100644 --- a/Enderal SE v2.1.4 Changelog.txt +++ b/Enderal SE v2.1.4 Changelog.txt @@ -8,7 +8,7 @@ Beware, spoilers ahead! 2.1.4 (TBD) - Chinese Simplified localization revision by DaisyComment (no translation of lines added after 2.0.12.4 yet). -- Fixed random crashes caused by guards conversation scenes, when any of them is riding a horse. +- Fixed random crashes caused by guards conversation scenes, when any of them is riding a horse (reported by cloudropis). - Dreamflower can be found without finishing The Secrets first. - Dimension Rift might get stuck in an infinite effect+sound loop if player left the cell while it's active. - Fixed missing damage from spectral arrows produced by the Arcane Arrow affinity. diff --git a/Skyrim.esm b/Skyrim.esm index 95710d18c..5b7236857 100644 Binary files a/Skyrim.esm and b/Skyrim.esm differ diff --git a/Update.esm b/Update.esm index b89b55b50..df0ee669a 100644 Binary files a/Update.esm and b/Update.esm differ diff --git a/scripts/ccbgs_arbuttonscript.pex b/scripts/ccbgs_arbuttonscript.pex new file mode 100644 index 000000000..89e3ca1ae Binary files /dev/null and b/scripts/ccbgs_arbuttonscript.pex differ diff --git a/scripts/ccbgs_arfloorsmasherscript.pex b/scripts/ccbgs_arfloorsmasherscript.pex new file mode 100644 index 000000000..1740dc88f Binary files /dev/null and b/scripts/ccbgs_arfloorsmasherscript.pex differ diff --git a/scripts/ccbgs_arportcullisscript.pex b/scripts/ccbgs_arportcullisscript.pex new file mode 100644 index 000000000..90598536f Binary files /dev/null and b/scripts/ccbgs_arportcullisscript.pex differ diff --git a/scripts/ccbgs_arpressureplatescript.pex b/scripts/ccbgs_arpressureplatescript.pex new file mode 100644 index 000000000..b88390442 Binary files /dev/null and b/scripts/ccbgs_arpressureplatescript.pex differ diff --git a/scripts/ccbgs_arspiketrapscript.pex b/scripts/ccbgs_arspiketrapscript.pex new file mode 100644 index 000000000..b6d8eeb3c Binary files /dev/null and b/scripts/ccbgs_arspiketrapscript.pex differ diff --git a/scripts/ccbgs_arswitchscript.pex b/scripts/ccbgs_arswitchscript.pex new file mode 100644 index 000000000..9959be570 Binary files /dev/null and b/scripts/ccbgs_arswitchscript.pex differ diff --git a/scripts/scriptarchiveorder.txt b/scripts/scriptarchiveorder.txt index a61c83b3f..4b087261f 100644 --- a/scripts/scriptarchiveorder.txt +++ b/scripts/scriptarchiveorder.txt @@ -4798,4 +4798,10 @@ scripts\_00E_UpdateSpeedmult.pex scripts\_00E_AutolearnEffectsAlias.pex scripts\_00E_ArcaneArrowEffect.pex scripts\_00E_AlchArcaneFever.pex -scripts\_00E_HelpMessage.pex \ No newline at end of file +scripts\_00E_HelpMessage.pex +scripts\ccbgs_arbuttonscript.pex +scripts\ccbgs_arfloorsmasherscript.pex +scripts\ccbgs_arportcullisscript.pex +scripts\ccbgs_arpressureplatescript.pex +scripts\ccbgs_arspiketrapscript.pex +scripts\ccbgs_arswitchscript.pex diff --git a/source/scripts/ccbgs_arbuttonscript.psc b/source/scripts/ccbgs_arbuttonscript.psc new file mode 100644 index 000000000..002ad93b7 --- /dev/null +++ b/source/scripts/ccbgs_arbuttonscript.psc @@ -0,0 +1,19 @@ +Scriptname ccBGS_ARButtonScript extends ObjectReference +{Shared script for Ayleid button} + +Bool Property bPlayerOnly = false Auto +Sound Property ActivateSound Auto + +Auto State Waiting + Event OnActivate(ObjectReference akActionRef) + GoToState("Busy") + If(bPlayerOnly && akActionRef == Game.GetPlayer() || !bPlayerOnly) + ActivateSound.Play(self) + PlayAnimationAndWait("Stage2ReturnStage1", "TransitionComplete") + EndIf + GoToState("Waiting") + EndEvent +EndState + +State Busy +EndState \ No newline at end of file diff --git a/source/scripts/ccbgs_arfloorsmasherscript.psc b/source/scripts/ccbgs_arfloorsmasherscript.psc new file mode 100644 index 000000000..9cf76ed28 --- /dev/null +++ b/source/scripts/ccbgs_arfloorsmasherscript.psc @@ -0,0 +1,30 @@ +Scriptname ccBGS_ARFloorSmasherScript extends ObjectReference +{Shared trap script for floor smasher.} + +Actor Property PlayerREF Auto +Bool Property bPlayerOnly = True Auto +Float Property fDelayReturn = 1.5 Auto +Float Property fDelayReset = 5.0 Auto + +Sound Property ccBGS_TRP_TRPARFloorSmasherUp01SD Auto +Sound Property ccBGS_TRP_TRPARFloorSmasherDown01SD Auto + +Auto State Waiting + + Event OnTriggerEnter(ObjectReference akActionRef) + If(!bPlayerOnly || akActionRef == PlayerREF) + GoToState("Busy") + ccBGS_TRP_TRPARFloorSmasherUp01SD.Play(akActionRef) + PlayAnimationAndWait("Stage2", "TransitionComplete") + Utility.Wait(fDelayReturn) + ccBGS_TRP_TRPARFloorSmasherDown01SD.Play(akActionRef) + PlayAnimationAndWait("Stage1", "TransitionComplete") + Utility.Wait(fDelayReset) + GoToState("Waiting") + EndIf + EndEvent + +EndState + +State Busy +EndState \ No newline at end of file diff --git a/source/scripts/ccbgs_arportcullisscript.psc b/source/scripts/ccbgs_arportcullisscript.psc new file mode 100644 index 000000000..260ce90f8 --- /dev/null +++ b/source/scripts/ccbgs_arportcullisscript.psc @@ -0,0 +1,98 @@ +Scriptname ccBGS_ARPortcullisScript extends ObjectReference +{Shared script for Ayleid gates and secret doors. LinkedRefs with LinkCustom01 will be disabled/enabled with animations, e.g. collision volumes or navcuts.} + +Keyword Property LinkCustom01 Auto +{Link keyword for enable/disable} + +Bool Property bDownByDefault = False Auto +{Set whether it's Down by default or not} + +Bool Property bDoOnce = False Auto +{Only open/close once} + +Bool Property bCanActorsOpen = False Auto +{Allow actors to open/close directly} + +Message Property MessageToShow Auto +{Optional message to show if player is not allowed to activate} + +Sound Property SoundOpen Auto +Sound Property SoundClose Auto + +ObjectReference LinkedObject + +Event OnLoad() + SetDefaultState() +EndEvent + +Event OnReset() + SetDefaultState() +EndEvent + +Function SetDefaultState() + If(bDownByDefault) + GoToState("Down") + PlayAnimation("Stage2") ;Down + DisableLinkedRef() + Else + GoToState("Up") + PlayAnimation("Stage1") ;Up + EnableLinkedRef() + EndIf +EndFunction + +Auto State Up + Event OnActivate(ObjectReference akActionRef) + If(bCanActorsOpen || !akActionRef.GetBaseObject() as ActorBase) + GoToState("Busy") + SoundOpen.Play(self) + PlayAnimationAndWait("Stage2", "TransitionComplete") + DisableLinkedRef() + If(bDoOnce) + GoToState("Finished") + Else + GoToState("Down") + EndIf + Else + MessageToShow.Show() + EndIf + EndEvent +EndState + +State Down + Event OnActivate(ObjectReference akActionRef) + If(bCanActorsOpen || !akActionRef.GetBaseObject() as ActorBase) + GoToState("Busy") + EnableLinkedRef() + SoundClose.Play(self) + PlayAnimationAndWait("Stage1", "TransitionComplete") + If(bDoOnce) + GoToState("Finished") + Else + GoToState("Up") + EndIf + Else + MessageToShow.Show() + EndIf + EndEvent +EndState + +State Busy +EndState + +State Finished +EndState + +Function EnableLinkedRef() + LinkedObject = GetLinkedRef(LinkCustom01) + If(LinkedObject) + LinkedObject.EnableNoWait() + EndIf +EndFunction + +Function DisableLinkedRef() + LinkedObject = GetLinkedRef(LinkCustom01) + If(LinkedObject) + LinkedObject.DisableNoWait() + EndIf +EndFunction \ No newline at end of file diff --git a/source/scripts/ccbgs_arpressureplatescript.psc b/source/scripts/ccbgs_arpressureplatescript.psc new file mode 100644 index 000000000..c27423887 --- /dev/null +++ b/source/scripts/ccbgs_arpressureplatescript.psc @@ -0,0 +1,61 @@ +Scriptname ccBGS_ARPressurePlateScript extends TrapTriggerBase +{Shared script for Ayleid Pressure Plates. Inherits from TrapTriggerBase, and is based on PressurePlate script.} + +;PLEASE NOTE: This inherits from TrapTriggerBase to make it a fully-functional pressure plate. The states, functions, structure are overrides dicated by that script. + +State Active + + Event OnBeginState() + GoToState("DoNothing") + + If(StoredTriggerType == 1) + Type = 3 + Utility.Wait(0.1) + Activate(self as ObjectReference) + Utility.Wait(0.1) + Else + Activate(Self as ObjectReference) + EndIf + + TriggerSound.Play(self) + If(PlayAnimationAndWait("Stage2","TransitionComplete")) + If(ObjectsInTrigger == 0) + GoToState("Inactive") + PlayAnimation("Stage1") + EndIf + EndIf + + EndEvent + + Event OnTriggerEnter(ObjectReference akActionRef) + ObjectsInTrigger = self.GetTriggerObjectCount() + EndEvent + + Event OnTriggerLeave(ObjectReference akActionRef) + ObjectsInTrigger = self.GetTriggerObjectCount() + If(ObjectsInTrigger == 0) + GoToState("Inactive") + PlayAnimation("Stage1") + EndIf + EndEvent + +EndState + +State DoNothing + + Event OnTriggerEnter(ObjectReference akActionRef) + ObjectsInTrigger = self.GetTriggerObjectCount() + EndEvent + + Event OnTrigger(ObjectReference triggerRef) + EndEvent + + Event OnTriggerLeave(ObjectReference akActionRef) + ObjectsInTrigger = self.GetTriggerObjectCount() + If(ObjectsInTrigger == 0) + GoToState("Inactive") + PlayAnimation("Stage1") + EndIf + EndEvent + +EndState \ No newline at end of file diff --git a/source/scripts/ccbgs_arspiketrapscript.psc b/source/scripts/ccbgs_arspiketrapscript.psc new file mode 100644 index 000000000..751ef5fd3 --- /dev/null +++ b/source/scripts/ccbgs_arspiketrapscript.psc @@ -0,0 +1,18 @@ +Scriptname ccBGS_ARSpikeTrapScript extends HazardBase +{Script for the Ayleid spike trap (inherits from HazardBase)} + +Float Property fHazardInterval = 5.0 Auto + +Auto State CanHit + Event OnTrapHit(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType) + GoToState("CannotHit") + If(isAngleAcceptable(afXVel, afYVel, afZVel)) + doLocalHit(akTarget, afXVel, afYVel, afZVel, afXPos, afYPos, afZPos, aeMaterial, abInitialHit, aeMotionType) + EndIf + RegisterForSingleUpdate(fHazardInterval) + EndEvent +EndState + +Event OnUpdate() + GoToState("CanHit") +EndEvent \ No newline at end of file diff --git a/source/scripts/ccbgs_arswitchscript.psc b/source/scripts/ccbgs_arswitchscript.psc new file mode 100644 index 000000000..aed3022d0 --- /dev/null +++ b/source/scripts/ccbgs_arswitchscript.psc @@ -0,0 +1,47 @@ +Scriptname ccBGS_ARSwitchScript extends ObjectReference +{Shared script for Ayleid activator button} + +Bool Property bPlayerOnly = false Auto +Bool Property bIsInDownState = false Auto +Sound Property ActivateSound Auto + +Event OnLoad() + SetDefaultState() +EndEvent + +Event OnReset() + SetDefaultState() +EndEvent + +Function SetDefaultState() + If(bIsInDownState) + GoToState("PositionDown") + PlayAnimation("ForceStage2") + Else + GoToState("PositionUp") + PlayAnimation("Reset") + EndIf +EndFunction + +Auto State PositionUp + Event OnActivate(ObjectReference akActionRef) + GoToState("Busy") + bIsInDownState = True + ActivateSound.Play(self) + PlayAnimationAndWait("Stage2", "TransitionComplete") + GoToState("PositionDown") + EndEvent +EndState + +State PositionDown + Event OnActivate(ObjectReference akActionRef) + GoToState("Busy") + bIsInDownState = False + ActivateSound.Play(self) + PlayAnimationAndWait("Stage1", "TransitionComplete") + GoToState("PositionUp") + EndEvent +EndState + +State Busy +EndState \ No newline at end of file