Problem With Concentrated Spell on Target Actor

Post » Wed Jun 20, 2012 4:42 pm

I'm making a mod that takes a couple spells and makes castable-on-other versions of them. I ran into a problem when I tried to do this with wards. See edit.

Edit: Figured out the cause. The ward is warding itself. Thanks to chuckbartholomew:

I don't suppose anyone considered the possibility that a ward spell on an NPC might block the casting of a ward spell on that NPC? It might be some kind of race condition:

1) Ward is cast on NPC
2) Ward is applied to NPC
3) Ward concentration interrupted by applied ward
4) Ward is unapplied due to interruption
5) Ward is no longer interrupted, so is reapplied
6) Rinse and repeat

So in this one special case a different solution may be needed. Perhaps an exception that Ward spells cannot block Ward spells or a fire-and-forget delivery that applies a Ward for a duration?

Does anyone know how to get around this? I'd prefer to keep the ward spell as close to the current version as possible. IE I'd like it to be concentrated with the same functionality if possible.
User avatar
GabiiE Liiziiouz
 
Posts: 3360
Joined: Mon Jan 22, 2007 3:20 am

Post » Thu Jun 21, 2012 3:01 am

Well concentration spells only have an effect while you are actively casting (holding down the mouse button). For the ward, that would mean you have to keep casting it on the NPC in order for the effect to continue. If you stop casting, the effect ends.

I also have no idea what happens to the ward mechanic if it is not applied on self. Wards are directional, so what exactly are you trying to achieve by casting it at an NPC?
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am

Post » Wed Jun 20, 2012 12:59 pm

Healing hands is also a concentrated target actor spell and it works fine. Also I am continuously casting the effect and it only sometimes registers, so a lack of casting it isn't what's causing it.

As for the direction of the ward, it shares the facing with the actor it's applied to. As long as the person is facing the incoming spell then it should work fine.

To clarify, even though I'm continuously casting the ward it will only rarely register as a hit on the target actor. When it does register, the ward's graphic appears breifly and then disappears. I've looked at Healing Hands' effect and the only difference is that Healing Hands uses a fake projectile. I tried that, but it didn't work either.
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Thu Jun 21, 2012 3:15 am

Look closely at the conditions, both on the magicEffect and the spell itself. Conditions are usually pretty robust but in my experience the break all the time or have unintended consequences on magiceffects/spells.

Also: check any scripts on the magic effect. There may be some code there that cancells/dispells if target is not self
User avatar
Sudah mati ini Keparat
 
Posts: 3605
Joined: Mon Jul 23, 2007 6:14 pm

Post » Wed Jun 20, 2012 7:39 pm

Neither the spell nor the effects have any conditions or scripts attached, including the original self-targetting version.
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Wed Jun 20, 2012 7:08 pm

Neither the spell nor the effects have any conditions or scripts attached, including the original self-targetting version.

Well, are you sure it's the effect that is not working or just the visuals not showing up properly?
Try firing some spells and see what happens.
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Wed Jun 20, 2012 2:46 pm

Well, are you sure it's the effect that is not working or just the visuals not showing up properly?
Try firing some spells and see what happens.

Yeah. I tested that too. Spells hit the supposed-to-be-warded person as if the ward isn't there (which it isn't).
User avatar
Jessica Nash
 
Posts: 3424
Joined: Tue Dec 19, 2006 10:18 pm

Post » Thu Jun 21, 2012 2:01 am

Did you change delivery from self to target?

If that doesn't work I'd try making a spell that uses a script to addSpell to your target, and that spell is an ability. On the magic effect end remove the spell/ability.
User avatar
Damned_Queen
 
Posts: 3425
Joined: Fri Apr 20, 2007 5:18 pm

Post » Thu Jun 21, 2012 4:11 am

Did you change delivery from self to target?

If that doesn't work I'd try making a spell that uses a script to addSpell to your target, and that spell is an ability. On the magic effect end remove the spell/ability.

Yes I did change the targetting. For the other spells it was really the only thing I needed to change for the spells to work.

How exactly would I go about this workaround? I'm fairly new to this still so how would I apply the ward to the person and then remove it once the caster stops casting?
User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Thu Jun 21, 2012 12:43 am

bump. I'd prefer figuring out why it won't work in the first place to a workaround if the reason can be found.
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Thu Jun 21, 2012 4:05 am

I'd imagine its something to do with the ward spell type itself. It probably wasn't intended to work that way.
The work around mentioned above sounds like the best bet to me.
Should only require a very short script. Just stick something like this on the concentration spell's magic effect.
Ability property yourability autoEvent OnEffectStart(Actor akTarget, Actor akCaster)  akTarget.AddSpell(yourability)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)  akTarget.RemoveSpell(yourability)EndEvent
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Thu Jun 21, 2012 2:26 am

My guess is that since it is target actor delivery type, you actually have to keep your cursor ON the actor whilst holding down your cast button for the concentration. Target Actor fire and forget ONLY works if the cursor is directly on an actor. Since the effect is a concentration type, it makes sense you would need to keep the target under the targetting reticule for it to work.
User avatar
Shaylee Shaw
 
Posts: 3457
Joined: Wed Feb 21, 2007 8:55 pm

Post » Thu Jun 21, 2012 4:47 am

I don't suppose anyone considered the possibility that a ward spell on an NPC might block the casting of a ward spell on that NPC? It might be some kind of race condition:

1) Ward is cast on NPC
2) Ward is applied to NPC
3) Ward concentration interrupted by applied ward
4) Ward is unapplied due to interruption
5) Ward is no longer interrupted, so is reapplied
6) Rinse and repeat

So in this one special case a different solution may be needed. Perhaps an exception that Ward spells cannot block Ward spells or a fire-and-forget delivery that applies a Ward for a duration?
User avatar
Tanya Parra
 
Posts: 3435
Joined: Fri Jul 28, 2006 5:15 am

Post » Thu Jun 21, 2012 12:44 am

Ok so I wrote a script to apply a constant effect spell to a person and remove it on endEffect. The result was the exact same behavior as before. The ward gets seemingly randomly applied. Going off of chuck's consideration, I removed the end event so that if the ward was causing the itself to end, it would end but the ward would still be active on the person. It behaved exactly as expected in that situation. The ward was applied permanently (at least until I broke it with a destruction spell).

So chuck was right. It's the ward blocking itself.

That being said, does anyone have a clue how to get around that? Is there a flag somewhere that tells wards that it's not a hostile spell and shouldn't be blocked? I would think if any it would be hostile, but it's already unchecked.
User avatar
Tanya
 
Posts: 3358
Joined: Fri Feb 16, 2007 6:01 am

Post » Wed Jun 20, 2012 9:35 pm

bump with edit for first post.
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am


Return to V - Skyrim