@ -79,8 +79,6 @@ ImageSpaceModifier Property _00E_Phasmalist_ApparitionEnterWorldIMOD Auto
Sound Property _00E_FS_IncreaseArcaneFeverM Auto
_00E_FS_ForgottenStories_Functions Property ForgottenStoriesMiscDialogue Auto
Message Property _00E_Player_sArcaneFeverIncreased Auto
GlobalVariable Property _00E_Phasmalist_IsApparitionSummoned Auto
@ -137,7 +135,7 @@ Function Summon(_00E_Phasmalist_TrinketSC trinket, ObjectReference moveToRef, Bo
akSelf.BlockActivation()
If bPhasmalismTankMode
akSelf.SetAV("Variable01", 1.0)
akSelf.SetActor Value ("Variable01", 1.0)
akSelf.EnableAI(False)
Else
If moveToRef == PlayerREF
@ -177,7 +175,7 @@ Function Setup()
SetupBehaviour(akSelf)
SetupNotPersistentStats(akSelf)
Float fAttributeMult = (fPlayerConjSkillMult * PlayerREF.GetAV("Conjuration") + fPlayerEnchSkillMult * PlayerREF.GetAV("Enchanting")) / 100.0 + 1.0
Float fAttributeMult = (fPlayerConjSkillMult * PlayerREF.GetActor Value ("Conjuration") + fPlayerEnchSkillMult * PlayerREF.GetActor Value ("Enchanting")) / 100.0 + 1.0
ApplyClassBoost(akSelf, BOOST_CLASS_MAGE, _00E_Class_Phasmalist_P05_A_Shamanism_01, _00E_Class_Phasmalist_P05_A_Shamanism_02, _00E_Class_Phasmalist_P05_A_Shamanism_03)
ApplyClassBoost(akSelf, BOOST_CLASS_RANGER, _00E_Class_Phasmalist_P05_B_Mischief_01, _00E_Class_Phasmalist_P05_B_Mischief_02, _00E_Class_Phasmalist_P05_B_Mischief_03)
@ -193,14 +191,14 @@ Function Setup()
If fPlayerStamina > fMaxAttributeValue
fMaxAttributeValue = fPlayerStamina
EndIf
akSelf.ForceAV("Health", ((akSelf.GetBaseAV("Health") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceAV("Magicka", (((akSelf.GetBaseAV("Magicka") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int) + iCurrentBoostMagicka)
akSelf.ForceAV("Stamina", ((akSelf.GetBaseAV("Stamina") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceActor Value ("Health", ((akSelf.GetBaseAV("Health") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceActor Value ("Magicka", (((akSelf.GetBaseAV("Magicka") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int) + iCurrentBoostMagicka)
akSelf.ForceActor Value ("Stamina", ((akSelf.GetBaseAV("Stamina") + fMaxAttributeValue * fPlayerStatsMult) * fAttributeMult) as int)
Else
akSelf.ForceAV("Health", ((akSelf.GetBaseAV("Health") + PlayerREF.GetBaseAV("Health") * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceAV("Magicka", (((akSelf.GetBaseAV("Magicka") + PlayerREF.GetBaseAV("Magicka") * fPlayerStatsMult) * fAttributeMult) as int) + iCurrentBoostMagicka)
akSelf.ForceAV("Stamina", ((akSelf.GetBaseAV("Stamina") + PlayerREF.GetBaseAV("Stamina") * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceActor Value ("Health", ((akSelf.GetBaseAV("Health") + PlayerREF.GetBaseAV("Health") * fPlayerStatsMult) * fAttributeMult) as int)
akSelf.ForceActor Value ("Magicka", (((akSelf.GetBaseAV("Magicka") + PlayerREF.GetBaseAV("Magicka") * fPlayerStatsMult) * fAttributeMult) as int) + iCurrentBoostMagicka)
akSelf.ForceActor Value ("Stamina", ((akSelf.GetBaseAV("Stamina") + PlayerREF.GetBaseAV("Stamina") * fPlayerStatsMult) * fAttributeMult) as int)
EndIf
EndFunction
@ -211,10 +209,10 @@ Function SetupBehaviour(Actor akSelf)
EndIf
akSelf.SetPlayerTeammate()
akSelf.SetAV("Confidence", 4) ; the apparition should never flee
akSelf.SetAV("Aggression", 0) ; the apparition should not initiate combat (-> stealth playstyle)
akSelf.SetAV("Sneak", 100)
akSelf.SetAV("Invisibility", 1) ; make the apparition undetectable when sneaking (-> stealth playstyle)
akSelf.SetActor Value ("Confidence", 4) ; the apparition should never flee
akSelf.SetActor Value ("Aggression", 0) ; the apparition should not initiate combat (-> stealth playstyle)
akSelf.SetActor Value ("Sneak", 100)
akSelf.SetActor Value ("Invisibility", 1) ; make the apparition undetectable when sneaking (-> stealth playstyle)
akSelf.IgnoreFriendlyHits() ; make the apparition ignore friendly fire from the PC
EndFunction
@ -222,19 +220,19 @@ Function SetupNotPersistentStats(Actor akSelf)
akSelf.GetActorBase().SetCombatStyle(SummonTrinket.GetUsedCombatStyle())
If bTeleportHealRate == False
akSelf.SetAV("HealRate", DEFAULT_HEAL_RATE)
akSelf.SetActor Value ("HealRate", DEFAULT_HEAL_RATE)
Else
akSelf.SetAV("HealRate", 0.0)
akSelf.SetActor Value ("HealRate", 0.0)
EndIf
akSelf.SetAV("MagickaRate", fApparitionManaRate)
akSelf.SetActor Value ("MagickaRate", fApparitionManaRate)
;failsafe since setav doesn't work sometimes
If bTeleportHealRate == False
akSelf.ForceAV("HealRate", DEFAULT_HEAL_RATE)
akSelf.ForceActor Value ("HealRate", DEFAULT_HEAL_RATE)
Else
akSelf.ForceAV("HealRate", 0.0)
akSelf.ForceActor Value ("HealRate", 0.0)
EndIf
akSelf.ForceAV("MagickaRate", fApparitionManaRate)
akSelf.ForceActor Value ("MagickaRate", fApparitionManaRate)
EndFunction
Function ApplyClassBoost(Actor akSelf, Int iBoostClass, Perk boostPerk1, Perk boostPerk2, Perk boostPerk3)
@ -262,8 +260,8 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel)
iDestructionPowerMod = iGhostlyMageBoostDestructionPowerMod1
iCurrentBoostMagicka = iGhostlyMageBoostMagicka1
EndIf
;akSelf.ForceAV("DestructionPowerMod", akSelf.GetAV("DestructionPowerMod") + iDestructionPowerMod)
akSelf.ModAV("DestructionPowerMod", iDestructionPowerMod)
;akSelf.ForceActor Value ("DestructionPowerMod", akSelf.GetActor Value ("DestructionPowerMod") + iDestructionPowerMod)
akSelf.ModActor Value ("DestructionPowerMod", iDestructionPowerMod)
ElseIf iBoostClass == BOOST_CLASS_RANGER
Int iBoostArchery = 0
Int iBoostCritChance = 0
@ -278,10 +276,10 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel)
iBoostCritChance = iGhostlyRangerBoostCritChance1
EndIf
;akSelf.ForceAV("Marksman", akSelf.GetAV("Marksman") + iBoostArchery)
akSelf.ModAV("Marksman", iBoostArchery)
;akSelf.ForceAV("CritChance", akSelf.GetAV("CritChance") + iBoostCritChance)
akSelf.ModAV("CritChance", iBoostCritChance)
;akSelf.ForceActor Value ("Marksman", akSelf.GetActor Value ("Marksman") + iBoostArchery)
akSelf.ModActor Value ("Marksman", iBoostArchery)
;akSelf.ForceActor Value ("CritChance", akSelf.GetActor Value ("CritChance") + iBoostCritChance)
akSelf.ModActor Value ("CritChance", iBoostCritChance)
ElseIf iBoostClass == BOOST_CLASS_WARRIOR
Int iBoostMelee = 0
Int iBoostArmor = 0
@ -296,15 +294,15 @@ Function _AddClassBoost(Actor akSelf, Int iBoostClass, Int iBoostLevel)
iBoostArmor = iGhostlyWarriorBoostArmorSkill1
EndIf
;akSelf.ForceAV("HeavyArmor", akSelf.GetAV("HeavyArmor") + iBoostArmor)
akSelf.ModAV("HeavyArmor", iBoostArmor)
;akSelf.ForceAV("LightArmor", akSelf.GetAV("LightArmor") + iBoostArmor)
akSelf.ModAV("LightArmor", iBoostArmor)
;akSelf.ForceActor Value ("HeavyArmor", akSelf.GetActor Value ("HeavyArmor") + iBoostArmor)
akSelf.ModActor Value ("HeavyArmor", iBoostArmor)
;akSelf.ForceActor Value ("LightArmor", akSelf.GetActor Value ("LightArmor") + iBoostArmor)
akSelf.ModActor Value ("LightArmor", iBoostArmor)
; MeleeDamage AV seems to be not working, it's actually always zero
;akSelf.ForceAV("MeleeDamage", akSelf.GetAV("MeleeDamage") + iBoostMelee)
;akSelf.ModAV("MeleeDamage", iBoostMelee)
akSelf.ModAV("OneHanded", iBoostMelee)
akSelf.ModAV("TwoHanded", iBoostMelee)
;akSelf.ForceActor Value ("MeleeDamage", akSelf.GetActor Value ("MeleeDamage") + iBoostMelee)
;akSelf.ModActor Value ("MeleeDamage", iBoostMelee)
akSelf.ModActor Value ("OneHanded", iBoostMelee)
akSelf.ModActor Value ("TwoHanded", iBoostMelee)
Else
Debug.Notification("Phasmalist Control Quest has issues: Unsupported boost class " + iBoostClass)
EndIf
@ -318,6 +316,8 @@ Endfunction
Function Unsummon(Bool bSilent)
Actor akSelf = self.GetActorReference()
HealthBarManager.Hide(akSelf)
GoToState("")
AliasFailsafeRef = None
@ -334,11 +334,13 @@ Function Unsummon(Bool bSilent)
akSelf.RemoveAllItems((akSelf.GetActorBase() as _00E_Phasmalist_ApparationSC).inventoryContainer, False, True)
akSelf.Disable()
Self.Clear()
ForgottenStoriesMiscDialogue.hideActorHealthBars(akSelf)
SummonTrinket = None
akSelf.Delete()
Utility.wait(1.0)
akSelf.Delete()
SendModEvent("Phasmalist_ApparationUnSummon")
EndFunction
Function AddArcaneFever()
@ -377,10 +379,10 @@ Function AddArcaneFever()
Float fArcaneFeverAdd = fMaxArcaneFeverAdd * fHealthLostPercentage
If fArcaneFeverAdd > 0
PlayerREF.ModAV("LastFlattered", -fArcaneFeverAdd)
PlayerREF.ModActor Value ("LastFlattered", -fArcaneFeverAdd)
_00E_ArkanistenfieberIMOD.ApplyCrossFade()
_00E_FS_IncreaseArcaneFeverM.Play(PlayerREF)
_00E_Player_sArcaneFeverIncreased.Show(fArcaneFeverAdd, -1 * PlayerREF.GetAV("LastFlattered"))
_00E_Player_sArcaneFeverIncreased.Show(fArcaneFeverAdd, -1 * PlayerREF.GetActor Value ("LastFlattered"))
EndIf
EndFunction
@ -409,7 +411,7 @@ Function TeleportToPlayer(Bool bTeleportInFront, Bool bSilent)
; Zero out-of-combat heal rate for teleport and a few seconds after it.
; This is to prevent the apparition regenerating health IN combat on "Call Apparition" spam.
UnregisterForUpdate()
akSelf.ForceAV("HealRate", 0.0)
akSelf.ForceActor Value ("HealRate", 0.0)
bTeleportHealRate = True
akSelf.Disable()
@ -634,7 +636,7 @@ EndFunction
Function _ShowHealthBar()
Actor akSelf = Self.GetActorReference()
If akSelf && akSelf.IsDead() == False
ForgottenStoriesMiscDialogue.showActorHealthBars (akSelf)
HealthBarManager.Show (akSelf)
EndIf
EndFunction
@ -777,7 +779,7 @@ State Working
Event OnUpdate()
If bTeleportHealRate
bTeleportHealRate = False
GetActorReference().ForceAV("HealRate", DEFAULT_HEAL_RATE)
GetActorReference().ForceActor Value ("HealRate", DEFAULT_HEAL_RATE)
EndIf
EndEvent