Jump to content

Opcode 335 (7 eyes) Log flooding


Recommended Posts

Hello,

 

I read about opcode 335 and it looked amazingly useful with how much customisation it offers. I decided to test it, I copied 7eyes.2da and spwi725 (7 eyes) from IWDEE, then changed one line to also protect from Armor spell (spwi102). I started the game, cast spwi725 and then spwi102, everything looked fine in terms of the behavior, Armor was absorbed properly, however I got a very unexpected effect in my game log:

Image

The game printed the strref set in 7eyes.2da 9 times, which is the number of effects that Armor spell has. I tried to set strref to -1 and to "****" in 7eyes.2da but nothing helped. Opcode for protection from strref is useless too. Is there no way to avoid this flood of messages? Or do people just accept this behavior in IWD and in any mod that uses opcode 335?

 

 

Link to comment
Posted (edited)

Hmmm, you see no feedback at all?

According to this https://gibberlings3.github.io/iesdp/files/2da/2da_bgee/7eyes.htm

  • Column 2 is the string reference (dialog.tlk) that will be displayed when the row triggers (for each effect it triggers on).

I tested this on IWDEE and the effect is exactly the same, my message log is flooded with the same message for each effect of the spell that is blocked.

 

Which of your mods use this? I'll install them and experiment with that myself. Could you also check the behavior regarding spell blocking yourself? 

Edited by SparrowJacek
Link to comment
Posted (edited)

No I see feedback. When I use my Parry ability, the log says “Charname: Parry” when it successfully blocks damage. And with other uses, when I put “-1” as the string, I see no feedback. But I have not tested this with blocking whole spells. It might well give feedback for every effect blocked, I’m not sure. 

EDIT - there are probably other ways to do a “block a spell once” aside from 7eyes. 

Edited by subtledoctor
Link to comment
1 hour ago, subtledoctor said:

EDIT - there are probably other ways to do a “block a spell once” aside from 7eyes. 

The usual technique is the Spell Shield method - one level of deflection against whatever category of spell.

But here, the application is an attempt to block "Armor". Which is self-targeted and non-hostile. All of the usual decrementing spell protection opcodes don't work against non-hostile self-targeted spells. "Seven Eyes" may be the only way to do this particular effect.

Link to comment
Posted (edited)
2 hours ago, jmerry said:

The usual technique is the Spell Shield method - one level of deflection against whatever category of spell.

Hate to use a whole secondary type just to block one spell, though. Sectypes are a limited resource. 

You could move Armor’s effects into a subspell, and use op206 to block the subspell. And have the outer SPWI Armor spell cast a second subspell that cancels the 206 protection. That’s what Demi would have done, back in the day. 

(There’s a strong argument that all SPWI and SPPR spells should operate via subspells by default - it would allow much more flexibility for mods like this to do interesting things with them. probably should have been in the FixPack about 15 years ago, however - now, it risks compatibility with mods that patch spells.)

Edited by subtledoctor
Link to comment

I see many interesting ideas, great! 

Quote

But here, the application is an attempt to block "Armor". Which is self-targeted and non-hostile. All of the usual decrementing spell protection opcodes don't work against non-hostile self-targeted spells. "Seven Eyes" may be the only way to do this particular effect.

Armor spell was just an example here. I understand that it's not so easy to protect from a non-hostile spell, but protecting from a hostile spell should be doable, right? I just tested that when I added opcode 146 to Armor, which cast Magic Missile (a hostile spell) I could cast Improved Invisibility, then cast Armor and my character was still completely invisible, so casting a hostile spell from opcode 146 does not break invisibility.

Quote

Hate to use a whole secondary type just to block one spell, though. Sectypes are a limited resource. 

Hmm, can we have only 256 of them? Do many mods use new ones? We have a limited number of spell states (for 7 eyes), secondary types and primary magic schools, but that's still a few hundred, which should be enough if you don't install many huge mods that rework the whole magic system or something of similar proportion, right?

Quote

I checked the engine – it's impossible to disable or otherwise block op335's feedback string.

Thank you for that. Forcing players to scroll through such blocks of irrelevant info in their logs sounds really bad, so I'll probably think of other ways to implement my ideas.

Link to comment

Protection from a hostile spell should be doable with the Spell Shield method, yes. There are variants of the opcode for school, power level, and secondary type - of which secondary type is the only one really usable for something like this. You would have to check for interactions with whatever's already in place; if you wanted to block Magic Missile based on a new sectype, you'd have to take into account its existing OFFENSIVEDAMAGE sectype and the existing Cloak of Mirroring that protects against that.

(Why not the other two? While you could add some dummy effects to make a power level decrement trigger only on the specific spell you're trying to block, any trigger of it would also decrement - and most likely fully consume - all other instances of that opcode, such as Spell Deflection. And of course, creating a custom school for a spell would mess with all sorts of things that interact with spell schools.)

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