Xarrian Posted November 9, 2012 Share Posted November 9, 2012 (edited) Hey! I just wanted to make a contact spell effect that only affects targets that do not have a specific perk. But when I applied the spell despite having the said perk, it still triggered just like that. Being curious, I tested a few other things, like a contact spell that kills a target instantly via a script attached to it. That worked fine, but when I put in a condition (GetActorValue Health > 10000 - meaning nothing that has lower health than the specified amount should be affected) that the said enemies I tested it on before did not fulfill - still, they died, which should not happen. Now, my question is if this is a known bug or is it just me? Before anyone asks, yes, I have tripple-checked all the conditions and anything else related to it (the spell being set up correctly etc.) - it's just a pretty annoying thing, since it seems to prevent a lot of interesting options! Edit: What I also noticed is that the conditions seem to be checked only for isolated effect archetypes - damage and healing effects seem to work properly, but Stagger, Scripted Effects and some others seem not to. I also wanted to make a contact spell that made the target stagger when its hit with a bow under certain conditions, but again, the conditions did not apply, allowing stagger-locking instead with any enemy. When I looked how the perk related to giving a chance to stagger enemies with a bow, I also noticed that Bethesda did not use a contact spell to realize it - instead, there seems to be another magic archetype effect solely for the purpose of giving ranged weapons a chance to stagger - though contact spells seemed to be the more obvious choice - now I also wonder if they have been aware of this problem since the release, which would explain this somewhat weird looking workaround. Thanks for reading! Any help is greatly appreciated! :) Edited November 9, 2012 by Xarrian Link to comment Share on other sites More sharing options...
Xarrian Posted November 10, 2012 Author Share Posted November 10, 2012 /bump I really need some info on this - it currently prevents a lot of things I'd like to implement :( Does no one else have such a problem? Link to comment Share on other sites More sharing options...
KingsGambit Posted November 10, 2012 Share Posted November 10, 2012 From the sounds of it you've done a fair amount of experimenting already. There are three reasons I can think of why it may not be working. One, the condition simply doesn't work properly. Two, it's not configured correctly. Three, the spell is not receiving the condition. The first cannot be helped and can only really be worked around. The second requires more expermimenting, or possibly out-of-the-box thinking. Check that it's running on the correct target, subject, reference, combat target, etc and has the correct evaluation. Instead of == 0, you could try != 1 for example. Or try a different conditional to detect the same thing. For example, IsRace Orc could also be checked for with Has VoiceType Orc. Someone hit by lightning will also have just had their stamina drained. Maybe there's an alternative you *can* check for. For the third, it's very specific to your spell, the NPC, the circumstance so is harder to troubleshoot. Most of these things could potentially be done in a script. Making the spell Script -> Fire & Forget -> Contact and attaching the script to achieve in Papyrus what cannot be done in the CK. For example: Perk Property MyPerk auto Event OnEffectStart(Actor Target, Actor Caster) if (!Target.HasPerk(MyPerk) && !Target.IsEssential()) Target.Kill(Caster) else Debug.Notification("Target has " + MyPerk + " perk") EndEventYou can use any of the myriad functions on this page to evaluate almost any condition. Link to comment Share on other sites More sharing options...
KingsGambit Posted November 10, 2012 Share Posted November 10, 2012 For the stagger thing, I fail to see why a contact spell is a more "obvious" choice, but that's unimportant. Stagger chance can be modified with a perk so there's another approach you can use. Create your spell as Script -> F&F -> Contact. In the script, use something like: Perk Property MyPerk auto Event OnEffectStart(Actor Target, Actor Caster) Target.AddPerk(MyPerk) EndEvent Event OnEffectFinish(Actor Target, Actor Caster) Target.RemovePerk(MyPerk) EndEventIn the perk, you can make an entry point to mod incoming stagger. To make it specific to incoming arrows, you'll have to experiment with conditions again. Maybe the perk owner is hit by an arrow, or the attacker is equipped with a bow. The only functions for manipulating stagger values are SKSE functions, which get/set stagger on a particular weapon. It's possible to evaluate whether the attacker is wielding a bow, and change the stagger value of that temporarily, but then it would have the effect on all targets. Link to comment Share on other sites More sharing options...
Recommended Posts