testlum Posted August 13, 2023 Posted August 13, 2023 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? Quote
jmerry Posted August 13, 2023 Posted August 13, 2023 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. Quote
testlum Posted August 13, 2023 Author Posted August 13, 2023 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. Quote
jmerry Posted August 13, 2023 Posted August 13, 2023 17 minutes ago, testlum said: I'll have to figure out how to rearrange effect order in Nearinfinity... Cut and paste. The numbering will look funny until you save the file, leave, and come back to it, but just moving stuff around that way works. Quote
Galactygon Posted August 15, 2023 Posted August 15, 2023 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). Quote
testlum Posted August 15, 2023 Author Posted August 15, 2023 If I use op326, wouldn't op321 be already redundant? The spell will not take effect if cast on the original caster thanks to op326, if I understood your point. Quote
jmerry Posted August 15, 2023 Posted August 15, 2023 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. Quote
Recommended Posts
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.