From f5d2b63c194432975f3711c762ffc4f1c7bd59db Mon Sep 17 00:00:00 2001 From: absol89 Date: Sat, 24 Aug 2024 17:40:21 +0200 Subject: [PATCH] Updated Vilkas script to be more compatible with magic effects in combat mods When a magic or explosion hit is registered it adds to the trainer counter instead of resetting the quest stage, doesn't matter which player or character hits Vilkas now. --- GameFiles/Skyrim/scripts/C00TrainerScript.pex | Bin 1852 -> 1441 bytes .../scripts/source/C00TrainerScript.psc | 32 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/GameFiles/Skyrim/scripts/C00TrainerScript.pex b/GameFiles/Skyrim/scripts/C00TrainerScript.pex index a89d363b46548033a289e5e49403b03fe174149b..3bfc6e5d9f4a0ce24ec1ea73be584ec7fa774a5c 100644 GIT binary patch literal 1441 zcmZuw*>V#{6g_Q?HZL+UW;2@r6JjiZSwbp)vs`Rd2?mQwp2wprX(G8>%(TkILw+OQ zlh^!09`XlN-t&~xJu{XJbZchL-Os(<`tR32|0yj%fvf-5znfTZe`TTUm011EhNn2U zzq9i`31cluH%j7(Wun?kv0WQlLH(t%CWC7S`sZ*EN6-6xiR|8FGX99w1N~fENjhVZ zo|#%S3ba3zXq2LSpkKun^+QR;5~Wy*jPAuYHaZ-mGK_mY(P$h>UlP%g?2Y3vMO9Ca zy?5!gwg}!BEm#UidxJqDX=)M{KKhL;PQy?OM_n^bB0=!NB*$0|M{g73eB!ZSaSpG9 zM{muEBzx9|(Fj4um@%mAYGH*;xf~vK!gM&3NTxG3(MWoz?(SMSo;)qU_XT){@`tIU zwvc~7gL6DM(Xk%9^M)XmaUZp=pYA|V>Dq)w+#b3>4D|2ZTC1;~OCCJf|V9Nz5_xe2_ZHevfQ07v2#5re^ERpQvxk-}UChgQdnbZCc DGuipb literal 1852 zcmZWo+jiPU6y0OMfQ@ltlhjR{gfwZL_>$sl47KBcQII zgUCh3xr_oIi?2^x-@R*|Z@%8Het%YNqK;c`rJ`g1$oex-?o8^IcCyFD3E^P+Na`72o{>wu~(M+5149Z$B)k)L5(?tpsc*U?%~)NOzqpa~GsO_nr4lHt+Q7-EJtOh!L2m6%0dHBK;-^uTXIM z=V4&z@qCH7DZJoZo(I=5tZVJKeNb&F$xyLca4s88)SGC$0S!NJ`?8&sQbmST`#y5< zW!S19FMl8SLBuhQjay^1Jw|(Dv@=G#$-m}rWO?faX3W3HfK&p~;8r3z7%}@9vn*IR z3zTqsBuiMr9V>TnQ&wQa9Al~#Jfu9Ld_j3aSslw$JjFB0I%R{hX~i65YJq(gnHQKd zm`~~$^D*KoP_RWM%#(gBWO$fXk5pO3zb(xMMQ;K2ip$Rn~gtQ55$UkFh{s$`hE$jdQ diff --git a/GameFiles/Skyrim/scripts/source/C00TrainerScript.psc b/GameFiles/Skyrim/scripts/source/C00TrainerScript.psc index a52afdab1..5cc9b8e66 100644 --- a/GameFiles/Skyrim/scripts/source/C00TrainerScript.psc +++ b/GameFiles/Skyrim/scripts/source/C00TrainerScript.psc @@ -4,9 +4,9 @@ int numHits = 0 Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) ; Debug.Trace("C00: Vilkas hit by magic.") - if (Game.GetPlayer() == akCaster) - GetOwningQuest().SetStage(100) - endif +; if (Game.GetPlayer() == akCaster) +; GetOwningQuest().SetStage(100) +; endif EndEvent Event OnEnterBleedout() @@ -24,30 +24,30 @@ Function BleedoutChecks() GetOwningQuest().SetStage(125) endif EndFunction - +; Change for SkyrimTogetherReborn 1.6.7+animation is to allow more mods by not magic checking the hit which can have combat or perk overhaul hidden effects Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) ; Debug.Trace("C00: Vilkas was hit.") ; Debug.Trace("C00: Vilkas hit datums -- " + akAggressor + " " + akSource + " " + akProjectile + " " + abPowerAttack + " " + abSneakAttack + " " + abBashAttack + " " + abHitBlocked) - if (akSource as Spell) +; if (akSource as Spell) ; Debug.Trace("C00: Vilkas hit by spell; bailing out and handling it in the magic effect handler.") - return - elseif (akSource as Explosion) +; return +; elseif (akSource as Explosion) ; Debug.Trace("C00: Vilkas hit by explosion; bailing out and handling it in the other handlers.") - return - endif -; if (Game.GetPlayer() == akAggressor) ; The original script didn't account for remote STR bystanders not hitting - if ((akSource as Spell) != None) - GetOwningQuest().SetStage(100) - return - endif +; return +; endif +; if (Game.GetPlayer() == akAggressor) +; if ((akSource as Spell) != None) +; GetOwningQuest().SetStage(100) +; return +; endif numHits += 1 if (numHits >= 3) GetOwningQuest().SetStage(150) endif -; else; Removing this part lets STR remote or pacifist players get the same quest stage and stopcombat at 3 hits +; else ; ; someone else hit him, stop the quest and have him berate you ; GetOwningQuest().SetStage(110) -; endif; No STR methods needed to reach stopcombat solution suggested in tiltedphoques/TiltedEvolution/issues/598 +; endif EndEvent Function ResetHits()