Jump to content

[solved]casting spell on condition once without log clutter?


Recommended Posts

Sorry about the title, kinda hard to summarize. Okay here's the deal:

 

I'm trying to make an ability that resets itself upon the caster scoring a kill while it's active. To that end, I added a global effect with opcode #232 (pictured) to recast the ability on actor death. 

This is when I ran into the first problem. It would fire off okay on the first kill, but then on the second kill it would fire off twice. Next kill, it would fire off 4 times. And it would keep doubling up until eventually lagging up and potentially crashing the game.

I tried a bunch of stuff that didn't work until it occured to me to try the special field. I put a 1 in there and that did limit it to a single activation, however now it prints out an annoying "contingency spell activation" message every time. It's an improvement, but I'd still like to get rid of it.

I tried numbers 1 through 10 and all odd numbers seem to do the same, while some of the even numbers result in a couple of resets working as intended before starting to stack up again.

 

So, anyone know if any and what number in there would do the job without spamming the log? Or of another way to achieve this effect?

 

Edit:

 

Also worth noting this is 2.5

 

edit 2:

 

solution here:

image.png

Edited by Allbrother
Link to comment

I have this as the first effect within the spell's ability. Stops the other effects from stacking, but doesn't affect the global effect.

I also tried to have it fire off via another on kill global effect, but that didn't do anything. Putting it as a global effect by itself didn't do much better - it removed the duration effects in the spell's ability, but still fired off multiple times. 

 

Edit:

 

Also worth noting this is 2.5

Edited by Allbrother
Link to comment

Try having the spell block itself for a few seconds with op206 (as the last effect). You can use a short duration like 2-4 seconds if you want to keep it under a round. I had some doubling effects issues with op272 (Use EFF on condition) and used this to prevent it.

Link to comment
3 minutes ago, Dan_P said:

Try having the spell block itself for a few seconds with op206 (as the last effect). You can use a short duration like 2-4 seconds if you want to keep it under a round. I had some doubling effects issues with op272 (Use EFF on condition) and used this to prevent it.

As the last effect in the ability header or as the last global effect?

Link to comment
13 minutes ago, Dan_P said:

I put it on the spell itself. So it casts, adds all the effects, then as the last effect, prevents the target from being affected by the same spell for a few seconds.

I tried it both ways, it didn't change the effect - it stopped anything within the header ability from firing more than once, but the global effect still stacked per the combat log. 

Link to comment

I just tried this quickly with a copy of barbarian rage, and it seems to work? I added the op232 to recast, and an op321 to remove effects (but not op206 because it wasn't needed). I'm not getting duplicate messages on EE v2.6. You can try this file. If you're getting multiple castings or messages, it might be a pre-v2.6 issue.

TestRage.zip

Edit: file above doesn't actually work. See this post for explanation.

Edited by Dan_P
Link to comment
35 minutes ago, Dan_P said:

I just tried this quickly with a copy of barbarian rage, and it seems to work? I added the op232 to recast, and an op321 to remove effects (but not op206 because it wasn't needed). I'm not getting duplicate messages on EE v2.6. You can try this file. If you're getting multiple castings or messages, it might be a pre-v2.6 issue.

TestRage.zip 756 B · 1 download

 

Must be a 2.5 thing then, because I got hit with "You cannot cast multiple instances of the same contingency spell on yourself." when I tried that. I even tried straight up plugging your working file in my 2da in case I fucked it up somehow, but same thing. Damn... I guess I'll have to live with the cluttered log.

 

Thanks for the help

Edited by Allbrother
Link to comment

The feedback string "You cannot cast multiple instances of the same contingency spell on yourself" is no longer displayed in v2.6 (possibly related to this).  An instance of op232 will block all subsequent effects with the same parent resource.  You need to put op232 in an EFF and call it via op177 to bypass this, while keeping the op321 as the first effect to avoid stacking.   Global effects do not register a parent resource, which is why you saw a difference using that.

If you want to avoid the feedback "A contingnecy spell has fired", the special field must be an even value.

Edited by kjeron
Link to comment

Spoke too soon. Looks like my file is blocked from being recast. It gives the Barbarian Rage message as if it were being recast, but it's not actually. So basically, it still ends after 30 seconds, probably like the contingency message you were getting.

Edit: Looks like kjeron's post above explains why.

Edited by Dan_P
Link to comment
35 minutes ago, kjeron said:

You need to put op232 in an EFF and call it via op177 to bypass this, while keeping the op321 as the first effect to avoid stacking.   Global effects do not register a parent resource, which is why you saw a difference using that.

 

Works like a charm now. F me, why didn't I think of trying that?! 

Thank you very much

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...