Removed dragon code, specific to Skyrim
This commit is contained in:
parent
3647ad6dd0
commit
87750fc127
BIN
Skyrim.esm
BIN
Skyrim.esm
Binary file not shown.
@ -63,18 +63,7 @@ defaultsetmultiavtriggerscript.*
|
|||||||
defaultsetstageonenter.*
|
defaultsetstageonenter.*
|
||||||
defaultsetstagetrigscript.*
|
defaultsetstagetrigscript.*
|
||||||
dialoguefollowerscript.*
|
dialoguefollowerscript.*
|
||||||
dlc2hermaeusmorafacefxscript.*
|
|
||||||
dlc2miraakcombatmagiclevelingscript.*
|
|
||||||
dlc2miraakscript.*
|
|
||||||
dlc2mq05hermaeusmorafxscript.*
|
|
||||||
dlc2mq06miraakbossbattle.*
|
|
||||||
dlc2mq06script.*
|
|
||||||
dlc2mqbosstentaclecontroller.*
|
|
||||||
dlc2soulstealscript.*
|
|
||||||
dlc2standingstonescript.*
|
|
||||||
dlc2tamedragonscript.*
|
|
||||||
doorbar.*
|
doorbar.*
|
||||||
dragonperchscript.*
|
|
||||||
dragonpriestactorscript.*
|
dragonpriestactorscript.*
|
||||||
dragontowerwallscript.*
|
dragontowerwallscript.*
|
||||||
dunarcherpressureplatescript.*
|
dunarcherpressureplatescript.*
|
||||||
@ -129,7 +118,6 @@ magicsetactoralphascript.*
|
|||||||
mg08paralysiseffectscript.*
|
mg08paralysiseffectscript.*
|
||||||
movingtrap.*
|
movingtrap.*
|
||||||
mqgreybeardabsorbscript.*
|
mqgreybeardabsorbscript.*
|
||||||
mqkilldragonscript.*
|
|
||||||
ms10questscript.*
|
ms10questscript.*
|
||||||
ms11questscript.*
|
ms11questscript.*
|
||||||
nightingalesecdoorscript.*
|
nightingalesecdoorscript.*
|
||||||
@ -195,4 +183,3 @@ weaponracktriggerscript.*
|
|||||||
webdestructiblescript.*
|
webdestructiblescript.*
|
||||||
werewolfchangeeffectscript.*
|
werewolfchangeeffectscript.*
|
||||||
werewolftransformvisual.*
|
werewolftransformvisual.*
|
||||||
wifunctionsscript.*
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,132 +0,0 @@
|
|||||||
Scriptname DLC2HermaeusMoraFaceFXSCRIPT extends ObjectReference
|
|
||||||
{Plays all of the HM face fx when activated}
|
|
||||||
|
|
||||||
ObjectReference Property myHMface01 Auto
|
|
||||||
ObjectReference Property myHMface02 Auto
|
|
||||||
ObjectReference Property myHMface03 Auto
|
|
||||||
ObjectReference Property myHMface04 Auto
|
|
||||||
ObjectReference Property myHMface05 Auto
|
|
||||||
ObjectReference Property myHMface06 Auto
|
|
||||||
ObjectReference Property myHMface07 Auto
|
|
||||||
ObjectReference Property myHMface08 Auto
|
|
||||||
|
|
||||||
int iMaxCount = 10 ; max times to loop waiting for 3D to load
|
|
||||||
|
|
||||||
auto State Waiting
|
|
||||||
; default state
|
|
||||||
endState
|
|
||||||
|
|
||||||
State HermaeusMoraAppear
|
|
||||||
|
|
||||||
Event OnBeginState() ;;;this bloc makes the hermaeus mora art appear
|
|
||||||
if (myHMface01)
|
|
||||||
myHMface01.disable();;this delay gets same peices out of sync
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface01.enable();;;;;;;;;;;;
|
|
||||||
waitfor3D(myHMface01)
|
|
||||||
myHMface01.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface02)
|
|
||||||
myHMface02.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface03)
|
|
||||||
myHMface03.disable();;this delay gets same peices out of sync
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface03.enable() ;;;;;;
|
|
||||||
waitfor3D(myHMface03)
|
|
||||||
myHMface03.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface04)
|
|
||||||
myHMface04.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface05)
|
|
||||||
myHMface05.disable();;this delay gets same peices out of sync
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface05.enable();;;;;;;;;;;;
|
|
||||||
waitfor3D(myHMface05)
|
|
||||||
myHMface05.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface06)
|
|
||||||
myHMface06.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface07)
|
|
||||||
myHMface07.disable();;this delay gets same peices out of sync
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface07.enable();;;;;;;;;;;;
|
|
||||||
waitfor3D(myHMface07)
|
|
||||||
myHMface07.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
if (myHMface08)
|
|
||||||
myHMface08.SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
endState
|
|
||||||
|
|
||||||
State HermaeusMoraDisappear
|
|
||||||
|
|
||||||
Event OnLoad()
|
|
||||||
; failsafe in case HM was unloaded when changed to disappeared state
|
|
||||||
myHMface01.Disable()
|
|
||||||
myHMface02.Disable()
|
|
||||||
myHMface03.Disable()
|
|
||||||
myHMface04.Disable()
|
|
||||||
myHMface05.Disable()
|
|
||||||
myHMface06.Disable()
|
|
||||||
myHMface07.Disable()
|
|
||||||
myHMface08.Disable()
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
Event OnBeginState() ;;;this bloc makes the hermaeus mora art disappear
|
|
||||||
if (myHMface01)
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface01.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface02)
|
|
||||||
myHMface02.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface03)
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface03.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface04)
|
|
||||||
myHMface04.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface05)
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface05.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface06)
|
|
||||||
myHMface06.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface07)
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface07.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
if (myHMface08)
|
|
||||||
myHMface08.SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
endState
|
|
||||||
|
|
||||||
function ChangeState(bool bHermaeusMoraAppear = true)
|
|
||||||
if bHermaeusMoraAppear
|
|
||||||
GotoState("HermaeusMoraAppear")
|
|
||||||
else
|
|
||||||
gotoState("HermaeusMoraDisappear")
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; pass in ref, returns when 3D is loaded or maxCount reached in loop
|
|
||||||
function waitFor3D(ObjectReference myFace)
|
|
||||||
; debug.trace(self + " waiting to load " + myFace)
|
|
||||||
; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" +myFace.Is3DLoaded())
|
|
||||||
int iCount = 0
|
|
||||||
while !myFace.Is3DLoaded() && iCount < iMaxCount
|
|
||||||
iCount = iCount + 1
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" +myFace.Is3DLoaded())
|
|
||||||
endwhile
|
|
||||||
endFunction
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
Scriptname DLC2MiraakCombatMagicLevelingScript extends ReferenceAlias
|
|
||||||
|
|
||||||
Int Property Stage1 = 37 Auto hidden
|
|
||||||
Int Property Stage2 = 44 Auto hidden
|
|
||||||
Int Property Stage3 = 51 Auto hidden
|
|
||||||
Int Property Stage4 = 58 Auto hidden
|
|
||||||
Int Property Stage5 = 65 Auto hidden
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function SetMiraakCombatLevel()
|
|
||||||
Actor miraak = GetActorRef()
|
|
||||||
;EquipSpell(DLC1dunHarkonConjureGargoyleLeftHand, 0)
|
|
||||||
|
|
||||||
;Other spells (Bats, Mistform, Invisibility, Conjure Gargoyle) are added, force-cast, and/or removed via script
|
|
||||||
;on an as-needed basis.
|
|
||||||
|
|
||||||
if (miraak.GetLevel() >= Stage4)
|
|
||||||
miraak.AddPerk( MageArmor30 )
|
|
||||||
miraak.AddPerk( MageArmor50 )
|
|
||||||
miraak.AddPerk( MagicResistance30 )
|
|
||||||
miraak.AddPerk( MagicResistance50 )
|
|
||||||
miraak.AddPerk( Bladesman60 )
|
|
||||||
miraak.AddPerk( Bladesman90 )
|
|
||||||
ElseIf (miraak.GetLevel() >= Stage3)
|
|
||||||
miraak.AddPerk( MageArmor30 )
|
|
||||||
miraak.AddPerk( MageArmor50)
|
|
||||||
miraak.AddPerk( MagicResistance30 )
|
|
||||||
miraak.AddPerk( Bladesman60 )
|
|
||||||
ElseIf (miraak.GetLevel() >= Stage2)
|
|
||||||
miraak.AddPerk( MageArmor30 )
|
|
||||||
miraak.AddPerk( MagicResistance30 )
|
|
||||||
miraak.AddPerk( Bladesman60 )
|
|
||||||
ElseIf (miraak.GetLevel() >= Stage1)
|
|
||||||
miraak.AddPerk( MageArmor30 )
|
|
||||||
miraak.AddPerk( MagicResistance30 )
|
|
||||||
Else
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
EndFunction
|
|
||||||
;/
|
|
||||||
Function ReequipDrainSpell()
|
|
||||||
if (GetLevel() >= Stage4)
|
|
||||||
EquipSpell(DLC1DunHarkoncrVampireDrain06, 0)
|
|
||||||
EquipSpell(DLC1HarkonDrain06AltNew, 0)
|
|
||||||
ElseIf (GetLevel() >= Stage3)
|
|
||||||
EquipSpell(DLC1DunHarkoncrVampireDrain05, 0)
|
|
||||||
EquipSpell(DLC1HarkonDrain05AltNew, 0)
|
|
||||||
ElseIf (GetLevel() >= Stage2)
|
|
||||||
EquipSpell(DLC1DunHarkoncrVampireDrain04, 0)
|
|
||||||
EquipSpell(DLC1HarkonDrain04AltNew, 0)
|
|
||||||
ElseIf (GetLevel() >= Stage1)
|
|
||||||
EquipSpell(DLC1DunHarkoncrVampireDrain03, 0)
|
|
||||||
EquipSpell(DLC1HarkonDrain03AltNew, 0)
|
|
||||||
Else
|
|
||||||
EquipSpell(DLC1DunHarkoncrVampireDrain02, 0)
|
|
||||||
EquipSpell(DLC1HarkonDrain02AltNew, 0)
|
|
||||||
EndIf
|
|
||||||
EndFunction
|
|
||||||
/;
|
|
||||||
|
|
||||||
;/
|
|
||||||
SPELL Property ReanimateCorpseLeftHand Auto
|
|
||||||
SPELL Property RevenantLeftHand Auto
|
|
||||||
SPELL Property RaiseZombieLeftHand Auto
|
|
||||||
SPELL Property crVampireDrain02 Auto
|
|
||||||
SPELL Property crVampireDrain03 Auto
|
|
||||||
SPELL Property crVampireDrain04 Auto
|
|
||||||
SPELL Property crVampireDrain05 Auto
|
|
||||||
SPELL Property crVampireDrain06 Auto
|
|
||||||
/;
|
|
||||||
;Perk Property Necromancy Auto
|
|
||||||
;Perk Property SavageStrike Auto
|
|
||||||
Perk Property MagicResistance30 Auto
|
|
||||||
Perk Property MagicResistance50 Auto
|
|
||||||
;Perk Property HackAndSlash60 Auto
|
|
||||||
;Perk Property HackAndSlash90 Auto
|
|
||||||
Perk Property Bladesman60 Auto
|
|
||||||
Perk Property Bladesman90 Auto
|
|
||||||
;Perk Property WindWalker Auto
|
|
||||||
;Perk Property DarkSouls Auto
|
|
||||||
;Perk Property AugmentedFrost Auto
|
|
||||||
Perk Property MageArmor30 Auto
|
|
||||||
Perk Property MageArmor50 Auto
|
|
||||||
|
|
||||||
|
|
||||||
;Weapons
|
|
||||||
Weapon Property DLC2MKMiraakFightSword1 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightSword2 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightSword3 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightSword4 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightSword5 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightSword6 auto
|
|
||||||
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff1 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff2 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff3 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff4 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff5 auto
|
|
||||||
Weapon Property DLC2MKMiraakFightStaff6 auto
|
|
@ -1,126 +0,0 @@
|
|||||||
Scriptname DLC2MiraakScript extends Actor
|
|
||||||
{Actor on base DLC2Miraak actors. Attach this if you need your Miraak to appear/disappear and call these functions.}
|
|
||||||
|
|
||||||
;Notes: This assumes you only want him to AppearOnLoad once per Appear()/Disappear() function calls
|
|
||||||
|
|
||||||
;PLEASE TALK TO jduvall BEFORE EDITING THIS SCRIPT. Thanks :)
|
|
||||||
|
|
||||||
bool property AppearOnLoad auto
|
|
||||||
{Optional: default = false
|
|
||||||
If true will call the Appear() function without moving him to AppearAtRef, assuming you've already placed him where he needs to be}
|
|
||||||
|
|
||||||
ObjectReference Property AppearAtRef auto
|
|
||||||
{Optional
|
|
||||||
When Miraak appears, where he is moved to.
|
|
||||||
For example, Player}
|
|
||||||
|
|
||||||
ObjectReference Property DisappearToRef auto
|
|
||||||
{Optional (USE IF AppearOnLoad is true - other wise next time you are in the area he will appear)
|
|
||||||
When Miraak disappears, where he is moved to.
|
|
||||||
For example:
|
|
||||||
DLC2SoulStealMiraakSpawnMarker in DLC2aaaMarkers cell - an xmarker in a holding cell}
|
|
||||||
|
|
||||||
Explosion Property DLC2MiraakTeleportExp auto
|
|
||||||
Explosion Property DLC2MiraakTeleportReturnExp auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EffectShader property DLC2MiraakTeleportStartFXS auto
|
|
||||||
EffectShader property DLC2MiraakTeleportReturnFXS auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ImageSpaceModifier Property DLC2MiraakTeleportIMODStatic auto
|
|
||||||
|
|
||||||
bool Appeared
|
|
||||||
|
|
||||||
Event OnUpdate()
|
|
||||||
;assumes this is only ever called for the IMOD effect
|
|
||||||
|
|
||||||
bool IMOD = false
|
|
||||||
|
|
||||||
int distance = 1500
|
|
||||||
|
|
||||||
While Appeared
|
|
||||||
if GetDistance(Game.GetPlayer()) <= distance && IMOD == false
|
|
||||||
IMOD = true
|
|
||||||
DLC2MiraakTeleportIMODStatic.ApplyCrossFade(3)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if GetDistance(Game.GetPlayer()) > distance && IMOD == true
|
|
||||||
IMOD = false
|
|
||||||
ImageSpaceModifier.RemoveCrossFade(3)
|
|
||||||
endif
|
|
||||||
endWhile
|
|
||||||
|
|
||||||
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
|
|
||||||
Function OnLoad()
|
|
||||||
if AppearOnLoad && Appeared == false
|
|
||||||
Appeared = true
|
|
||||||
Appear(MoveToAppearAtRef = false)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function Appear(bool MoveToAppearAtRef = true, bool UseIMOD = true)
|
|
||||||
|
|
||||||
; debug.trace(self + "Appear()")
|
|
||||||
|
|
||||||
Appeared = true
|
|
||||||
|
|
||||||
if MoveToAppearAtRef && AppearAtRef
|
|
||||||
MoveTo(AppearAtRef, 200)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if IsDisabled()
|
|
||||||
Enable(true)
|
|
||||||
endif
|
|
||||||
|
|
||||||
; debug.trace(self + "setAlpha(0)")
|
|
||||||
setAlpha(0)
|
|
||||||
|
|
||||||
|
|
||||||
; debug.trace(self + "Placing Explosion.")
|
|
||||||
PlaceAtMe(DLC2MiraakTeleportExp)
|
|
||||||
|
|
||||||
if UseIMOD
|
|
||||||
RegisterForSingleUpdate(0.001)
|
|
||||||
endif
|
|
||||||
|
|
||||||
; debug.trace(self + "Waiting...")
|
|
||||||
utility.wait(2)
|
|
||||||
|
|
||||||
setAlpha(1, true)
|
|
||||||
|
|
||||||
DLC2MiraakTeleportStartFXS.play(self)
|
|
||||||
|
|
||||||
; debug.trace(self + "setAlpha(1, true)")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function Disappear()
|
|
||||||
|
|
||||||
Appeared = false
|
|
||||||
|
|
||||||
placeAtMe(DLC2MiraakTeleportReturnExp)
|
|
||||||
|
|
||||||
DLC2MiraakTeleportReturnFXS.play(self)
|
|
||||||
|
|
||||||
utility.wait(0.5)
|
|
||||||
|
|
||||||
ImageSpaceModifier.RemoveCrossFade(3)
|
|
||||||
|
|
||||||
setAlpha(0, true)
|
|
||||||
|
|
||||||
Disable(true)
|
|
||||||
|
|
||||||
if DisappearToRef
|
|
||||||
MoveTo(DisappearToRef)
|
|
||||||
endif
|
|
||||||
|
|
||||||
EndFunction
|
|
@ -1,87 +0,0 @@
|
|||||||
Scriptname DLC2MQ05HermaeusMoraFXScript extends ObjectReference
|
|
||||||
{specific for MQ05 Skaal scene}
|
|
||||||
|
|
||||||
|
|
||||||
ObjectReference[] Property myHMface Auto
|
|
||||||
|
|
||||||
int newState = 0
|
|
||||||
int lastState = 0
|
|
||||||
int iMaxCount = 10 ; max times to loop waiting for 3D to load
|
|
||||||
|
|
||||||
auto State Waiting
|
|
||||||
; default state
|
|
||||||
endState
|
|
||||||
|
|
||||||
State HermaeusMoraAppear
|
|
||||||
|
|
||||||
Event OnBeginState() ;;;this bloc makes the hermaeus mora art appear
|
|
||||||
|
|
||||||
int iIndex = lastState
|
|
||||||
while iIndex < newState
|
|
||||||
; debug.trace(self + " iIndex=" + iIndex)
|
|
||||||
if myHMFace[iIndex]
|
|
||||||
; debug.trace(self + " enabling " + myHMface[iIndex])
|
|
||||||
myHMface[iIndex].disable()
|
|
||||||
;;this delay gets same peices out of sync
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface[iIndex].enable()
|
|
||||||
int iCount = 0
|
|
||||||
while !myHMface[iIndex].Is3DLoaded() && iCount < iMaxCount
|
|
||||||
; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" + myHMface[iIndex].Is3DLoaded())
|
|
||||||
iCount = iCount + 1
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
endwhile
|
|
||||||
myHMface[iIndex].SetAnimationVariableFloat("fToggleBlend", 1.0)
|
|
||||||
endif
|
|
||||||
iIndex = iIndex + 1
|
|
||||||
endWhile
|
|
||||||
; save last state
|
|
||||||
lastState = newState
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
endState
|
|
||||||
|
|
||||||
State HermaeusMoraDisappear
|
|
||||||
|
|
||||||
Event OnLoad()
|
|
||||||
; failsafe in case HM was unloaded when changed to disappeared state
|
|
||||||
int iIndex = 0
|
|
||||||
while iIndex < myHMface.length
|
|
||||||
if myHMface[iIndex]
|
|
||||||
myHMface[iIndex].Disable()
|
|
||||||
endif
|
|
||||||
iIndex = iIndex + 1
|
|
||||||
endWhile
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
Event OnBeginState() ;;;this bloc makes the hermaeus mora art disappear
|
|
||||||
int iIndex = 0
|
|
||||||
while iIndex < lastState
|
|
||||||
if myHMface[iIndex]
|
|
||||||
utility.wait(Utility.RandomFloat(0.2, 0.5))
|
|
||||||
myHMface[iIndex].SetAnimationVariableFloat("fToggleBlend", 0.0)
|
|
||||||
endif
|
|
||||||
iIndex = iIndex + 1
|
|
||||||
endWhile
|
|
||||||
newState = 0
|
|
||||||
lastState = 0
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
endState
|
|
||||||
|
|
||||||
function ChangeState(bool bHermaeusMoraAppear = true, int iChangeToState = -1)
|
|
||||||
if bHermaeusMoraAppear
|
|
||||||
; enable faces to new state
|
|
||||||
if iChangeToState == -1
|
|
||||||
newState = newState + 1
|
|
||||||
else
|
|
||||||
newState = iChangeToState
|
|
||||||
endif
|
|
||||||
GotoState("HermaeusMoraAppear")
|
|
||||||
else
|
|
||||||
gotoState("HermaeusMoraDisappear")
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,72 +0,0 @@
|
|||||||
Scriptname DLC2MQ06Script extends Quest Conditional
|
|
||||||
|
|
||||||
event OnUpdate()
|
|
||||||
; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord1) = " + Game.IsWordUnlocked(DLC2BendToWillWord1))
|
|
||||||
; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord2) = " + Game.IsWordUnlocked(DLC2BendToWillWord2))
|
|
||||||
; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord3) = " + Game.IsWordUnlocked(DLC2BendToWillWord3))
|
|
||||||
|
|
||||||
; watch for player to unlock words
|
|
||||||
if Game.IsWordUnlocked(DLC2BendToWillWord1) && Game.IsWordUnlocked(DLC2BendToWillWord2) && Game.IsWordUnlocked(DLC2BendToWillWord3)
|
|
||||||
SetStage(100)
|
|
||||||
else
|
|
||||||
RegisterForSingleUpdate(5.0)
|
|
||||||
endif
|
|
||||||
endEvent
|
|
||||||
|
|
||||||
; this function clears the "mind control" state of all the pillars
|
|
||||||
function ClearMindControl()
|
|
||||||
DLC2PillarBuildSandboxMarkerTOGGLEBeast.Disable()
|
|
||||||
DLC2PillarBuildSandboxMarkerTOGGLEEarth.Disable()
|
|
||||||
DLC2PillarBuildSandboxMarkerTOGGLESun.Disable()
|
|
||||||
DLC2PillarBuildSandboxMarkerTOGGLEWater.Disable()
|
|
||||||
DLC2PillarBuildSandboxMarkerTOGGLEWind.Disable()
|
|
||||||
; mark Tree Stone freed
|
|
||||||
DLC2StandingStoneTreeREF.Freed = true
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
Function EnableHM(bool enabling)
|
|
||||||
if (enabling)
|
|
||||||
DLC2MQ06HermaeusMoraENDFXRef.ChangeState()
|
|
||||||
HermaeusMoraTA.Enable()
|
|
||||||
else
|
|
||||||
DLC2MQ06HermaeusMoraENDFXRef.ChangeState(false)
|
|
||||||
HermaeusMoraTA.Disable()
|
|
||||||
endif
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function EnableHMBattle(bool enabling, int iNewState = -1)
|
|
||||||
if (enabling)
|
|
||||||
DLC2MQ06HermaeusMoraBattleFXRef.ChangeState(true, iNewState)
|
|
||||||
else
|
|
||||||
DLC2MQ06HermaeusMoraBattleFXRef.ChangeState(false)
|
|
||||||
endif
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
; called by dragon alias script if dragon unloads after being tamed (so he can't fly) but before player rides him
|
|
||||||
function MoveTameDragonFailsafe(Actor dragon)
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
|
|
||||||
WordOfPower Property DLC2BendToWillWord1 Auto
|
|
||||||
WordOfPower Property DLC2BendToWillWord2 Auto
|
|
||||||
WordOfPower Property DLC2BendToWillWord3 Auto
|
|
||||||
|
|
||||||
Location Property DLC2Book01DungeonLocation Auto
|
|
||||||
Location Property DLC2ApocrypaMiraaksTowerLocation Auto
|
|
||||||
|
|
||||||
ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEBeast Auto
|
|
||||||
ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEEarth Auto
|
|
||||||
ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLESun Auto
|
|
||||||
ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEWater Auto
|
|
||||||
ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEWind Auto
|
|
||||||
|
|
||||||
ObjectReference Property HermaeusMoraTA auto
|
|
||||||
|
|
||||||
int Property MiraakDragonsKilled Auto Conditional
|
|
||||||
DLC2StandingStoneScript Property DLC2StandingStoneTreeREF Auto
|
|
||||||
|
|
||||||
DLC2HermaeusMoraFaceFXSCRIPT Property DLC2MQ06HermaeusMoraENDFXRef Auto
|
|
||||||
|
|
||||||
DLC2MQ05HermaeusMoraFXScript Property DLC2MQ06HermaeusMoraBattleFXRef Auto
|
|
||||||
|
|
@ -1,193 +0,0 @@
|
|||||||
ScriptName DLC2MQBossTentacleController extends objectReference
|
|
||||||
|
|
||||||
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart001 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart002 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart003 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart004 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart005 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStart006 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainStartCenter auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd001 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd002 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd003 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd004 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd005 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEnd006 auto
|
|
||||||
ObjectReference property DLC2MQBossTentacleChainEndCenter auto
|
|
||||||
|
|
||||||
bool property fullSweep auto hidden
|
|
||||||
int property targetArea = 0 auto hidden
|
|
||||||
bool property clockwise = false auto hidden
|
|
||||||
float property attackTimer = 0.5 auto hidden
|
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; State Block
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
;This is the state where we are ready to go
|
|
||||||
auto State waiting
|
|
||||||
event OnUpdate()
|
|
||||||
; debug.Trace(self + ": Has recieved OnUpdate")
|
|
||||||
goToState("Busy")
|
|
||||||
if fullSweep
|
|
||||||
; debug.Trace(self + ": Should Trigger Full Sweep")
|
|
||||||
fullSweep = false
|
|
||||||
AttackWithFullSweep()
|
|
||||||
else;if targetArea != 0
|
|
||||||
; debug.Trace(self + ": Should Trigger Target Area")
|
|
||||||
AttackTargetArea()
|
|
||||||
endif
|
|
||||||
endEvent
|
|
||||||
endState
|
|
||||||
|
|
||||||
;Override the functions so we do nothing else
|
|
||||||
state Busy
|
|
||||||
event OnUpdate()
|
|
||||||
endEvent
|
|
||||||
endState
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Function Block
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
Function AttackWithFullSweep()
|
|
||||||
; debug.Trace(self + ": Starting AttackWithFullSweep")
|
|
||||||
objectReference currentLink
|
|
||||||
if !clockwise
|
|
||||||
DLC2MQBossTentacleChainStart001.Activate(DLC2MQBossTentacleChainStart001)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart001.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
DLC2MQBossTentacleChainStart002.Activate(DLC2MQBossTentacleChainStart002)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart002.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
DLC2MQBossTentacleChainStart003.Activate(DLC2MQBossTentacleChainStart003)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart003.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
DLC2MQBossTentacleChainStart004.Activate(DLC2MQBossTentacleChainStart004)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart004.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
DLC2MQBossTentacleChainStart005.Activate(DLC2MQBossTentacleChainStart005)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart005.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
DLC2MQBossTentacleChainStart006.Activate(DLC2MQBossTentacleChainStart006)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart006.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(currentLink)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
else ;clockwise is true
|
|
||||||
;;;;;;;;;;;;;;;;;;NEED to do other attack here
|
|
||||||
endif
|
|
||||||
goToState("Waiting")
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function AttackTargetArea()
|
|
||||||
; debug.Trace(self + ": Starting AttackTargetArea")
|
|
||||||
objectReference currentLink
|
|
||||||
if !clockwise
|
|
||||||
if targetArea == 0
|
|
||||||
DLC2MQBossTentacleChainStartCenter.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStartCenter.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 1
|
|
||||||
DLC2MQBossTentacleChainStart001.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart001.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 2
|
|
||||||
DLC2MQBossTentacleChainStart002.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart002.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 3
|
|
||||||
DLC2MQBossTentacleChainStart003.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart003.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 4
|
|
||||||
DLC2MQBossTentacleChainStart004.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart004.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 5
|
|
||||||
DLC2MQBossTentacleChainStart005.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart005.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
elseif targetArea == 6
|
|
||||||
DLC2MQBossTentacleChainStart006.Activate(self)
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
currentLink = DLC2MQBossTentacleChainStart006.getLinkedRef()
|
|
||||||
while currentLink
|
|
||||||
currentLink.Activate(self)
|
|
||||||
currentLink = currentLink.getLinkedRef()
|
|
||||||
utility.Wait(attackTimer)
|
|
||||||
endWhile
|
|
||||||
else
|
|
||||||
; debug.Trace(self + ": attackTargetArea triggered with area 0")
|
|
||||||
endif
|
|
||||||
else ;clockwise is true
|
|
||||||
;;;;;;;;;;;;;;;;;;NEED to do other attack here
|
|
||||||
endif
|
|
||||||
targetArea = 0
|
|
||||||
goToState("Waiting")
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,208 +0,0 @@
|
|||||||
Scriptname DLC2SoulStealScript extends Quest conditional
|
|
||||||
{Script attached to DLC2SoulSteal quest}
|
|
||||||
|
|
||||||
ReferenceAlias Property Player auto
|
|
||||||
ReferenceAlias Property Miraak auto
|
|
||||||
ReferenceAlias Property Dragon auto
|
|
||||||
|
|
||||||
Scene Property DLC2SoulStealScene auto
|
|
||||||
|
|
||||||
Message Property DLC2SoulStealMsg auto
|
|
||||||
|
|
||||||
MQKillDragonScript Property MQKillDragon auto
|
|
||||||
|
|
||||||
quest property DLC2MQ02 auto
|
|
||||||
quest Property DLC2MQ06 auto
|
|
||||||
|
|
||||||
MQGreybeardAbsorbScript property MQ105 auto
|
|
||||||
|
|
||||||
bool Property TestMiraak auto ;if true, then ShouldMiraakAppear() always returns true
|
|
||||||
{If true, he always appears when player kills a dragon}
|
|
||||||
|
|
||||||
GlobalVariable Property DLC2SoulStealCount auto ;if miraak steals soul this goes up one, goes back down if player takes it back
|
|
||||||
|
|
||||||
bool fightPlayer conditional ;while this is true he will fight the player before disappearing, when this is false, he will disappear when done straling soul
|
|
||||||
|
|
||||||
bool MiraakStoleSoul conditional ;scene got to the point where Miraak started to steal the soul
|
|
||||||
|
|
||||||
int secondsBeforeGivingUp = 120 ;houw many seconds until we give up if Miraak hasn't started absorbing the soul
|
|
||||||
|
|
||||||
bool apprearedOnce
|
|
||||||
|
|
||||||
WordOfPower Property DLC2BendToWillWord1 auto
|
|
||||||
|
|
||||||
bool MiraakMadeHisIntroduction
|
|
||||||
quest property DLC2MQ01 auto
|
|
||||||
quest Property MQ104 auto
|
|
||||||
|
|
||||||
Faction Property MQNoDragonAbsorb auto
|
|
||||||
|
|
||||||
; for Greybeard effect
|
|
||||||
VisualEffect Property FXGreybeardAbsorbEffect Auto
|
|
||||||
EffectShader Property GreybeardPowerAbsorbFXS Auto
|
|
||||||
EffectShader Property GreybeardPlayerPowerAbsorbFXS Auto
|
|
||||||
sound property NPCDragonDeathSequenceWind auto
|
|
||||||
sound property NPCDragonDeathSequenceExplosion auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Event OnUpdate()
|
|
||||||
; Debug.Trace(self + "OnUpdate()")
|
|
||||||
if MiraakStoleSoul == false
|
|
||||||
DLC2SoulStealScene.Stop()
|
|
||||||
endif
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
Function StartTimer()
|
|
||||||
; Debug.Trace(self + "StartTimer()")
|
|
||||||
RegisterForSingleUpdate(secondsBeforeGivingUp)
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function EndTimer()
|
|
||||||
unregisterForUpdate()
|
|
||||||
; Debug.Trace(self + "EndTimer()")
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
bool Function TryMiraakMakeHisIntroduction(Actor DragonRef)
|
|
||||||
|
|
||||||
bool returnVar = false
|
|
||||||
|
|
||||||
; Debug.Trace(self + "TryMiraakMakeHisIntroduction() -- ALWAYS RETURNS FALSE NOW")
|
|
||||||
|
|
||||||
; if MiraakMadeHisIntroduction == false && MQ104.GetStage() >=150 && Game.GetPlayer().IsInCombat() == false && DragonRef.isInFaction(MQNoDragonAbsorb) == false
|
|
||||||
; MiraakMadeHisIntroduction = true
|
|
||||||
; returnVar = true
|
|
||||||
; Debug.Trace(self + "TryMiraakMakeHisIntroduction() Miraak is going to make his introductory appearance, calling setStage 0 on DLC2MQ01")
|
|
||||||
; DLC2MQ01.SetStage(0)
|
|
||||||
; endif
|
|
||||||
;
|
|
||||||
; Debug.Trace(self + "TryMiraakMakeHisIntroduction() returning: " + returnVar)
|
|
||||||
|
|
||||||
RETURN returnVar
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
bool Function ShouldMiraakAppear(Actor DragonRef)
|
|
||||||
; Debug.Trace(self + "ShouldMiraakAppear() checking quest stages and other logic")
|
|
||||||
|
|
||||||
bool returnVar = false
|
|
||||||
int chanceToAppear = 25
|
|
||||||
|
|
||||||
if DLC2MQ02.GetStage() >= 200 && DLC2MQ06.GetStage() < 500 && DragonRef.isInFaction(MQNoDragonAbsorb) == false
|
|
||||||
if Game.IsWordUnlocked(DLC2BendToWillWord1) || Game.GetPlayer().GetActorValue("DragonSouls") > 0
|
|
||||||
if Utility.RandomInt(1,100) <= chanceToAppear || apprearedOnce == false
|
|
||||||
apprearedOnce = true
|
|
||||||
returnVar = true
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if TestMiraak == true
|
|
||||||
; Debug.Trace(self + "ShouldMiraakAppear() -- TestMiraak == true, so forcing returnVar to true")
|
|
||||||
returnVar = true
|
|
||||||
endif
|
|
||||||
|
|
||||||
; Debug.Trace(self + "ShouldMiraakAppear() returning: " + returnVar)
|
|
||||||
return returnVar
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function MiraakAppears(ObjectReference DragonRef)
|
|
||||||
; Debug.Trace(self + "MiraakAppears()" + DragonRef)
|
|
||||||
Dragon.ForceRefTo(DragonRef)
|
|
||||||
|
|
||||||
DLC2MiraakScript MiraakRef = Miraak.GetReference() as DLC2MiraakScript
|
|
||||||
MiraakRef.AppearAtRef = DragonRef
|
|
||||||
MiraakRef.Appear()
|
|
||||||
MiraakRef.SetNoBleedoutRecovery(true)
|
|
||||||
|
|
||||||
;clear tracking variables from previous incarnations
|
|
||||||
fightPlayer = false
|
|
||||||
MiraakStoleSoul = false
|
|
||||||
|
|
||||||
;START THE "TIMER"
|
|
||||||
StartTimer()
|
|
||||||
|
|
||||||
DLC2SoulStealScene.start()
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function MiraakDisappears()
|
|
||||||
; Debug.Trace(self + "MiraakDisappears()")
|
|
||||||
DLC2MiraakScript MiraakRef = Miraak.GetReference() as DLC2MiraakScript
|
|
||||||
MiraakRef.Disappear()
|
|
||||||
MiraakRef.SetNoBleedoutRecovery(false)
|
|
||||||
MiraakRef.RestoreAV("Health", 999999999)
|
|
||||||
|
|
||||||
;if Miraak disappears before he stole the soul, put the dragon back in the state that lets the player steal it's soul
|
|
||||||
if MiraakStoleSoul == false
|
|
||||||
(Dragon.GetActorReference() as DragonActorScript).gotoState("deadAndWaiting")
|
|
||||||
endif
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function StealSoul()
|
|
||||||
EndTimer()
|
|
||||||
; Debug.Trace(self + "StealSoul()")
|
|
||||||
MiraakStoleSoul = true
|
|
||||||
ModDLC2SoulStealCount(1)
|
|
||||||
MQKillDragon.DeathSequence(Dragon.GetActorReference(), Miraak.GetActorReference())
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function FinishStealingSoul()
|
|
||||||
; Debug.Trace(self + "FinishStealingSoul()")
|
|
||||||
DLC2SoulStealMsg.show()
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function PlayerAttackedMiraak()
|
|
||||||
EndTimer()
|
|
||||||
; Debug.Trace(self + "PlayerAttackedMiraak()")
|
|
||||||
fightPlayer = true
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function PlayerTakesSoulBack()
|
|
||||||
; Debug.Trace(self + "PlayerTakesSoulBack()")
|
|
||||||
utility.wait(1)
|
|
||||||
AbsorbSoulFromMiraak(Miraak.GetActorReference())
|
|
||||||
Game.GetPlayer().modActorValue("dragonsouls", 1)
|
|
||||||
ModDLC2SoulStealCount(-1)
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function ModDLC2SoulStealCount(int amountToMod)
|
|
||||||
; Debug.Trace(self + "ModDLC2SoulStealCount()")
|
|
||||||
DLC2SoulStealCount.setValue(DLC2SoulStealCount.GetValue() + amountToMod)
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
Function MiraakDetached()
|
|
||||||
; Debug.Trace(self + "MiraakDetached()")
|
|
||||||
if DLC2SoulStealScene.IsPlaying()
|
|
||||||
; Debug.Trace(self + "MiraakDetached() DLC2SoulStealScene is playing, calling stop()")
|
|
||||||
DLC2SoulStealScene.Stop()
|
|
||||||
endif
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
;CRIBBED FROM MQGreybeardAbsorbScript "AbsorbSoul()"
|
|
||||||
function AbsorbSoulFromMiraak(Actor target)
|
|
||||||
; Debug.Trace(self + "AbsorbSoulFromMiraak()")
|
|
||||||
|
|
||||||
Actor PlayerRef = Game.GetPlayer()
|
|
||||||
|
|
||||||
;Play art and fx shaders on player and targeted grybeard
|
|
||||||
FXGreybeardAbsorbEffect.Play(target, 7, PlayerRef)
|
|
||||||
GreybeardPowerAbsorbFXS.Play(target)
|
|
||||||
GreybeardPlayerPowerAbsorbFXS.Play(PlayerRef)
|
|
||||||
|
|
||||||
; Sounds for when the wispy particles being to fly at the player.
|
|
||||||
NPCDragonDeathSequenceWind.play(target)
|
|
||||||
NPCDragonDeathSequenceExplosion.play(target)
|
|
||||||
|
|
||||||
utility.wait(7)
|
|
||||||
|
|
||||||
;remove magic shaders
|
|
||||||
GreybeardPowerAbsorbFXS.Stop(target)
|
|
||||||
GreybeardPlayerPowerAbsorbFXS.Stop(PlayerRef)
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
|||||||
Scriptname DLC2StandingStoneScript extends ObjectReference
|
|
||||||
|
|
||||||
PROJECTILE Property DLC2VoicePushProjectile01 Auto
|
|
||||||
PROJECTILE Property DLC2VoicePushProjectile03 Auto
|
|
||||||
SPELL Property DLC2SpellLearned Auto
|
|
||||||
bool property Freed auto hidden
|
|
||||||
float DelayReady
|
|
||||||
|
|
||||||
auto State Waiting
|
|
||||||
|
|
||||||
Event OnActivate(ObjectReference akActionRef)
|
|
||||||
gotoState("Busy")
|
|
||||||
; debug.Trace("STANDING STONE: I've been touched")
|
|
||||||
if akActionRef == game.GetPlayer()
|
|
||||||
if Freed == true
|
|
||||||
; debug.Trace("STANDING STONE: has been freed - DelayReady: " + DelayReady + ", GameDays: " + GameDaysPassed.GetValue())
|
|
||||||
if GameDaysPassed.GetValue() > DelayReady && game.GetPlayer().HasSpell(DLC2SpellLearned) == false
|
|
||||||
; debug.Trace("STANDINGSTONE: it's been a day since the spell was last added")
|
|
||||||
DelayReady = GameDaysPassed.GetValue() + 0.75
|
|
||||||
PlayAnimation("stage3")
|
|
||||||
DLC2StoneActivateSound.play(self)
|
|
||||||
(akActionRef as actor).AddSpell(DLC2SpellLearned, true)
|
|
||||||
; debug.Trace("STANDINGSTONE: DLC2SacredStoneSpell" + DLC2SacredStoneSpell)
|
|
||||||
DLC2SacredStoneSpell.Cast(akActionRef)
|
|
||||||
else
|
|
||||||
DLC2StandingStoneNotReadyMsg.Show()
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
WorkOnPillar(false)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if Freed == false && (akActionRef as Actor)
|
|
||||||
WorkOnPillarNPC(akActionRef as Actor)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
gotoState("Waiting")
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
endState
|
|
||||||
|
|
||||||
State Busy
|
|
||||||
; do nothing
|
|
||||||
EndState
|
|
||||||
|
|
||||||
function WorkOnPillarNPC(Actor pillarNPC)
|
|
||||||
; put into alias
|
|
||||||
FollowerAtPillar.ForceRefTo(pillarNPC)
|
|
||||||
; clear favor state
|
|
||||||
pillarNPC.SetDoingFavor(false)
|
|
||||||
; work on pillar scene
|
|
||||||
DLC2PillarFollowerScene.Start()
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function WorkOnPillar(bool bSleepMove = true)
|
|
||||||
if GetLinkedRef()
|
|
||||||
; player blacks out, wakes up working on pillar
|
|
||||||
Game.DisablePlayerControls()
|
|
||||||
if bSleepMove == false
|
|
||||||
FadeToBlackImod.Apply()
|
|
||||||
MAGStandingStoneActivateA.Play(Game.GetPlayer())
|
|
||||||
utility.wait(2)
|
|
||||||
FadeToBlackImod.PopTo(FadeToBlackHoldImod)
|
|
||||||
else
|
|
||||||
FadeToBlackImod.PopTo(FadeToBlackHoldImod)
|
|
||||||
utility.wait(2)
|
|
||||||
endif
|
|
||||||
Game.ForceThirdPerson()
|
|
||||||
; put player in furniture
|
|
||||||
Game.GetPlayer().MoveTo(GetLinkedRef())
|
|
||||||
DLC2PillarMiraakVoice.Start()
|
|
||||||
utility.wait(2)
|
|
||||||
FadeToBlackHoldImod.PopTo(FadeToBlackBackImod)
|
|
||||||
FadeToBlackHoldImod.Remove()
|
|
||||||
MAGStandingStoneActivateB.Play(Game.GetPlayer())
|
|
||||||
utility.wait(2)
|
|
||||||
; debug.trace(self + " enabling controls")
|
|
||||||
Game.EnablePlayerControls()
|
|
||||||
while GetLinkedRef().IsFurnitureInUse()
|
|
||||||
utility.wait(1.0)
|
|
||||||
endWhile
|
|
||||||
DLC2PillarMiraakVoice.Stop()
|
|
||||||
DLC2Pillar.SetStage(100) ; runs Neloth scene, tracks player having touched pillar once
|
|
||||||
endif
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
|
|
||||||
ImageSpaceModifier Property FadeToBlackImod Auto
|
|
||||||
|
|
||||||
ImageSpaceModifier Property FadeToBlackHoldImod Auto
|
|
||||||
|
|
||||||
ImageSpaceModifier Property FadeToBlackBackImod Auto
|
|
||||||
|
|
||||||
Topic Property DLC2PillarBlockingTopic Auto
|
|
||||||
|
|
||||||
Scene Property DLC2PillarMiraakVoice Auto
|
|
||||||
|
|
||||||
Quest Property DLC2Pillar Auto
|
|
||||||
|
|
||||||
GlobalVariable Property GameDaysPassed Auto
|
|
||||||
|
|
||||||
Message Property DLC2StandingStoneNotReadyMsg Auto
|
|
||||||
|
|
||||||
Scene Property DLC2PillarFollowerScene Auto
|
|
||||||
ReferenceAlias Property FollowerAtPillar Auto
|
|
||||||
|
|
||||||
Sound Property MAGStandingStoneActivateA Auto
|
|
||||||
Sound Property MAGStandingStoneActivateB Auto
|
|
||||||
|
|
||||||
SPELL Property DLC2SacredStoneSpell Auto
|
|
||||||
|
|
||||||
Sound Property DLC2StoneActivateSound Auto
|
|
@ -1,330 +0,0 @@
|
|||||||
Scriptname DLC2TameDragonScript extends Quest Conditional
|
|
||||||
|
|
||||||
bool bAllowRestrain = false ; this gets set to true at the start of Tame sequence, false during EndWait to prevent accidentally rerestraining him
|
|
||||||
|
|
||||||
function TameDragon(actor newDragon)
|
|
||||||
; debug.trace(self + " TameDragon START")
|
|
||||||
; if alias already has something in it (that's alive), do nothing
|
|
||||||
if dragonReleasedAlias.GetRef() && !dragonReleasedAlias.GetActorRef().IsDead()
|
|
||||||
; do nothing, dragon is in the process of being released
|
|
||||||
; debug.trace(self + " TameDragon: time's up, do nothing")
|
|
||||||
; if this is not the current target, give a message
|
|
||||||
; if dragonReleasedAlias.GetRef() != newDragon
|
|
||||||
DLC2TameDragonResistMSG.Show()
|
|
||||||
; endif
|
|
||||||
return
|
|
||||||
elseif DragonAlias.GetRef() && !dragonAlias.GetActorRef().IsDead()
|
|
||||||
; if we're hitting a tamed dragon again, tell him to land
|
|
||||||
; otherwise, do nothing (can't tame 2 dragons at once)
|
|
||||||
if DragonAlias.GetActorRef() == newDragon && newDragon.GetActorValue("variable01") != 99
|
|
||||||
; we're hitting an already tamed dragon with tame again - tell him to land
|
|
||||||
LandDragon()
|
|
||||||
else
|
|
||||||
; show "resists" message
|
|
||||||
DLC2TameDragonResistMSG.Show()
|
|
||||||
endif
|
|
||||||
; no matter what - don't do anything else
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
; debug.trace(self + " TameDragon: trying to tame...")
|
|
||||||
; if dragon is not in an interior, then check if it's in an allowed worldspace - if not, do nothing
|
|
||||||
if !newDragon.IsInInterior() && !DLC2TameDragonAllowedWorldspaces.HasForm(newDragon.GetWorldSpace())
|
|
||||||
; debug.trace(self + " TameDragon: dragon is in invalid worldspace + " + newDragon.GetWorldSpace() + ", do nothing")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; reset allow restrain flag
|
|
||||||
bAllowRestrain = true
|
|
||||||
|
|
||||||
; move orbit marker to player's position
|
|
||||||
DLC2TameDragonOrbitMarker.Moveto(Game.GetPlayer())
|
|
||||||
|
|
||||||
; always hold him on the ground to start
|
|
||||||
; give "no fly" ability so it doesn't interfere with scripted "no fly"
|
|
||||||
newDragon.AddSpell(DLC2TameDragonNoFlyAbility)
|
|
||||||
|
|
||||||
; put dragon in alias
|
|
||||||
DragonAlias.ForceRefTo(newDragon)
|
|
||||||
; stop combat
|
|
||||||
newDragon.StopCombatAlarm()
|
|
||||||
|
|
||||||
; start scene
|
|
||||||
; check for special case: MQ06
|
|
||||||
if newDragon.IsInFaction(DLC2MQ06DragonFaction) && DLC2MQ06.GetStage() >= 10 && DLC2MQ06.GetStage() < 300
|
|
||||||
; this is the MQ06 dragon - first time tamed
|
|
||||||
bMQ06DragonTaming = true
|
|
||||||
DLC2MQ06TameDragonScene.Start()
|
|
||||||
else
|
|
||||||
bMQ06DragonTaming = false
|
|
||||||
DLC2TameDragonScene1.Start()
|
|
||||||
endif
|
|
||||||
|
|
||||||
; heal the dragon
|
|
||||||
newDragon.RestoreActorValue("Health", 9999)
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; call this function to get the dragon to briefly land next to the player
|
|
||||||
function LandDragon()
|
|
||||||
; debug.trace(self + " LandDragon: dragon " + dragonAlias.GetRef() + " landing again")
|
|
||||||
Actor dragonActor = dragonAlias.GetActorRef()
|
|
||||||
; reset actor value
|
|
||||||
if dragonActor.GetActorValue("variable01") != 99
|
|
||||||
dragonActor.SetActorValue("Variable01", 0)
|
|
||||||
else
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; move orbit marker to player's position
|
|
||||||
DLC2TameDragonOrbitMarker.Moveto(Game.GetPlayer())
|
|
||||||
|
|
||||||
; always hold him on the ground to start
|
|
||||||
; give "no fly" ability so it doesn't interfere with scripted "no fly"
|
|
||||||
dragonActor.AddSpell(DLC2TameDragonNoFlyAbility)
|
|
||||||
|
|
||||||
; start scene
|
|
||||||
DLC2TameDragonScene2.Start()
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; check if dragon is in valid worldspace - if not, release immediately
|
|
||||||
function ValidateWorldspace()
|
|
||||||
; debug.trace(self + " ValidateWorldspace")
|
|
||||||
if DLC2TameDragonAllowedWorldspaces.HasForm(Game.GetPlayer().GetWorldSpace()) == false
|
|
||||||
; debug.trace(self + " player in invalid worldspace " + Game.GetPlayer().GetWorldSpace() + " - release dragon")
|
|
||||||
EndWait()
|
|
||||||
ReleaseDragon()
|
|
||||||
endif
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; call this when initial scene is ended or player tries to ride him
|
|
||||||
function EndWait()
|
|
||||||
; debug.trace(self + " EndWait")
|
|
||||||
Actor dragonActor = dragonAlias.GetActorRef()
|
|
||||||
|
|
||||||
; if he's not in a "waiting" state, do nothing
|
|
||||||
if dragonActor.HasSpell(DLC2TameDragonNoFlyAbility) == false
|
|
||||||
; debug.trace(self + " EndWait: not in waiting state, do nothing")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; can't restrain him again
|
|
||||||
bAllowRestrain = false
|
|
||||||
; unrestrain him
|
|
||||||
RestrainDragon(false)
|
|
||||||
; set crime faction
|
|
||||||
dragonActor.SetCrimeFaction(DLC2TameDragonFaction)
|
|
||||||
|
|
||||||
; let him fly if allowed
|
|
||||||
dragonActor.RemoveSpell(DLC2TameDragonNoFlyAbility)
|
|
||||||
dragonActor.RemoveSpell(DLC2abCalmDragon)
|
|
||||||
|
|
||||||
; safety check: if dragon is not in aliases, must have been released (probably by player aggroing it)
|
|
||||||
if dragonAlias.GetActorRef() != dragonActor
|
|
||||||
; debug.trace(" EndWait - dragonAlias doesn't match, do nothing else")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; set "done waiting" variable
|
|
||||||
if dragonActor.GetActorValue("variable01") == 0
|
|
||||||
dragonActor.SetActorValue("variable01", 1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
dragonActor.EvaluatePackage()
|
|
||||||
; register for summon duration (not for MQ06 dragon)
|
|
||||||
if !bMQ06DragonTaming
|
|
||||||
RegisterForSingleUpdateGameTime(fTameHours)
|
|
||||||
endif
|
|
||||||
|
|
||||||
; try adding the calm again in case it didn't work the first time
|
|
||||||
; debug.trace(self + " adding DLC2abCalmDragon to dragon")
|
|
||||||
dragonActor.AddSpell(DLC2abCalmDragon)
|
|
||||||
utility.wait(2)
|
|
||||||
dragonActor.RemoveSpell(DLC2abCalmDragon)
|
|
||||||
|
|
||||||
; if player is riding, increment riding variable
|
|
||||||
if dragonActor.IsBeingRidden()
|
|
||||||
if iDragonsRiddenCount == 0
|
|
||||||
RegisterForSingleUpdate(8.0)
|
|
||||||
endif
|
|
||||||
; only increment if not already in tamed faction
|
|
||||||
if !dragonActor.IsInFaction(DLC2TamedDragonTrackingFaction)
|
|
||||||
dragonActor.AddToFaction(DLC2TamedDragonTrackingFaction)
|
|
||||||
iDragonsRiddenCount = iDragonsRiddenCount + 1
|
|
||||||
if iDragonsRiddenCount >= iDragonsRiddenAchievementCount
|
|
||||||
Game.AddAchievement(73)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; call this when timer runs out or dragon dies
|
|
||||||
function ReleaseDragon()
|
|
||||||
; debug.trace(self + " ReleaseDragon")
|
|
||||||
; set actor value to indicate he wants to be released when possible
|
|
||||||
Actor dragonActor = dragonAlias.GetActorRef()
|
|
||||||
; don't do this more than once to the same dragon
|
|
||||||
if dragonActor.GetActorValue("variable01") != 99
|
|
||||||
dragonActor.SetActorValue("variable01", 99)
|
|
||||||
; try to dispel now or later
|
|
||||||
TryToReleaseDragon(dragonActor)
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
event OnUpdateGameTime()
|
|
||||||
; debug.trace(self + " OnUpdate")
|
|
||||||
; is dragon waiting to be released?
|
|
||||||
Actor dragonActor = dragonAlias.GetActorRef()
|
|
||||||
if dragonActor.GetActorValue("variable01") == 99
|
|
||||||
TryToReleaseDragon(dragonActor)
|
|
||||||
else
|
|
||||||
; time to dispel
|
|
||||||
ReleaseDragon()
|
|
||||||
endif
|
|
||||||
endEvent
|
|
||||||
|
|
||||||
int tempCount = 0
|
|
||||||
|
|
||||||
function TryToReleaseDragon(actor dragonActor)
|
|
||||||
tempCount += 1
|
|
||||||
; debug.trace(self + " TryToReleaseDragon " + tempCount)
|
|
||||||
|
|
||||||
; if player is not riding, release
|
|
||||||
if dragonActor.IsBeingRidden() == 0
|
|
||||||
; RELEASE:
|
|
||||||
dragonActor.SetRestrained(false) ; just in case
|
|
||||||
dragonAlias.Clear()
|
|
||||||
dragonReleasedAlias.ForceRefTo(dragonActor)
|
|
||||||
; if in combat with player, release immediately
|
|
||||||
if dragonActor.IsHostileToActor(Game.GetPlayer())
|
|
||||||
; debug.trace(self + " hostile to player, release immediately")
|
|
||||||
FinishRelease()
|
|
||||||
else
|
|
||||||
; debug.trace(self + " normal release, fly away before releasing")
|
|
||||||
; move into "released" alias (no riding allowed)
|
|
||||||
DLC2TameDragonReleaseScene.Start()
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
; player is riding - need him to land
|
|
||||||
; FOR NOW - no time limit if player is riding
|
|
||||||
; just keep checking for player to be not riding
|
|
||||||
|
|
||||||
; dragonActor.SetAllowFlyingEx(false, false, true)
|
|
||||||
|
|
||||||
; if dragonActor.GetFlyingState() == 0 && dragonActor.IsBeingRidden() == 1 && Game.GetPlayer().IsOnMount() == 1
|
|
||||||
; force player to dismount
|
|
||||||
; Game.GetPlayer().Dismount()
|
|
||||||
; give time for dismount to finish
|
|
||||||
; RegisterForSingleUpdateGameTime(0.1)
|
|
||||||
; else
|
|
||||||
RegisterForSingleUpdateGameTime(0.1)
|
|
||||||
; endif
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; called when escape scene ends
|
|
||||||
function FinishRelease()
|
|
||||||
actor dragonActor = dragonReleasedAlias.GetActorRef()
|
|
||||||
; debug.trace(" FinishRelease: dragon=" + dragonActor)
|
|
||||||
; clear actor value
|
|
||||||
dragonActor.SetActorValue("variable01", 0)
|
|
||||||
; debug.trace(self + " FinishRelease - variable01=" + dragonactor.GetActorValue("variable01"))
|
|
||||||
; failsafe
|
|
||||||
dragonActor.RemoveSpell(DLC2TameDragonNoFlyAbility)
|
|
||||||
; clear aliases
|
|
||||||
dragonAlias.Clear()
|
|
||||||
dragonReleasedAlias.Clear()
|
|
||||||
; not teammate any more
|
|
||||||
; debug.trace(self + " FinishRelease - dragon NOT teammate")
|
|
||||||
dragonActor.SetPlayerTeammate(false)
|
|
||||||
dragonActor.SetCrimeFaction(none)
|
|
||||||
dragonActor.EvaluatePackage()
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function DragonDead()
|
|
||||||
; called by OnDeath block on dragon
|
|
||||||
; stop pending updates if any
|
|
||||||
UnregisterForUpdateGameTime()
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function RestrainDragon(bool bRestrain)
|
|
||||||
; this is to prevent him from responding to attacks when on the ground
|
|
||||||
; only do this when not flying!
|
|
||||||
actor dragonActor = dragonAlias.GetActorRef()
|
|
||||||
if bRestrain && dragonActor.GetActorValue("variable01") != 99
|
|
||||||
while dragonActor.GetFlyingState() > 0 && bAllowRestrain
|
|
||||||
utility.wait(1.0)
|
|
||||||
endwhile
|
|
||||||
; debug.trace(self + " ready to restrain dragon")
|
|
||||||
; only restrain if the allow flag is still true
|
|
||||||
if bAllowRestrain
|
|
||||||
; debug.trace(self + " restraining dragon")
|
|
||||||
dragonActor.SetRestrained(true)
|
|
||||||
; stop combat/alarms again to be sure
|
|
||||||
dragonActor.StopCombatAlarm()
|
|
||||||
; add calm ability - has to be AFTER restraining him
|
|
||||||
; debug.trace(self + " adding DLC2abCalmDragon to dragon")
|
|
||||||
dragonActor.AddSpell(DLC2abCalmDragon)
|
|
||||||
endif
|
|
||||||
; TRY MAKING TEAMMATE here - do it even if restrain can't happen
|
|
||||||
dragonActor.SetPlayerTeammate(true, false)
|
|
||||||
else
|
|
||||||
; debug.trace(self + " UN-Restraining dragon")
|
|
||||||
dragonActor.SetRestrained(false)
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
; this is used only for displaying the first-time help message
|
|
||||||
bool bLearnMessageDisplayed = false
|
|
||||||
event OnUpdate()
|
|
||||||
if !bLearnMessageDisplayed
|
|
||||||
bLearnMessageDisplayed = true
|
|
||||||
DLC2LearnDragonRidingMsg.Show()
|
|
||||||
endif
|
|
||||||
endEvent
|
|
||||||
|
|
||||||
|
|
||||||
ReferenceAlias Property dragonAlias Auto
|
|
||||||
ReferenceAlias Property dragonReleasedAlias Auto
|
|
||||||
|
|
||||||
Scene Property DLC2TameDragonScene1 Auto
|
|
||||||
{ normal tame scene to hold dragon on ground when you first tame him}
|
|
||||||
|
|
||||||
Scene Property DLC2TameDragonScene2 Auto
|
|
||||||
{ tame scene to hold dragon on ground after already tamed, if hit by the spell again }
|
|
||||||
|
|
||||||
Scene Property DLC2MQ06TameDragonScene Auto
|
|
||||||
{ MQ06 tame dragon scene }
|
|
||||||
|
|
||||||
Faction Property DLC2MQ06DragonFaction Auto
|
|
||||||
{ used to check for MQ06 dragon }
|
|
||||||
|
|
||||||
Quest Property DLC2MQ06 Auto
|
|
||||||
|
|
||||||
Float Property fTameHours = 1.0 Auto Conditional
|
|
||||||
{duration of tame in game hours}
|
|
||||||
|
|
||||||
Scene Property DLC2TameDragonReleaseScene Auto
|
|
||||||
|
|
||||||
ObjectReference Property DLC2TameDragonOrbitMarker Auto
|
|
||||||
{ default object that the orbit package uses
|
|
||||||
code also moves this to fast travel destination }
|
|
||||||
|
|
||||||
FormList Property DLC2TameDragonAllowedWorldspaces Auto
|
|
||||||
{ formlist of allowed worldspaces - dragon can only be tamed/ridden in these worldspaces }
|
|
||||||
|
|
||||||
bool bMQ06DragonTaming ; set to true when we've tamed the MQ06 dragon first time
|
|
||||||
|
|
||||||
SPELL Property DLC2TameDragonNoFlyAbility Auto
|
|
||||||
|
|
||||||
SPELL Property DLC2abCalmDragon Auto
|
|
||||||
|
|
||||||
Faction Property DLC2TameDragonFaction Auto
|
|
||||||
|
|
||||||
Message Property DLC2TameDragonResistMSG Auto
|
|
||||||
|
|
||||||
int Property iDragonsRiddenAchievementCount = 5 Auto
|
|
||||||
int iDragonsRiddenCount = 0
|
|
||||||
|
|
||||||
Message Property DLC2LearnDragonRidingMsg Auto
|
|
||||||
|
|
||||||
Faction Property DLC2TamedDragonTrackingFaction Auto
|
|
@ -8,8 +8,7 @@ ImageSpaceModifier property dragonFOVfx auto
|
|||||||
{FX played for various impacts in dragon combat}
|
{FX played for various impacts in dragon combat}
|
||||||
float property deathFXrange = 1024.0 auto
|
float property deathFXrange = 1024.0 auto
|
||||||
{max range to play death FX on player}
|
{max range to play death FX on player}
|
||||||
quest property MQkillDragon auto
|
|
||||||
{used to invoke deathSequence() function in MQKillDragonScript.psc}
|
|
||||||
actor property player auto hidden
|
actor property player auto hidden
|
||||||
{For quick reference and clean-looking script}
|
{For quick reference and clean-looking script}
|
||||||
float property FOVfalloff auto hidden
|
float property FOVfalloff auto hidden
|
||||||
@ -28,9 +27,6 @@ armor property forestDragonSkin auto
|
|||||||
int property dragonBreed = 0 auto
|
int property dragonBreed = 0 auto
|
||||||
{deprecated - do not use}
|
{deprecated - do not use}
|
||||||
|
|
||||||
WIFunctionsScript Property WI Auto ;added by jduvall
|
|
||||||
{Pointer to WIFunctionsScript on WI quest. Used to create script event to get nearby NPCs to react to the death of the dragon}
|
|
||||||
|
|
||||||
ImpactDataSet Property FXDragonTakeoffImpactSet Auto
|
ImpactDataSet Property FXDragonTakeoffImpactSet Auto
|
||||||
{Impact data set to use for the dragon takeoff}
|
{Impact data set to use for the dragon takeoff}
|
||||||
ImpactDataSet Property FXDragonLandingImpactSet Auto
|
ImpactDataSet Property FXDragonLandingImpactSet Auto
|
||||||
@ -52,7 +48,7 @@ WorldSpace Property DLC2ApocryphaWorld auto
|
|||||||
;|_____________|
|
;|_____________|
|
||||||
EVENT onInit()
|
EVENT onInit()
|
||||||
; just initialize any variables, etc.
|
; just initialize any variables, etc.
|
||||||
player = game.getPlayer() ; store player reference
|
player = game.GetForm(0x14) as Actor ; store player reference
|
||||||
FOVfalloff = 1600 ; range at which impact doesn't play FOV
|
FOVfalloff = 1600 ; range at which impact doesn't play FOV
|
||||||
|
|
||||||
if deathFXrange == 0
|
if deathFXrange == 0
|
||||||
@ -124,14 +120,6 @@ WorldSpace Property DLC2ApocryphaWorld auto
|
|||||||
|
|
||||||
|
|
||||||
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
|
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
|
||||||
;USED TO GET DIALOGUE CONDITIONED ON DRAGON HAVING ATTACKED A TOWN -- only happens if he lands on the ground in a location - ie death, or to land to fight (not on a perch)
|
|
||||||
;see also DragonPerchScript
|
|
||||||
|
|
||||||
; debug.trace(self + "OnLocationChange() calling WI.RegisterDragonAttack(" +akNewLoc + ")")
|
|
||||||
;USKP 2.0.3 - So. Now it seems like you won't even call this out of here with a None? Ok.....
|
|
||||||
if( akNewLoc != None )
|
|
||||||
WI.RegisterDragonAttack(akNewLoc, self)
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
if !isDead() && isGhost()
|
if !isDead() && isGhost()
|
||||||
; redundancy check to prevent invincible, "ghosted" dragons from respawning.
|
; redundancy check to prevent invincible, "ghosted" dragons from respawning.
|
||||||
@ -148,9 +136,6 @@ STATE alive
|
|||||||
setGhost(FALSE)
|
setGhost(FALSE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if akTarget == Game.GetPlayer()
|
|
||||||
WI.updateWIDragonTimer() ;used to prevent dragons from appearing too frequently
|
|
||||||
endif
|
|
||||||
endEvent
|
endEvent
|
||||||
|
|
||||||
EVENT onAnimationEvent(objectReference deliverator, string eventName)
|
EVENT onAnimationEvent(objectReference deliverator, string eventName)
|
||||||
@ -205,69 +190,13 @@ STATE alive
|
|||||||
endEVENT
|
endEVENT
|
||||||
|
|
||||||
EVENT onDeath(actor killer)
|
EVENT onDeath(actor killer)
|
||||||
;debug.trace("Remove mouth/injury FX art, begin death FX sequence for " + self)
|
DispelAllSpells()
|
||||||
;USKP 2.1.3 Bug #19214 - Dialogue in the quest has options that get skipped with this line below the gotoState call.
|
gotoState("deadDisintegrated")
|
||||||
WI.startWIDragonKillQuest(self) ;used to create a scene if any NPCs are nearby when the dragon dies. See WIFunctionsScript attached to WI quest which creates a story manager script event, and WIDragonKilled quest which handles the scene.
|
|
||||||
gotoState("deadAndWaiting")
|
|
||||||
|
|
||||||
; removing update registration in favor of a while() in the STATE below
|
|
||||||
;registerForUpdate(1)
|
|
||||||
endEVENT
|
endEVENT
|
||||||
endSTATE
|
endSTATE
|
||||||
|
|
||||||
STATE deadAndWaiting
|
|
||||||
|
|
||||||
;-------------------CHANGED FOR DLC2---------------------------
|
|
||||||
EVENT onBeginState()
|
|
||||||
|
|
||||||
MQKillDragonScript MQKillDragonS = MQkillDragon as MQKillDragonScript
|
|
||||||
|
|
||||||
;If in Apocrypha, this is the boss fight so do not wait for distance
|
|
||||||
if DLC2ApocryphaLocation && DLC2ApocryphaWorld && (game.getPlayer().isInLocation(DLC2ApocryphaLocation) || game.getPlayer().getWorldSpace() == DLC2ApocryphaWorld)
|
|
||||||
gotoState("deadDisintegrated")
|
|
||||||
MQkillDragonS.deathSequence(self)
|
|
||||||
RegisterForSingleUpdateGameTime(0.5)
|
|
||||||
elseif MQKillDragonS.ShouldMiraakAppear(self) && MiraakAppeared == false
|
|
||||||
gotoState("deadDisintegrated")
|
|
||||||
; Debug.Trace(self + "MiraakAppears")
|
|
||||||
MiraakAppeared = true
|
|
||||||
MQkillDragonS.deathSequence(self, MiraakAppears = true)
|
|
||||||
RegisterForSingleUpdateGameTime(0.5)
|
|
||||||
else
|
|
||||||
;NORMAL BASE GAME BEHAVIOR
|
|
||||||
while getDistance(player) > deathFXrange
|
|
||||||
utility.wait(1.0)
|
|
||||||
endWhile
|
|
||||||
; debug.trace("player close enough to absorb" + self)
|
|
||||||
gotoState("deadDisintegrated")
|
|
||||||
MQkillDragonS.deathSequence(self)
|
|
||||||
RegisterForSingleUpdateGameTime(0.5)
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
endEVENT
|
|
||||||
;--------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
; EVENT onUpdate()
|
|
||||||
; if getDistance(player) < deathFXrange
|
|
||||||
; ; debug.trace("player close enough to absorb" + self)
|
|
||||||
; gotoState("deadDisintegrated")
|
|
||||||
; unRegisterforUpdate()
|
|
||||||
; (MQkillDragon as MQKillDragonScript).deathSequence(self)
|
|
||||||
; endif
|
|
||||||
;endEVENT
|
|
||||||
endSTATE
|
|
||||||
|
|
||||||
STATE deadDisintegrated
|
STATE deadDisintegrated
|
||||||
; nothing happens here - dead and just bones.
|
; nothing happens here - just dead
|
||||||
event OnUpdateGameTime()
|
|
||||||
cell myDragonCell = self.getparentcell()
|
|
||||||
if !myDragonCell.IsAttached()
|
|
||||||
NoStalking()
|
|
||||||
else
|
|
||||||
RegisterForSingleUpdateGameTime(0.5)
|
|
||||||
endIf
|
|
||||||
endEvent
|
|
||||||
endSTATE
|
endSTATE
|
||||||
|
|
||||||
; _____________
|
; _____________
|
||||||
@ -282,23 +211,6 @@ function AnimateFOV(float fFOVfalloff = 1600.0)
|
|||||||
if FOVpower > 1.0
|
if FOVpower > 1.0
|
||||||
FOVpower = 1.0 ; clamp to prevent wacky values
|
FOVpower = 1.0 ; clamp to prevent wacky values
|
||||||
endif
|
endif
|
||||||
; ;debug.trace("player is " + playerDist + " from landing dragon")
|
|
||||||
; ;debug.trace("dragon FOV fx power is" + FOVpower)
|
|
||||||
dragonFOVfx.apply(FOVpower) ;animated FOV effect. Strength based on distance from player
|
dragonFOVfx.apply(FOVpower) ;animated FOV effect. Strength based on distance from player
|
||||||
endif
|
endif
|
||||||
endFunction
|
endFunction
|
||||||
|
|
||||||
Bool function IsDurnehviir()
|
|
||||||
|
|
||||||
return self.GetActorBase() as form == game.GetFormFromFile(0x000030D8, "Dawnguard.esm")
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function NoStalking()
|
|
||||||
|
|
||||||
if self.IsDurnehviir()
|
|
||||||
return
|
|
||||||
else
|
|
||||||
self.DispelAllSpells()
|
|
||||||
self.SetCriticalStage(self.CritStage_DisintegrateEnd)
|
|
||||||
endIf
|
|
||||||
endFunction
|
|
@ -1,19 +0,0 @@
|
|||||||
Scriptname DragonPerchScript extends ObjectReference
|
|
||||||
{Script attached to all dragon perches. ASSUMES THE ONLY THING ABLE TO ACTIVATE THE PERCH IS A DRAGON!}
|
|
||||||
|
|
||||||
WIFunctionsScript Property WI Auto ;added by jduvall
|
|
||||||
{Pointer to WIFunctionsScript on WI quest.}
|
|
||||||
|
|
||||||
;Primary use at the moment, is to register a dragon attack on towns, should a dragon perch somewhere in a town -jduvall
|
|
||||||
|
|
||||||
Event OnActivate(ObjectReference akActionRef)
|
|
||||||
|
|
||||||
;*** !!! ASSUMES THE ONLY THING ABLE TO ACTIVATE THE PERCH IS A DRAGON !!!! ***
|
|
||||||
|
|
||||||
; debug.trace(self + "OnActivate(" + akActionRef + ") calling WI.RegisterDragonAttack()")
|
|
||||||
|
|
||||||
;SEE ALSO: DragonActorScript
|
|
||||||
WI.RegisterDragonAttack(GetEditorLocation(), akActionRef as Actor)
|
|
||||||
|
|
||||||
|
|
||||||
EndEvent
|
|
@ -1,514 +0,0 @@
|
|||||||
Scriptname MQKillDragonScript extends Quest Conditional
|
|
||||||
{holds property and dragon death function, until we have base actor scripts}
|
|
||||||
|
|
||||||
import game
|
|
||||||
import debug
|
|
||||||
import utility
|
|
||||||
import sound
|
|
||||||
|
|
||||||
|
|
||||||
;************************************************
|
|
||||||
; this is what actually does the death sequence
|
|
||||||
; change timing and art here
|
|
||||||
;************************************************
|
|
||||||
|
|
||||||
;------------------------ADDED FOR DLC2---------------------
|
|
||||||
bool Function TryMiraakMakeHisIntroduction(Actor DragonRef)
|
|
||||||
|
|
||||||
RETURN DLC2SoulSteal.TryMiraakMakeHisIntroduction(DragonRef)
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
bool Function ShouldMiraakAppear(Actor DragonRef)
|
|
||||||
|
|
||||||
RETURN DLC2SoulSteal.ShouldMiraakAppear(DragonRef)
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
;----------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
function DeathSequence(Actor dragonRef, Actor AbsorbActor = None, bool MiraakAppears = False)
|
|
||||||
;ADDED "Actor AbsorbActor = none, bool MiraakAppears = false" FOR DLC2
|
|
||||||
|
|
||||||
;ADDED FOR DLC2----------------------------------
|
|
||||||
if game.getPlayer().isInLocation(DLC2ApocryphaLocation) || game.getPlayer().getWorldSpace() == DLC2ApocryphaWorld
|
|
||||||
if AbsorbActor == none
|
|
||||||
; Debug.Trace(self + "Miraak Soul Stealing in Apocrypha Boss Fight")
|
|
||||||
;Start an alternate version of the death sequence that gets to the soul absorb faster
|
|
||||||
MQ06DeathSequence(dragonRef, DLC2MiraakMQ06Ref, false)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if AbsorbActor == none
|
|
||||||
AbsorbActor = Game.GetPlayer()
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
if MiraakAppears
|
|
||||||
; Debug.Trace(self + "Calling DLC2SoulSteal.MiraakAppears()")
|
|
||||||
DLC2SoulSteal.MiraakAppears(dragonRef)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
;------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
if dragonRef.IsInFaction(NoDragonAbsorb)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; Add Skeleton to dragon's inventory.
|
|
||||||
dragonRef.AddItem(DragonUnderskin)
|
|
||||||
|
|
||||||
; Dragon wings particles bits
|
|
||||||
|
|
||||||
FXDragonDeathLHandBits.Play(dragonRef, 12)
|
|
||||||
FXDragonDeathRHandBits.Play(dragonRef, 12)
|
|
||||||
|
|
||||||
|
|
||||||
wait(0.2)
|
|
||||||
|
|
||||||
;Equip skeleton under skin
|
|
||||||
dragonRef.EquipItem(DragonUnderskin)
|
|
||||||
wait(0.5)
|
|
||||||
dragonRef.PlaySubGraphAnimation("UnderSkinFadeOut")
|
|
||||||
|
|
||||||
;*** WORLD INTERACTION FUNCTION -- jduvall
|
|
||||||
WI.PlayerIsCurrentlyAbsorbingPower(dragonRef)
|
|
||||||
bIsAbsorbing = true
|
|
||||||
|
|
||||||
; Start effect shader decorating holes in the base skin
|
|
||||||
DragonHolesFXS.Play(dragonRef)
|
|
||||||
; Play disintegrating skin.
|
|
||||||
dragonRef.PlaySubGraphAnimation( "SkinFadeOut" )
|
|
||||||
;;;
|
|
||||||
; Play imagespace modifier which is timed to match sequence.
|
|
||||||
DragonPowerAbsorbISM.Apply()
|
|
||||||
|
|
||||||
; Sound of dragon carcass first bursts into flames until the flames die off. Must be turned off
|
|
||||||
int soundInstanceFireID = NPCDragonDeathSequenceFireLPM.play(dragonRef)
|
|
||||||
|
|
||||||
wait(1)
|
|
||||||
|
|
||||||
;Small bits rising from dragon fx shader.
|
|
||||||
DragonHolesBitsLiteFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(1)
|
|
||||||
;Bigger bits rising from dragon fx shader.
|
|
||||||
DragonHolesBitsFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wait(1.75)
|
|
||||||
;Play blood fade out if it is there
|
|
||||||
dragonRef.PlaySubGraphAnimation("BloodFade")
|
|
||||||
|
|
||||||
; Magic particles on wings
|
|
||||||
FXDragonDeathRHandFire.Play(dragonRef, 12)
|
|
||||||
FXDragonDeathLHandFire.Play(dragonRef, 12)
|
|
||||||
|
|
||||||
wait(1.0)
|
|
||||||
; magic fire fx shader
|
|
||||||
DragonHolesMagicFXS.Play(dragonRef)
|
|
||||||
DragonHolesMagicFXS.Stop(dragonRef);;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
wait(0.25)
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
;StopDragon bits fxs
|
|
||||||
DragonHolesBitsFXS.Stop(dragonRef)
|
|
||||||
DragonHolesBitsLiteFXS.Stop(dragonRef)
|
|
||||||
;Stop holes fx shader now that main dragon skin is un-worn
|
|
||||||
DragonHolesFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
; Play light emitting magic shader on dragon
|
|
||||||
;; DragonHolesLightFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(1.8)
|
|
||||||
;unequipp invisible art
|
|
||||||
if dragonRef.IsEquipped(DragonBloodHeadFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodHeadFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodTailFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodTailFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodWingLFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodWingLFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodWingRFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodWingRFXArmor)
|
|
||||||
endif
|
|
||||||
|
|
||||||
;display dragon absorb effect art. One part on dragon one part on player.
|
|
||||||
DragonAbsorbEffect.Play(dragonRef, 8, AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
;; dragonRef.placeAtME(MAGDragonPowerAbsorbExplosion)
|
|
||||||
DragonAbsorbManEffect.Play(AbsorbActor, 8, dragonRef) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
; Sounds for when the wispy particles being to fly at the player.
|
|
||||||
NPCDragonDeathSequenceWind.play(dragonRef)
|
|
||||||
NPCDragonDeathSequenceExplosion.play(dragonRef)
|
|
||||||
|
|
||||||
wait(0.1)
|
|
||||||
|
|
||||||
; On man power absorb effect shader.
|
|
||||||
DragonPowerAbsorbFXS.Play(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
|
|
||||||
if AbsorbActor == Game.GetPlayer() ;***DLC2
|
|
||||||
wait(1)
|
|
||||||
; turn off remaining effect bits and magic leak fxshaders
|
|
||||||
|
|
||||||
wait(1)
|
|
||||||
|
|
||||||
Endif
|
|
||||||
|
|
||||||
; ghost the dragon so you can't hit him
|
|
||||||
dragonRef.SetGhost(true)
|
|
||||||
|
|
||||||
;clear any arrows that may have been stuck in dragon
|
|
||||||
dragonRef.clearExtraArrows()
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
if AbsorbActor == Game.GetPlayer() ;***DLC2
|
|
||||||
wait(4)
|
|
||||||
else
|
|
||||||
wait(3)
|
|
||||||
endif
|
|
||||||
|
|
||||||
;Stop fx shader on player showing power absorb.
|
|
||||||
DragonPowerAbsorbFXS.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
; End sound of dragon carcass bursting into flames.
|
|
||||||
StopInstance(soundInstanceFireID)
|
|
||||||
|
|
||||||
; add lingering smoke and glow to dragon carcass.
|
|
||||||
DragonHolesSmokeFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
; Start sound for smoldering dragon
|
|
||||||
int soundInstanceSmolderID = NPCDragonDeathSequenceSmolderLPM.play(dragonRef)
|
|
||||||
|
|
||||||
|
|
||||||
if AbsorbActor == Game.GetPlayer() ;***DLC2
|
|
||||||
wait(4)
|
|
||||||
endif
|
|
||||||
|
|
||||||
;*** CHANGED FOR DLC2--------------------------------------------------------
|
|
||||||
|
|
||||||
if AbsorbActor == GetPlayer()
|
|
||||||
; increment dragon count
|
|
||||||
DragonsAbsorbed.value = DragonsAbsorbed.value + 1
|
|
||||||
|
|
||||||
; add dragonsoul point to player
|
|
||||||
AbsorbActor.modActorValue("dragonsouls", VoicePointsReward) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
; do this right now for MQ104 dragon:
|
|
||||||
if !MQ104.GetStageDone(90) && MQ104.IsRunning()
|
|
||||||
; ; debug.trace(self + " setting MQ104 stage 90")
|
|
||||||
MQ104.SetStage(90)
|
|
||||||
endif
|
|
||||||
|
|
||||||
elseif game.getPlayer().isInLocation(DLC2ApocryphaLocation)
|
|
||||||
DLC2BossBattleScript = DLC2MQ06MiraakAlias as DLC2MQ06MiraakBossBattle
|
|
||||||
DLC2BossBattleScript.MiraakStealsSoul()
|
|
||||||
else
|
|
||||||
;MIRAAK STOLE THE SOUL!!!
|
|
||||||
DLC2SoulSteal.FinishStealingSoul()
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
TryMiraakMakeHisIntroduction(DragonRef)
|
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
; turn off effect shaders for smoldering carcass
|
|
||||||
DragonHolesSmokeFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
; Get rid of art attached to dragon and player showing streaming magic.
|
|
||||||
DragonAbsorbEffect.Stop(dragonRef)
|
|
||||||
DragonAbsorbManEffect.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
if AbsorbActor == Game.GetPlayer() ;***DLC2
|
|
||||||
wait(4)
|
|
||||||
endif
|
|
||||||
|
|
||||||
;Stop smoldering sound
|
|
||||||
StopInstance(soundInstanceSmolderID)
|
|
||||||
|
|
||||||
; put dragon in faction so other quests know player has absorbed power
|
|
||||||
dragonRef.addtoFaction(MQKillDragonFaction)
|
|
||||||
|
|
||||||
;Stop light emitting magic shader on dragon
|
|
||||||
DragonHolesLightFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
;*** WORLD INTERACTION FUNCTION -- jduvall
|
|
||||||
WI.PlayerIsDoneAbsorbingPower(dragonRef)
|
|
||||||
|
|
||||||
dragonRef.EquipItem(SkinDragonHider, true)
|
|
||||||
|
|
||||||
bIsAbsorbing = false
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
WIFunctionsScript Property WI Auto
|
|
||||||
{Pointer to WIFunctionsScript on WI quest. Used to call functions so that the dialogue in the scene in WIDragonKill quest is aware of when the player is aborbing and done absorbing the dragon's power.}
|
|
||||||
|
|
||||||
GlobalVariable Property DragonsAbsorbed Auto
|
|
||||||
|
|
||||||
Armor Property DragonUnderskin Auto
|
|
||||||
|
|
||||||
Faction Property MQKillDragonFaction Auto
|
|
||||||
|
|
||||||
int Property VoicePointsReward = 1 Auto
|
|
||||||
{how many soul points to give player}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VisualEffect Property DragonAbsorbEffect Auto
|
|
||||||
VisualEffect Property DragonAbsorbManEffect Auto
|
|
||||||
VisualEffect Property FXDragonDeathLHandBits Auto
|
|
||||||
VisualEffect Property FXDragonDeathLHandFire Auto
|
|
||||||
VisualEffect Property FXDragonDeathRHandBits Auto
|
|
||||||
VisualEffect Property FXDragonDeathRHandFire Auto
|
|
||||||
;VisualEffect Property DragonDeadswapHide Auto
|
|
||||||
;VisualEffect Property DragonDeadswap Auto
|
|
||||||
|
|
||||||
EffectShader Property DragonHolesFXS Auto
|
|
||||||
EffectShader Property DragonHolesBitsFXS Auto
|
|
||||||
EffectShader Property DragonHolesBitsLiteFXS Auto
|
|
||||||
EffectShader Property DragonPowerAbsorbFXS Auto
|
|
||||||
EffectShader Property DragonHolesSmokeFXS Auto
|
|
||||||
EffectShader Property DragonHolesMagicFXS Auto
|
|
||||||
EffectShader Property DragonHolesLightFXS Auto
|
|
||||||
|
|
||||||
ImageSpaceModifier Property DragonPowerAbsorbISM Auto
|
|
||||||
|
|
||||||
sound property NPCDragonDeathSequenceFireLPM auto
|
|
||||||
sound property NPCDragonDeathSequenceWind auto
|
|
||||||
sound property NPCDragonDeathSequenceExplosion auto
|
|
||||||
sound property NPCDragonDeathSequenceSmolderLPM auto
|
|
||||||
|
|
||||||
Armor Property DragonBloodHeadFXArmor Auto
|
|
||||||
Armor Property DragonBloodTailFXArmor Auto
|
|
||||||
Armor Property DragonBloodWingLFXArmor Auto
|
|
||||||
Armor Property DragonBloodWingRFXArmor Auto
|
|
||||||
Armor Property SkinDragonHider Auto
|
|
||||||
|
|
||||||
Explosion Property MAGDragonPowerAbsorbExplosion Auto
|
|
||||||
|
|
||||||
Faction Property NoDragonAbsorb Auto
|
|
||||||
{no death sequence if in this faction}
|
|
||||||
|
|
||||||
bool Property bIsAbsorbing Auto Conditional
|
|
||||||
{true while the absorb sequence is running}
|
|
||||||
|
|
||||||
Quest Property MQ104 Auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;Added for DLC-------------------------------------------
|
|
||||||
;Everything below this is a rework for Miraak's soul steal in
|
|
||||||
;the apocrypha boss fight
|
|
||||||
DLC2SoulStealScript Property DLC2SoulSteal Auto
|
|
||||||
Actor Property DLC2MiraakMQ06Ref Auto
|
|
||||||
Location Property DLC2ApocryphaLocation Auto
|
|
||||||
Worldspace Property DLC2ApocryphaWorld Auto
|
|
||||||
ReferenceAlias Property DLC2MQ06MiraakAlias Auto
|
|
||||||
DLC2MQ06MiraakBossBattle Property DLC2BossBattleScript Auto hidden
|
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; ALTERNATE VERSION OF THE DEATH SEQUENCE FOR MQ06
|
|
||||||
; This absorbes the soul much faster
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
|
|
||||||
function MQ06DeathSequence(Actor dragonRef, Actor AbsorbActor = None, bool MiraakAppears = False)
|
|
||||||
;ADDED "Actor AbsorbActor = none, bool MiraakAppears = false" FOR DLC2
|
|
||||||
|
|
||||||
if dragonRef.IsInFaction(NoDragonAbsorb)
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
; Add Skeleton to dragon's inventory.
|
|
||||||
dragonRef.AddItem(DragonUnderskin)
|
|
||||||
|
|
||||||
; Dragon wings particles bits
|
|
||||||
|
|
||||||
FXDragonDeathLHandBits.Play(dragonRef, 12)
|
|
||||||
FXDragonDeathRHandBits.Play(dragonRef, 12)
|
|
||||||
|
|
||||||
|
|
||||||
;wait(0.2)
|
|
||||||
|
|
||||||
;Equip skeleton under skin
|
|
||||||
dragonRef.EquipItem(DragonUnderskin)
|
|
||||||
;wait(0.5)
|
|
||||||
dragonRef.PlaySubGraphAnimation("UnderSkinFadeOut")
|
|
||||||
|
|
||||||
;**************************************************************************
|
|
||||||
; This is the bit that plays the absorb stuff, needed to move it up for Miraak
|
|
||||||
;display dragon absorb effect art. One part on dragon one part on player.
|
|
||||||
DragonAbsorbEffect.Play(dragonRef, 8, AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
;; dragonRef.placeAtME(MAGDragonPowerAbsorbExplosion)
|
|
||||||
DragonAbsorbManEffect.Play(AbsorbActor, 8, dragonRef) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
; Sounds for when the wispy particles being to fly at the player.
|
|
||||||
NPCDragonDeathSequenceWind.play(dragonRef)
|
|
||||||
NPCDragonDeathSequenceExplosion.play(dragonRef)
|
|
||||||
|
|
||||||
DLC2BossBattleScript = DLC2MQ06MiraakAlias as DLC2MQ06MiraakBossBattle
|
|
||||||
DLC2BossBattleScript.MiraakStealsSoul()
|
|
||||||
DLC2SoulSteal.ModDLC2SoulStealCount(1)
|
|
||||||
;wait(0.1)
|
|
||||||
|
|
||||||
; On man power absorb effect shader.
|
|
||||||
DragonPowerAbsorbFXS.Play(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
;wait(1)
|
|
||||||
; turn off remaining effect bits and magic leak fxshaders
|
|
||||||
|
|
||||||
|
|
||||||
;wait(1)
|
|
||||||
; ghost the dragon so you can't hit him
|
|
||||||
dragonRef.SetGhost(true)
|
|
||||||
|
|
||||||
;clear any arrows that may have been stuck in dragon
|
|
||||||
dragonRef.clearExtraArrows()
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;wait(4)
|
|
||||||
|
|
||||||
;Stop fx shader on player showing power absorb.
|
|
||||||
DragonPowerAbsorbFXS.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
|
|
||||||
;**************************************************************************
|
|
||||||
;*** CHANGED FOR DLC2--------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;TryMiraakMakeHisIntroduction(DragonRef)
|
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
;*** WORLD INTERACTION FUNCTION -- jduvall
|
|
||||||
;WI.PlayerIsCurrentlyAbsorbingPower(dragonRef)
|
|
||||||
bIsAbsorbing = true
|
|
||||||
|
|
||||||
; Start effect shader decorating holes in the base skin
|
|
||||||
DragonHolesFXS.Play(dragonRef)
|
|
||||||
; Play disintegrating skin.
|
|
||||||
dragonRef.PlaySubGraphAnimation( "SkinFadeOut" )
|
|
||||||
;;;
|
|
||||||
; Play imagespace modifier which is timed to match sequence.
|
|
||||||
DragonPowerAbsorbISM.Apply()
|
|
||||||
|
|
||||||
; Sound of dragon carcass first bursts into flames until the flames die off. Must be turned off
|
|
||||||
int soundInstanceFireID = NPCDragonDeathSequenceFireLPM.play(dragonRef)
|
|
||||||
|
|
||||||
wait(1)
|
|
||||||
|
|
||||||
;Small bits rising from dragon fx shader.
|
|
||||||
DragonHolesBitsLiteFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(1)
|
|
||||||
;Bigger bits rising from dragon fx shader.
|
|
||||||
DragonHolesBitsFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wait(1.75)
|
|
||||||
;Play blood fade out if it is there
|
|
||||||
dragonRef.PlaySubGraphAnimation("BloodFade")
|
|
||||||
|
|
||||||
; Magic particles on wings
|
|
||||||
FXDragonDeathRHandFire.Play(dragonRef, 12)
|
|
||||||
FXDragonDeathLHandFire.Play(dragonRef, 12)
|
|
||||||
|
|
||||||
wait(1.0)
|
|
||||||
; magic fire fx shader
|
|
||||||
DragonHolesMagicFXS.Play(dragonRef)
|
|
||||||
DragonHolesMagicFXS.Stop(dragonRef);;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
wait(0.25)
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
;StopDragon bits fxs
|
|
||||||
DragonHolesBitsFXS.Stop(dragonRef)
|
|
||||||
DragonHolesBitsLiteFXS.Stop(dragonRef)
|
|
||||||
;Stop holes fx shader now that main dragon skin is un-worn
|
|
||||||
DragonHolesFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
; Play light emitting magic shader on dragon
|
|
||||||
;; DragonHolesLightFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
wait(1.8)
|
|
||||||
;unequipp invisible art
|
|
||||||
if dragonRef.IsEquipped(DragonBloodHeadFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodHeadFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodTailFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodTailFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodWingLFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodWingLFXArmor)
|
|
||||||
endif
|
|
||||||
if dragonRef.IsEquipped(DragonBloodWingRFXArmor) == true
|
|
||||||
dragonRef.unEquipItem(DragonBloodWingRFXArmor)
|
|
||||||
endif
|
|
||||||
|
|
||||||
; End sound of dragon carcass bursting into flames.
|
|
||||||
StopInstance(soundInstanceFireID)
|
|
||||||
;***********************************************************************
|
|
||||||
|
|
||||||
; add lingering smoke and glow to dragon carcass.
|
|
||||||
DragonHolesSmokeFXS.Play(dragonRef)
|
|
||||||
|
|
||||||
; Start sound for smoldering dragon
|
|
||||||
int soundInstanceSmolderID = NPCDragonDeathSequenceSmolderLPM.play(dragonRef)
|
|
||||||
|
|
||||||
wait(4)
|
|
||||||
|
|
||||||
;*** --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
; turn off effect shaders for smoldering carcass
|
|
||||||
DragonHolesSmokeFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
; Get rid of art attached to dragon and player showing streaming magic.
|
|
||||||
DragonAbsorbEffect.Stop(dragonRef)
|
|
||||||
DragonAbsorbManEffect.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor
|
|
||||||
|
|
||||||
wait(4)
|
|
||||||
|
|
||||||
;Stop smoldering sound
|
|
||||||
StopInstance(soundInstanceSmolderID)
|
|
||||||
|
|
||||||
; put dragon in faction so other quests know player has absorbed power
|
|
||||||
dragonRef.addtoFaction(MQKillDragonFaction)
|
|
||||||
|
|
||||||
;Stop light emitting magic shader on dragon
|
|
||||||
DragonHolesLightFXS.Stop(dragonRef)
|
|
||||||
|
|
||||||
;*** WORLD INTERACTION FUNCTION -- jduvall
|
|
||||||
WI.PlayerIsDoneAbsorbingPower(dragonRef)
|
|
||||||
|
|
||||||
dragonRef.EquipItem(SkinDragonHider, true)
|
|
||||||
|
|
||||||
bIsAbsorbing = false
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
;---------------------------------------------------------
|
|
@ -1,496 +0,0 @@
|
|||||||
Scriptname WIFunctionsScript extends Quest Conditional
|
|
||||||
{A place to hold functions that more than one world interaction quest might need that require properties I don't want to have to set up more than once.}
|
|
||||||
|
|
||||||
;HOW TO USE THIS: Make this Quest a property cast as this quest, in the calling quest, and then you can access it's functions using the properties set up on WI quest.
|
|
||||||
|
|
||||||
MiscObject Property Gold001 Auto
|
|
||||||
|
|
||||||
;These are factions used by the function to make people mourn Kill event victims
|
|
||||||
faction property pWIMournAuntFaction auto
|
|
||||||
faction property pWIMournBoyfriendFaction auto
|
|
||||||
faction property pWIMournBrotherFaction auto
|
|
||||||
faction property pWIMournCousinFemaleFaction auto
|
|
||||||
faction property pWIMournCousinMaleFaction auto
|
|
||||||
faction property pWIMournDaughterFaction auto
|
|
||||||
faction property pWIMournFatherFaction auto
|
|
||||||
faction property pWIMournFriendFemaleFaction auto
|
|
||||||
faction property pWIMournFriendMaleFaction auto
|
|
||||||
faction property pWIMournGirlfriendFaction auto
|
|
||||||
faction property pWIMournHusbandFaction auto
|
|
||||||
faction property pWIMournKinsmanFaction auto
|
|
||||||
faction property pWIMournKinswomanFaction auto
|
|
||||||
faction property pWIMournMotherFaction auto
|
|
||||||
faction property pWIMournNephewFaction auto
|
|
||||||
faction property pWIMournNieceFaction auto
|
|
||||||
faction property pWIMournSisterFaction auto
|
|
||||||
faction property pWIMournSonFaction auto
|
|
||||||
faction property pWIMournUncleFaction auto
|
|
||||||
faction property pWIMournWifeFaction auto
|
|
||||||
|
|
||||||
Faction Property WIAssaultedFaction Auto
|
|
||||||
|
|
||||||
faction Property WIPlayerEnemyFaction Auto
|
|
||||||
|
|
||||||
;used for WIDragonKill scene when the player absorbs power - see MQKillDragonScript
|
|
||||||
Faction Property WIDragonKilledAbsorbedFaction Auto
|
|
||||||
GlobalVariable Property WINextDragon Auto
|
|
||||||
GlobalVariable Property WIWaitDragon Auto
|
|
||||||
|
|
||||||
;Note: this is a subset of all the AssociationTypes because this script only cares about these types.
|
|
||||||
associationType property pAuntUncle auto
|
|
||||||
associationType property pCourting auto
|
|
||||||
associationType property pCousins auto
|
|
||||||
associationType property pParentChild auto
|
|
||||||
associationType property pSiblings auto
|
|
||||||
associationType property pSpouse auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;WIDeadBodyCleanUpScript properties:
|
|
||||||
GlobalVariable Property GameDaysPassed Auto
|
|
||||||
faction property WINoBodyCleanupFaction auto
|
|
||||||
ObjectReference Property WIDeadBodyCleanupCellMarker Auto
|
|
||||||
|
|
||||||
;Keywords
|
|
||||||
Keyword Property WIGamesTagStart Auto
|
|
||||||
Keyword Property WIDragonKilledStart Auto
|
|
||||||
|
|
||||||
Keyword Property WIComplexInteractionToggle Auto ;used to control complex interactions, keyword data >= 0 complex interactions like dragon attacks are allowed, < 0 means not allowed to occur at this Location
|
|
||||||
Keyword Property WIDragonsToggle Auto
|
|
||||||
|
|
||||||
Keyword Property WIDragonAttacked Auto ;used by the DragonActorScript to set keyword data on locations that have been attacked so people can respond to that fact
|
|
||||||
|
|
||||||
Keyword Property WIRentRoomWalkToStart Auto
|
|
||||||
|
|
||||||
;Locations
|
|
||||||
|
|
||||||
Location Property SolitudeLocation Auto
|
|
||||||
Location Property MarkarthLocation Auto
|
|
||||||
Location Property WhiterunLocation Auto
|
|
||||||
Location Property WindhelmLocation Auto
|
|
||||||
Location Property RiftenLocation Auto
|
|
||||||
|
|
||||||
Location Property BattleBornFarmLocation Auto
|
|
||||||
Location Property ChillfurrowFarmLocation Auto
|
|
||||||
Location Property LeftHandMineLocation Auto
|
|
||||||
Location Property MerryfairFarmLocation Auto
|
|
||||||
Location Property SalviusFarmLocation Auto
|
|
||||||
Location Property SnowShodFarmLocation Auto
|
|
||||||
Location Property PelagiaFarmLocation Auto
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;Quests
|
|
||||||
Quest property WIGamesTag auto
|
|
||||||
Quest property MQ305 auto
|
|
||||||
|
|
||||||
|
|
||||||
Event OnInit()
|
|
||||||
|
|
||||||
; debug.trace(self + " OnInit() turning off dragon WI events in cities and settlements near them")
|
|
||||||
|
|
||||||
DisallowDragons(SolitudeLocation)
|
|
||||||
DisallowDragons(MarkarthLocation)
|
|
||||||
DisallowDragons(WhiterunLocation)
|
|
||||||
DisallowDragons(WindhelmLocation)
|
|
||||||
DisallowDragons(RiftenLocation)
|
|
||||||
|
|
||||||
DisallowDragons(BattleBornFarmLocation)
|
|
||||||
DisallowDragons(ChillfurrowFarmLocation)
|
|
||||||
DisallowDragons(LeftHandMineLocation)
|
|
||||||
DisallowDragons(MerryfairFarmLocation)
|
|
||||||
DisallowDragons(SalviusFarmLocation)
|
|
||||||
DisallowDragons(SnowShodFarmLocation)
|
|
||||||
DisallowDragons(PelagiaFarmLocation)
|
|
||||||
|
|
||||||
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function RemoveMournerActorFromFactions(Actor Mourner)
|
|
||||||
|
|
||||||
Mourner.RemoveFromFaction(pWIMournAuntFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournBoyfriendFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournBrotherFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournCousinFemaleFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournCousinMaleFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournDaughterFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournFatherFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournFriendFemaleFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournFriendMaleFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournGirlfriendFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournHusbandFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournKinsmanFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournKinswomanFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournMotherFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournNephewFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournNieceFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournSisterFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournSonFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournUncleFaction)
|
|
||||||
Mourner.RemoveFromFaction(pWIMournWifeFaction)
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function PutMournerAliasInFaction(ReferenceAlias VictimAlias, ReferenceAlias MournerAlias)
|
|
||||||
{Calls PutMournerActorInFaction passing VictimAlias and MournerAlias as actors. Based on the relationship of the Victim to Mourner, mourer is placed in a faction to get related dialogue.}
|
|
||||||
|
|
||||||
if MournerAlias.GetReference() == None
|
|
||||||
;bail out earlu
|
|
||||||
return
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
actor VictimActor = VictimAlias.GetReference() as Actor
|
|
||||||
actor MournerActor = MournerAlias.GetReference() as Actor
|
|
||||||
|
|
||||||
if VictimActor && MournerActor ;double check the cast before passing in as actor
|
|
||||||
PutMournerActorInFaction(VictimActor, MournerActor)
|
|
||||||
else
|
|
||||||
; debug.trace("WIFunctionsScript: PutMournerAliasInFaction expected ReferenceAliases that could be cast as actors, got some other kind of ReferenceAlias. Victim: " + VictimAlias.GetReference() +", Mourner: " + MournerAlias.GetReference() + ".")
|
|
||||||
endif
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function PutMournerActorInFaction(Actor Victim, Actor Mourner)
|
|
||||||
{Based on the relationship of the Victim to Mourner, mourer is placed in a faction to get related dialogue.}
|
|
||||||
string relation = GetRelationshipString(Victim, Mourner)
|
|
||||||
|
|
||||||
if relation == "aunt"
|
|
||||||
Mourner.AddToFaction(pWIMournAuntFaction)
|
|
||||||
elseif relation == "boyfriend"
|
|
||||||
Mourner.AddToFaction(pWIMournBoyfriendFaction)
|
|
||||||
elseif relation == "brother"
|
|
||||||
Mourner.AddToFaction(pWIMournBrotherFaction)
|
|
||||||
elseif relation == "cousin female"
|
|
||||||
Mourner.AddToFaction(pWIMournCousinFemaleFaction)
|
|
||||||
elseif relation == "cousin male"
|
|
||||||
Mourner.AddToFaction(pWIMournCousinMaleFaction)
|
|
||||||
elseif relation == "daughter"
|
|
||||||
Mourner.AddToFaction(pWIMournDaughterFaction)
|
|
||||||
elseif relation == "father"
|
|
||||||
Mourner.AddToFaction(pWIMournFatherFaction)
|
|
||||||
elseif relation == "friend female"
|
|
||||||
Mourner.AddToFaction(pWIMournFriendFemaleFaction)
|
|
||||||
elseif relation == "friend male"
|
|
||||||
Mourner.AddToFaction(pWIMournFriendMaleFaction)
|
|
||||||
elseif relation == "girlfriend"
|
|
||||||
Mourner.AddToFaction(pWIMournGirlfriendFaction)
|
|
||||||
elseif relation == "husband"
|
|
||||||
Mourner.AddToFaction(pWIMournHusbandFaction)
|
|
||||||
elseif relation == "kinsman"
|
|
||||||
Mourner.AddToFaction(pWIMournKinsmanFaction)
|
|
||||||
elseif relation == "kinswoman"
|
|
||||||
Mourner.AddToFaction(pWIMournKinswomanFaction)
|
|
||||||
elseif relation == "mother"
|
|
||||||
Mourner.AddToFaction(pWIMournMotherFaction)
|
|
||||||
elseif relation == "nephew"
|
|
||||||
Mourner.AddToFaction(pWIMournNephewFaction)
|
|
||||||
elseif relation == "niece"
|
|
||||||
Mourner.AddToFaction(pWIMournNieceFaction)
|
|
||||||
elseif relation == "sister"
|
|
||||||
Mourner.AddToFaction(pWIMournSisterFaction)
|
|
||||||
elseif relation == "son"
|
|
||||||
Mourner.AddToFaction(pWIMournSonFaction)
|
|
||||||
elseif relation == "uncle"
|
|
||||||
Mourner.AddToFaction(pWIMournUncleFaction)
|
|
||||||
elseif relation == "wife"
|
|
||||||
Mourner.AddToFaction(pWIMournWifeFaction)
|
|
||||||
else
|
|
||||||
; debug.trace("WIFunctionsScript PutMournerInFaction() returned unexpected relation variable: " + relation + " when Actor1 is " + Victim + " and Actor2 is " + Mourner + ".")
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
string function GetRelationshipString(Actor Actor1, Actor Actor2)
|
|
||||||
{Returns a string based on Actor1's relationship to Actor2 (ie if Actor1 is in Sibling relationship and a male, returns "brother") Note: Not all relationship types are supported by this function. See function comments for details.}
|
|
||||||
string sex ;"male" | "female" - CASE SENSITIVE description of Actor1
|
|
||||||
string position ;"parent" | "child" - CASE SENSITIVE description of Actor1 (ie if Actor1 is niece, then = "child", if Actor1 is aunt then = "parent")
|
|
||||||
string relation ;"kinsman", "father", "sister", "friend male", "boyfriend", etc. - CASE SENSTIVE description of Actor1
|
|
||||||
;Supported replationships:
|
|
||||||
;Friend:
|
|
||||||
; "friend male", "friend female"
|
|
||||||
;Family:
|
|
||||||
; "kinsman", "kinswoman"
|
|
||||||
; "husband", "wife"
|
|
||||||
; "father", "mother"
|
|
||||||
; "son", "daughter"
|
|
||||||
; "brother", "sister"
|
|
||||||
; "uncle", "aunt"
|
|
||||||
; "nephew", "niece"
|
|
||||||
; "cousin male", "cousin female"
|
|
||||||
;Boyfriend/Girlfriend:
|
|
||||||
; "boyfriend", "girlfriend"
|
|
||||||
|
|
||||||
;sex
|
|
||||||
if Actor1.getActorBase().getSex() == 0 ;male
|
|
||||||
sex = "male"
|
|
||||||
else ;female
|
|
||||||
sex = "female"
|
|
||||||
endif
|
|
||||||
|
|
||||||
;parent/child
|
|
||||||
if Actor1.hasParentRelationship(Actor2) ;We have set up data, so someone is never both a parent and a child in different relationshps to the same person
|
|
||||||
position = "parent"
|
|
||||||
else ;child
|
|
||||||
position = "child"
|
|
||||||
endif
|
|
||||||
|
|
||||||
;friend male/friend female
|
|
||||||
;we set the relation to be friend if there's any family relation at all. This will get "overwritten" if we discover a more specific relationship
|
|
||||||
if Actor1.GetRelationshipRank(Actor2) >= 1
|
|
||||||
if sex == "male"
|
|
||||||
relation = "friend male"
|
|
||||||
else ;female
|
|
||||||
relation = "friend female"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;kinsman/kinswoman
|
|
||||||
;we set the relation to be kinsmen if there's any family relation at all. This will get "overwritten" if we discover a more specific relationship
|
|
||||||
if Actor1.hasFamilyRelationship(Actor2)
|
|
||||||
if sex == "male"
|
|
||||||
relation = "kinsman"
|
|
||||||
else ;female
|
|
||||||
relation = "kinswoman"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;husband/wife
|
|
||||||
if Actor1.hasAssociation(pSpouse, Actor2)
|
|
||||||
if sex == "male"
|
|
||||||
relation = "husband"
|
|
||||||
else ;female
|
|
||||||
relation = "wife"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;father/mother
|
|
||||||
if Actor1.hasAssociation(pParentChild, Actor2)
|
|
||||||
if position == "parent"
|
|
||||||
if sex == "male"
|
|
||||||
relation = "father"
|
|
||||||
else ;female
|
|
||||||
relation = "mother"
|
|
||||||
endif
|
|
||||||
|
|
||||||
else ;child
|
|
||||||
if sex == "male"
|
|
||||||
relation = "son"
|
|
||||||
else ;female
|
|
||||||
relation = "daughter"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;brother/sister
|
|
||||||
if Actor1.hasAssociation(pSiblings, Actor2)
|
|
||||||
if sex == "male"
|
|
||||||
relation = "brother"
|
|
||||||
else ;female
|
|
||||||
relation = "sister"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;uncle/aunt
|
|
||||||
if Actor1.hasAssociation(pAuntUncle, Actor2)
|
|
||||||
if position == "parent"
|
|
||||||
if sex == "male"
|
|
||||||
relation = "uncle"
|
|
||||||
else ;female
|
|
||||||
relation = "aunt"
|
|
||||||
endif
|
|
||||||
|
|
||||||
else ;child
|
|
||||||
if sex == "male"
|
|
||||||
relation = "nephew"
|
|
||||||
else ;female
|
|
||||||
relation = "niece"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;cousin male/cousin female
|
|
||||||
if Actor1.hasAssociation(pCousins, Actor2)
|
|
||||||
if sex == "male"
|
|
||||||
relation = "cousin male"
|
|
||||||
else ;female
|
|
||||||
relation = "cousin female"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
;boyfriend/girlfriend
|
|
||||||
if Actor1.hasAssociation(pCourting, Actor2)
|
|
||||||
if sex == "male"
|
|
||||||
relation = "boyfriend"
|
|
||||||
else ;female
|
|
||||||
relation = "girlfriend"
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
return relation
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function StartGameTag(ObjectReference FirstPlayer, ObjectReference SecondPlayer, int SecondsToPlay, form CallingFormSelf)
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions StartGameTag(" + FirstPlayer + ", " + SecondPlayer + ", " + SecondsToPlay + ", " + CallingFormSelf + ")")
|
|
||||||
|
|
||||||
WIGamesTag.Stop()
|
|
||||||
|
|
||||||
int bailOutTime = 30 ;wait at most 30 seconds so you don't hold up whatever script is calling this function
|
|
||||||
int waitingFor = 0
|
|
||||||
|
|
||||||
bool timeToBailOut = False
|
|
||||||
|
|
||||||
while WIGamesTag.IsRunning() && timeToBailOut == false
|
|
||||||
utility.wait(1)
|
|
||||||
waitingFor += 1
|
|
||||||
; debug.trace("WIFunctions StartGameTag() waiting for previous WIGamesTag quest to finish stopping. Have been waiting for " + waitingFor + "seconds.")
|
|
||||||
|
|
||||||
if waitingFor >= bailOutTime
|
|
||||||
timeToBailOut = True
|
|
||||||
; debug.trace("WIFunctions StartGameTag() have been waiting to long, bailing out. This means this game of tag will not start.", 1)
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndWhile
|
|
||||||
|
|
||||||
WIGamesTagStart.SendStoryEvent(akRef1 = FirstPlayer, akRef2 = SecondPlayer, aiValue1 = SecondsToPlay)
|
|
||||||
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
function updateWIDragonTimer()
|
|
||||||
; update timer for when next WI dragon is allowed to appear
|
|
||||||
WINextDragon.SetValue(GameDaysPassed.GetValue() + WIWaitDragon.GetValue())
|
|
||||||
|
|
||||||
if MQ305.IsCompleted()
|
|
||||||
WINextDragon.SetValue(WINextDragon.GetValue() + 3 )
|
|
||||||
endif
|
|
||||||
endFunction
|
|
||||||
|
|
||||||
function startWIDragonKillQuest(Actor Dragon)
|
|
||||||
; debug.trace("WIFunctions startWIDragonKillQuest(" + Dragon + ")")
|
|
||||||
WIDragonKilledStart.SendStoryEvent(akRef1 = Dragon)
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
function PlayerIsCurrentlyAbsorbingPower(Actor Dragon)
|
|
||||||
; debug.trace("WIFunctions PlayerIsCurrentlyAbsorbingPower(" + Dragon + ") calling SetFactionRank(WIDragonKilledAbsorbedFaction, 0)")
|
|
||||||
Dragon.SetFactionRank(WIDragonKilledAbsorbedFaction, 1) ;means "player is currently absorbing - used to conditionalize scene dialogue in WIDragonKilled quest
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
function PlayerIsDoneAbsorbingPower(Actor Dragon)
|
|
||||||
; debug.trace("WIFunctions PlayerIsDoneAbsorbingPower(" + Dragon + ") calling SetFactionRank(WIDragonKilledAbsorbedFaction, 1)")
|
|
||||||
Dragon.SetFactionRank(WIDragonKilledAbsorbedFaction, 2) ;means "player is done absorbing - used to conditionalize scene dialogue in WIDragonKilled quest
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
function DisallowComplexInteractions(Location LocationToToggle)
|
|
||||||
{Decrements the keyword data on WIComplexInteractionToggle}
|
|
||||||
|
|
||||||
if LocationToToggle.HasKeyword(WIComplexInteractionToggle)
|
|
||||||
Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) - 1
|
|
||||||
|
|
||||||
LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData)
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions DisallowComplexInteractions(" + LocationToToggle + ") decremented keyword data WIComplexInteractionOffToggle to: " + keywordData)
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
; debug.trace(" WARNING: WIFunctions DisallowComplexInteractions(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2)
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
function DisallowDragons(Location LocationToToggle)
|
|
||||||
{Decrements the keyword data on WIComplexInteractionToggle}
|
|
||||||
|
|
||||||
if LocationToToggle.HasKeyword(WIDragonsToggle)
|
|
||||||
Float keywordData = LocationToToggle.GetKeywordData(WIDragonsToggle) - 1
|
|
||||||
|
|
||||||
LocationToToggle.SetKeywordData(WIDragonsToggle, keywordData)
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions DisallowDragons(" + LocationToToggle + ") decremented keyword data WIDragonsToggle to: " + keywordData)
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
; debug.trace(" WARNING: WIFunctions DisallowDragons(" + LocationToToggle + ") -- keyword WIDragonsToggle does not exist on location.", 2)
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
function AllowComplexInteractions(Location LocationToToggle)
|
|
||||||
{Increments the keyword data on WIComplexInteractionToggle}
|
|
||||||
|
|
||||||
if LocationToToggle.HasKeyword(WIComplexInteractionToggle)
|
|
||||||
Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) + 1
|
|
||||||
|
|
||||||
LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData)
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions AllowComplexInteractions(" + LocationToToggle + ") incremented keyword data WIComplexInteractionOffToggle to: " + keywordData)
|
|
||||||
|
|
||||||
Else
|
|
||||||
; debug.trace(" WARNING: WIFunctions AllowComplexInteractions(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2)
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
function AllowDragons(Location LocationToToggle)
|
|
||||||
{Increments the keyword data on WIComplexInteractionToggle}
|
|
||||||
|
|
||||||
if LocationToToggle.HasKeyword(WIComplexInteractionToggle)
|
|
||||||
Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) + 1
|
|
||||||
|
|
||||||
LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData)
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions AllowDragons(" + LocationToToggle + ") incremented keyword data WIComplexInteractionOffToggle to: " + keywordData)
|
|
||||||
|
|
||||||
Else
|
|
||||||
; debug.trace(" WARNING: WIFunctions AllowDragons(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2)
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
function ShowPlayerRoom(Actor Innkeeper, ObjectReference Bed)
|
|
||||||
; debug.trace("WIFunctions ShowPlayerRoom(" + Innkeeper + ")")
|
|
||||||
|
|
||||||
WIRentRoomWalkToStart.SendStoryEvent(akRef1 = Innkeeper, akRef2 = Bed)
|
|
||||||
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
||||||
|
|
||||||
bool function RegisterDragonAttack(Location LocationOfDragonAttack, Actor Dragon)
|
|
||||||
|
|
||||||
;CALLED BY: DragonActorScript, DragonPerchScript, quest fragment scripts attached to WIDragonKilled, WIChangeLocation09
|
|
||||||
|
|
||||||
; debug.trace("WIFunctions RegisterDragonAttack(" + LocationOfDragonAttack + "," + Dragon + ")")
|
|
||||||
|
|
||||||
; debug.MessageBox("WIFunctions RegisterDragonAttack(" + LocationOfDragonAttack + "," + Dragon + ")")
|
|
||||||
|
|
||||||
bool returnVar
|
|
||||||
|
|
||||||
if LocationOfDragonAttack.HasKeyword(WIDragonAttacked)
|
|
||||||
; debug.trace("WIFunctions RegisterDragonAttack() Location has WIDragonAttacked keyword, setting data.")
|
|
||||||
|
|
||||||
LocationOfDragonAttack.SetKeywordData(WIDragonAttacked, 1)
|
|
||||||
returnVar = True
|
|
||||||
|
|
||||||
Else
|
|
||||||
; debug.trace("WIFunctions RegisterDragonAttack() Location does NOT have WIDragonAttacked keyword, so we are NOT setting data.")
|
|
||||||
|
|
||||||
returnVar = False
|
|
||||||
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
return returnVar
|
|
||||||
|
|
||||||
EndFunction
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user