VRNord Posted February 21, 2021 Share Posted February 21, 2021 (edited) First of all, very new to scripting! I am trying to modify the Strange Runes mod so the effects also show up on NPC hands when they draw weapons that have the corresponding magic effects attached as enchantments. I found a post from somebody saying that GetEquippedSpell works to return the MGEF attached to Object Effects on equipped weapons as well as Spells - hopefully that is true! So this is the function I have found in the Strange Runes PO3_runedetectnpccasting script, that I think might accomplish my goal: If asEventName == "BeginCastRight" ; casting right RightSpell = Caster.GetEquippedSpell(1) If CanCastSpellType(RightSpell) RightSpellType = GetTypeOfRune(RightSpell) ;destruction ;(1-7)If RightSpellType == 1RightFXSpell = AssignMagicCircle(RightSpell, po3_RUNE_FireRightFX, po3_RUNE_FireConcRightFX ) ...etc (quite long)_____________________________________________________________________________________Where RightSpellType == 1 has already been defined: If effect.GetAssociatedSkill() == "Destruction" ;(1-7);destructionIf effect.HasKeyword(MagicDamageFire) || effect.GetLight() == MagicLightFireInHand;firereturn 1_____________________________________________________________________________________________...and in this example the vanilla fire enchantment MGEF also has that keyword. So my thought was to duplicate that section twice (once for left and once for right hand) and substitute WeaponDraw, BeginWeaponDraw or WeaponEquip_Out in place of "BeginCastRight"- in hopes that would trigger the script to then look at the keyword of the MGEF attached to a drawn weapon and start the Strange Runes hand effect - but no cigar for any of those animation events. In fact, adding either BeginWeaponDraw or WeaponEquip_Out seemed to stop the existing functionality of Strange Runes from working as well, but WeaponDraw at least keeps normal spells working properly. Can you point out where I have gone wrong, or any other suggestions for how to accomplish my goal? The full modified psc is attached (as txt). Thanks! Edited February 21, 2021 by JaymzPaul Link to comment Share on other sites More sharing options...
Recommended Posts