; script that controls the apparation stats calculation and initialization. Additionally, it is responsible for the control of the apparation communication while it is summoned
; we prefer to place new actors instead of using only one actor
; due to the problem of keeping track of all apparations,
; which might create memory leaks because of persistence;
; Additionally, temporary or accidental changes do not cumulate
int Property fArcaneFeverModWarrior = -1 AutoReadOnly Hidden
int Property fArcaneFeverModRanger = 0 AutoReadOnly Hidden
int Property fArcaneFeverModHybrid = 0 AutoReadOnly Hidden
int Property fArcaneFeverModMage = 1 AutoReadOnly Hidden
int Property ghostlyMageBoostDestructionPowerMod1 = 7 AutoReadOnly Hidden
int Property ghostlyMageBoostDestructionPowerMod2 = 15 AutoReadOnly Hidden
int Property ghostlyMageBoostDestructionPowerMod3 = 25 AutoReadOnly Hidden
int Property ghostlyMageBoostMagicka1 = 15 AutoReadOnly Hidden
int Property ghostlyMageBoostMagicka2 = 40 AutoReadOnly Hidden
int Property ghostlyMageBoostMagicka3 = 75 AutoReadOnly Hidden
int Property ghostlyRangerBoostArchery1 = 7 AutoReadOnly Hidden
int Property ghostlyRangerBoostArchery2 = 17 AutoReadOnly Hidden
int Property ghostlyRangerBoostArchery3 = 30 AutoReadOnly Hidden
int Property ghostlyRangerBoostCritChance1 = 7 AutoReadOnly Hidden
int Property ghostlyRangerBoostCritChance2 = 15 AutoReadOnly Hidden
int Property ghostlyRangerBoostCritChance3 = 25 AutoReadOnly Hidden
int Property ghostlyWarriorBoostMelee1 = 7 AutoReadOnly Hidden
int Property ghostlyWarriorBoostMelee2 = 17 AutoReadOnly Hidden
int Property ghostlyWarriorBoostMelee3 = 30 AutoReadOnly Hidden
int Property ghostlyWarriorBoostArmorSkill1 = 7 AutoReadOnly Hidden
int Property ghostlyWarriorBoostArmorSkill2 = 17 AutoReadOnly Hidden
int Property ghostlyWarriorBoostArmorSkill3 = 30 AutoReadOnly Hidden
int Property iCallApparitionKeyCode = 34 Auto Hidden
Explosion Property enterWorldExplosion auto
Perk Property _00E_Class_Phasmalist_P04_Talent_SummonApparation auto
Perk Property _00E_Class_Phasmalist_P04_Talent_SummonApparation2 auto
Perk Property _00E_Class_Phasmalist_P04_Talent_SummonApparation3 auto
Static Property XMarker Auto
Perk Property _00E_Class_Phasmalist_P08a auto
Perk[] Property _00E_Class_Phasmalist_P05a_ABC auto ; ghostly mage
{ghostly mage perks, this array should have 3 elements for all 3 perks}
Perk[] Property _00E_Class_Phasmalist_P05b_ABC auto ; ghostly ranger
{ghostly ranger perks, this array should have 3 elements for all 3 perks}
Perk[] Property _00E_Class_Phasmalist_P05c_ABC auto ; ghostly warrior
{ghostly warrior perks, this array should have 3 elements for all 3 perks}
Location Property _00E_Dreamworld_Location auto
Keyword Property _00E_Phasmalist_NoSummonLocation auto
Message Property _00E_Phasmalist_NoSummoningMessage auto
Keyword Property _00E_Phasmalist_NoSummonLocationTown auto
Message Property _00E_Phasmalist_CurrentlyEquipped auto
Message Property _00E_Phasmalist_NoSummoningMessageTown auto
Sound Property MAGAlterationInvisibilityIn Auto
Sound Property MAGAlterationInvisibilityOut Auto
Perk Property _00E_Class_Phasmalist_P08b auto ; apparations can exist in towns
EffectShader Property _00E_Phasmalist_ApparitionShaderFXS Auto
ImageSpaceModifier Property _00E_ArkanistenfieberIMOD Auto
ImageSpaceModifier Property _00E_Phasmalist_ApparitionEnterWorldIMOD Auto
Sound Property _00E_FS_IncreaseArcaneFeverM Auto
;Sound Property _00E_FS_Phasmalist_EnterWorld_Male Auto
;Sound Property _00E_FS_Phasmalist_EnterWorld_Female Auto
Message Property _00E_BlitzheilungArkanistenfieber_sFeverIncreased Auto
GlobalVariable Property _00E_Phasmalist_IsApparationSummoned Auto
Keyword Property _00E_FS_Magic_Summon auto ; the apparation should not be able to learn certain spells
Keyword Property _00E_FS_Magic_Mystical auto
int currentBoostMagicka ; this is set in adjustBoost() to have the attribute set correctly in the stats calculation
_00E_Phasmalist_TrinketSC equippedTrinket
Actor Property PlayerREF Auto
Formlist Property _00E_AllAmmos Auto
; for a description, look to the function failsaveRefillOnLoad() of this script
Actor failsave_content
; functions that are called from the trinkets to keep track of the currently equipped trinket --------------------------------------------------------------------------------------------
function onTrinketEquipped(_00E_Phasmalist_TrinketSC trinket)
equippedTrinket = trinket
Endfunction
function onTrinketUnequipped(_00E_Phasmalist_TrinketSC trinket)
unsummonIfExists()
If trinket == equippedTrinket
equippedTrinket = None
EndIf
Endfunction
_00E_Phasmalist_TrinketSC function getEquippedTrinket()
return equippedTrinket
Endfunction
; summon and unsummon ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function unsummon(bool silent = false)
{Unsummons the phasmalist apparation content of this alias; should be used instead of delete()}
Actor SelfREF = self.GetActorReference()
If (!silent)
SelfREF.placeAtMe(enterWorldExplosion)
addArcaneFever()
EndIf
; empty function?
;(SelfREF.getActorBase() as _00E_Phasmalist_ApparationSC).onUnsummon(SelfREF)
SelfREF.removeAllItems((SelfREF.GetActorBase() as _00E_Phasmalist_ApparationSC).inventoryContainer, false, true)
; local helper functions ---------------------------------------------------------------------------------------------------------------------------------------------------------------
currentBoostMagicka = ghostlyMageBoostMagicka2; since magicka is boosted later again, we have to save this boost and apply it later to prevent overwriting old boosts