Jump to content

Delayed timing modes in EFF


testlum

Recommended Posts

Follow-up question to this topic. I posted a separate topic for ease of searchability in case others have similar questions.

On second thought, I would use op332 in SPL_XXX to give both the original caster and target +100% slash/pierce/crush damage for 10 seconds.

In this case, I want to close the loophole where the caster could use SPL_XXX on themselves to get +200% slash/crush/pierce damage. My idea is to remove all SPL_XXX effects via op321 on the target, then applying the damage buff after a small delay.

My question then is about timing modes. The information on EFF File Formats is quite hard to understand. Which timing mode do I choose if I want to delay an EFF by 1 tick and last for 10 seconds after the delay?

Link to comment

Timing mode 0, Instant/Limited. The "do an EFF" effect in the original spell has timing mode 7, and calls an EFF with timing mode 0. Except that most of the opcodes that call EFFs ignore that EFF's duration in favor of their own, so you use a SPL instead.

The "delay/limited" timing modes 3 and 6 are mostly useless, because they only have one duration parameter. Wait X (ticks or seconds), then be active for X (ticks/seconds), then end. I have yet to encounter a situation in which this is actually what I want.

And then the whole thing's irrelevant, because you don't need the delay. The effects of a spell are executed in order, so as long as you do the 321 first you can just remove the old effects and apply the new all in the same tick.

Link to comment

If that last part is so, then it definitely saves me a lot of trouble! Much appreciated. I'll have to figure out how to rearrange effect order in Nearinfinity, but there's always the old fashioned way of adding the effects one after another.

Thank you for taking the trouble to explain. I can't think of many applications for having delay and duration be the same lengths either. Strange that it works this way.

Link to comment
On 8/13/2023 at 4:29 AM, testlum said:

Follow-up question to this topic. I posted a separate topic for ease of searchability in case others have similar questions.

On second thought, I would use op332 in SPL_XXX to give both the original caster and target +100% slash/pierce/crush damage for 10 seconds.

In this case, I want to close the loophole where the caster could use SPL_XXX on themselves to get +200% slash/crush/pierce damage. My idea is to remove all SPL_XXX effects via op321 on the target, then applying the damage buff after a small delay.

My question then is about timing modes. The information on EFF File Formats is quite hard to understand. Which timing mode do I choose if I want to delay an EFF by 1 tick and last for 10 seconds after the delay?

You can move the target resistance effects into another child spell and have it be linked to the parent spell via an opcode 326 param2=44 so it's only cast onto the target if it's not the source i.e. the original caster. Once that is done you need to make sure your 321 inside the child spell dispels the child spell and is the first effect in the effects order. Same with the 321 in the parent spell.

The current engine unfortunately doesn't support delayed tick timing mode, only duration tick timing mode (10).

Link to comment

Remember why you wanted an op321 in the first place - to prevent the spell from stacking with itself. It's the op326 that's redundant, because the anti-stacking 321 is a perfectly normal sort of thing that's done all the time without needing any subspells.

There are reasons to put an op321 into a subspell; spell protections like Spell Shield and Spell Deflection do it, to remove the whole spell once the protection is depleted. But that sort of thing only comes up if there's some extra complexity like not knowing when you'll need to cancel the spell in advance. For the simple anti-stacking application of "remove old effects, then apply new effects", you just let the 321 be the spell's first effect. [For example, see SPPR210 "Resist Fire and Cold]

Well, OK, there is one thing here that might warrant a subspell - you're applying the effects to both a chosen target and to the caster. That can be handled in two ways; either you duplicate all the effects with the two effect targets, or you outsource the whole thing to a subspell that the main spell casts (op146) twice.

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...