Jump to content

(EE) Opcodes 326 (add effects list) and 333 (static charge)


Recommended Posts

It appears that targettypes of effects within a .spl applied via opcodes 326 or 333 is treated as follows:

  • 1-Self is applied regardless of the projectile within that .spl and is applied instantly to the target of the parent spell using opcode 326/333
  • 2-Pre-target is applied via the projectile within that .spl. If projectile 1-none is used then effects using this targettype are applied to the target of the parent effect opcode 326/333 after any effects using 1-self are used.
  • 9-Original Caster is known to be used by SPWI631B.spl (i.e. soul eater in IWD:EE) and applies effects to the original caster (unlike targettype 1-Self if used in this context).

Opcode 333 (static charge) may use the resource field to specify the .spl to be cast. Otherwise, a default -B is added to the parent spell's name.

Edited by Galactygon
Link to comment

Op146 also shares this targeting mechanic when using the "cast instantly at level" mode (param2=2), there's more discussion about it here.

They are further complicated by their interaction with Spell Turning.  If op333/326 is reflected, all targeting modes of the subspell will affect the Target (damaging affects will also credit them as the damager), none will affect the Caster.  Op333/326 needs to bypass reflection, in order for the subspell effects to be reflected properly.

However, this is all broken when using an invalid projectile, such as projectile #0 (listed as "Default" in NI), or any other unlisted index in PROJECTL.ids that isn't hardcoded.  Used in the subspell, it will result in all 3 targeting modes affecting the target of op333/326.  An invalid projectile in the main spell (containing op333/326) will break the reflection of "Self" and "Pre-Target" subspell effects (they won't be applied to anyone).  It's important not to leave a newly created spell with the default(0) projectile value.   Note: projectile #1 (listed as "None" in NI) is not invalid, but a hardcoded projectile.

Link to comment

Thanks, edited original post for accuracy. Is targettype 9-original caster properly used on reflection by spell turning? In that case, original caster should switch to the creature doing the reflection. Some existing spells use the parent spell to affect turning/deflection (nonzero power values) while others have their nonzero resist/dispel/power values used in the child .spls.

I will report this inconsistency in Redmine on a good repro case.

Edited by Galactygon
Link to comment

A bit of extra info: if opcode 333 has a saving throw attached to it, that save will be rolled each time the effect repeats and the effect self-terminates on a successful saving throw but not other effects from the same resource like opcode 321.

Creatures carrying effects that were applied via opcodes 326/333 will use the dispel.level of the target of 326/333 rather than the original caster.

This functionality is present as of patch 2.5 which may/may not be fixed in the future.

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