Jump to content

Spell contingency bug


Guest Valk

Recommended Posts

@Angel , given that the strings may be different in different installs, it's probably a better idea to make a Weidu hotfix mod to patch out the 171 protection.

And once I started looking into that, I figured, why not make an all-around hotfix to protect against sequencers being removed more generally? I've been reading a few threads about it, going back to ~2013 on the BD forums, and it looks like there are some long-standing issues:

  • SCS Mind Blank can block the op171 effects needed for these to function, given that they need to add an innate ability. (Solved)
  • The transition from the SoA end-battle into TOB can strip sequencers away without fully clearing them. (Is this by script, or by an applied spell?)
  • Raise Dead, Resurrection, Mass Raise Dead, and similar spells can strip sequencers away. (See below)
  • Pressing Ctrl-R on a character can strip sequencers away. (Probably can't do anything about this one)

I just glanced at Raise Dead et al., and wow, they contain specific op172 effects to remove sequencer abilities (spwi420d, spwi710d, and spwi809d).  That seems crazy - the spells seem custom-built to cause this bug!

It would be easy enough to run through all spells and delete all such op172 effects; but before I do, maybe it's worth checking in with @kjeron and/or @Bubb... is there a best way to approach this? Maybe being resurrected ought to remove all sequencer special abilities?  Would a possible alternative approach be something like, any time a spell contains an op172 effect removing sequencers, add an op337 effect removing all op256 effects? Would that eliminate the record of the sequencer from memory, and allow the mage to cast the spell again?

More complicated, but maybe worthwhile, we could add built-in protection against this. Have the sequencer spells each apply a spellstate, and have the innate sequencer abilities remove it. Then when you cast the sequencer spell again, preface it with an op326 effect and if it detects the spellstate (meaning you already have a sequencer), have the spell use op171 to give the sequencer innate again instead of trying to create a new one. This way, if a player is hit by the bug, they can cure it in-game by simply casting the spell again.

(Apologies for going off topic, but since the instant question has been resolved I thought it might be a good place to discuss possible further steps.)

Edited by subtledoctor
Link to post
1 hour ago, subtledoctor said:
  • The transition from the SoA end-battle into TOB can strip sequencers away without fully clearing them. (Is this by script, or by an applied spell?)

 Cutscene Script (CUT59A.BCS) applies CLERIC_RESURRECTION to entire party (excluding CHARNAME/Player1, since it's expected that they cannot die), so same problem as below:

1 hour ago, subtledoctor said:
  • Raise Dead, Resurrection, Mass Raise Dead, and similar spells can strip sequencers away. (See below)

The problem is that they shouldn't affect the living.  Fixes for these should already be in v2.6, though I can't say for certain how it was implemented.  Easiest way to fix is to move all of those op172 effects into another spell, which they will all share, and apply it through op326 checking if STATE_DEAD as the first effect in each spell.  They still need to remove those abilities if the creature was actually dead, because the death itself will have already removed the sequencer effect (as well as the polymorph termination effect).  The Rod of Resurrection lacks these removal effects, and needs to apply them in a similar manner for the same reason.

1 hour ago, subtledoctor said:
  • Pressing Ctrl-R on a character can strip sequencers away. (Probably can't do anything about this one)

Not likely.  It applies op17, param1=200, param2 = (BIT16 + BIT17), which will remove STATE_DEAD, increase HP by 200, and remove any effect without timing modes (2 or 9). Sequencer creation always applies it's effect with timing mode 1, regardless of the timing mode used for creation.

Link to post
17 hours ago, subtledoctor said:

given that the strings may be different in different installs, it's probably a better idea to make a Weidu hotfix mod to patch out the 171 protection.

It was meant to be a hotfix to SCS, note that I said where it was to go in the SCS installation directory.  After that you need to reinstall SCS (well actually only just the IWD arcane spells, but since that's usually the first component you install, all of SCS will reinstall anyway).  Do not put it directly into override, that won't work at all.

As for the issues with Resurrection / Mass Raise Dead, dying will already completely clear all sequencers and contingencies anyway (which is why killing Imoen and raising her solved my problem), so IMHO the effects to remove them are completely redundant and should be removed.

 

Link to post
On 1/4/2021 at 8:57 PM, kjeron said:

The problem is that they shouldn't affect the living.  Fixes for these should already be in v2.6, though I can't say for certain how it was implemented.

Let us consider "SPPR712" (Resurrection) as an example:

  • Yes, it does not affect the living (Extended Header Target is '3|Dead actor'). Moreover, the first effect is op324 (filter: GENERAL != DEAD).
  • It applies a subspell ("SPPR712A") via op326 (filter: GENERAL = DEAD)
  • "SPPR712A" applies another subspell ("#RDREMOV") via op326 (no filter: EA >= ANYONE)
  • And finally, "#RDREMOV" strips Sequencers and Spell Triggers away via op172.

Why the need of two consecutive subspells???

Also, since you suggested checking for STATE = STATE_DEAD, are you saying there's a difference between STATE = STATE_DEAD and GENERAL = DEAD?

Link to post

(Extended Header Target is '3|Dead actor') - It can target living and dead actors.  It really just ignores any range requirement, including being in the same area.

GENERAL=DEAD and STATE_DEAD are similar checks, either should do.

Don't know why it uses two subspells.

Link to post
On 1/6/2021 at 7:30 PM, Luke said:

Why the need of two consecutive subspells???

Because of a glitch with autopause messing up the effect order. Until that is fixed, implementation has to be water tight. #RDREMOV.spl is also conventiently used to clear temporary abilities for Mislead/PI/Simulacra when they are created.

Edited by Galactygon
Link to post
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...