Jump to content

Opcode 39 issues


DavidW

Recommended Posts

13 hours ago, polytope said:

You totally can [bonk someone unconscious], fist damage... knocks the target unconscious when they drop to zero hp or less.

No, that is quite different. Fist damage does real damage to the target's hit points, bring them literally to death's door before rendering them unconscious. The suggestion to which I was responding was that spells like Color Spray and Sphere of Chaos render you unconscious in a manner different than sleep - my objection was that they behave exactly like sleep, making the target fall down without doing any hit point damage. There is nothing in the game that makes you unconscious (I guess I should have added "without doing near-lethal hit point damage first") that is different than the way sleep makes you unconscious. 

But this is moot, we have already moved on.

Link to comment
9 hours ago, kjeron said:

It's 15s per point of damage (after 1 HP).

9 stunning damage vs 7hp indeed knocked a goblin out for exactly 45 seconds.

I can't imagine how I mistimed it by that much, I may have clicked on another open window and thus paused the game. Also I was probably assuming the engine counts these kind of effects in 6 second rounds (base for the standard frame-rate) as the basic unit for in game duration effects.

Link to comment
On 8/13/2022 at 8:06 PM, DavidW said:

I think 'seems reasonable' is too loose a criterion for a fixpack. I don't think we can go adding active immunity to an item unless there's clear evidence that the developers intended it to work that way; I take Cam's comment as active evidence that they didn't.

Fair enough.

I just thought that "billowing mass of nauseous vapors" could be related to Poison... But if @CamDawg meant to say that such spells / abilities were omitted on purpose (again, probably because they do not deal Poison damage explicitly), so be it I guess...?

Anyway, I think that at this point we should all wait for your revision and comment afterwards...

Edited by Luke
Link to comment

Nausea and poison immunity are two seperate things. If we really want to be specific then think of poison immunity as immunity to poisons injected into the bloodstream whereas nausea immunity would represent immunity to poison via breathing. In some cases, there would be overlap (i.e. Cloudkill) but not in most cases. Note that Cloudkill in IWD:EE does check for non.breathing creatures as well as if resistpoison>=100. It would be the least controversial to follow the rules IWD:EE uses.

A fix to Bigby's Hand spells to not use opc39 was submitted internally but didn't make it to the last patch.

I generally agree with David's comment about handling unconsciousness. Handling of opcode39 and feeblemind immunity should be split up imho because these opcodes are used for different effects. The reason opc39 got the sleep status icon in v2.6+ was simply to preserve the original behavior (the unconsciousness icon was unused and opc39 internally applies the sleep icon in BG2o). Any additional status icons were applied as accompanying status icons to "sleep" in BG2o rather than replacing "sleep" which is how it was changed to in 2.6. Nonetheless, I agree that splitting up opc39 to use the unconsciousness icon is appropriate. Tagging @CamDawg since we had an internal discussion about it. In IWD:EE it's much more clear cut, since the sleep status icon is only used for awaken-on-hit form of unconsciousness whereas BG1/2 do not have that form of sleep.

Link to comment
2 hours ago, Galactygon said:

Note that Cloudkill in IWD:EE does check for non.breathing creatures...

Speaking of this, do you think that list should be updated / expanded...? I mean:

  • instead of checking for RACE=MYCONID, it should probably check for GENERAL=PLANT (so as to include all plants, not just Myconids...?)
  • there are certainly other non-breathing creatures besides Undead / Golems / Plants...
    • See f.i. Slimes, unnatural creatures (demons and the like?),  Weapons (only relevant for the Mordenkainen's Sword), Green Dragons (?), others...?

The same holds for Earthquake-like spells / abilities. They check for Wyverns, Beholders and Harpies, but there are other creatures that can fly / levitate or "cannot fall to the ground"... see f.i. Weapons (again, Mordenkainen's Sword), Imps, Mephits, Dragons, Demiliches, incorporeal undead (shadows, spectres, wraiths, etc...), mists, will-o-wisps, oozes, others...?

2 hours ago, Galactygon said:

In IWD:EE it's much more clear cut...

Yes, it tries to be more accurate than BG (see those crude checks for non-breathing / flying creatures...)

However, there is still the issue that Chaotic Commands blocks Earthquake... As I said in the other thread, if we do not want to break compatibility with existing mods, we should come up with either

  1. A new (alternate) Sleep opcode
  2. A tweaked op101

I'm trying implementing the second one in EEex (which is probably the easiest of the two), but I kinda got stucked ... I know engine-related stuff is not ideal for a fixpack (since only Windows users would benefit from it), but it's something you may want to consider for an official patch...

Edited by Luke
Link to comment
20 hours ago, Luke said:

Speaking of this, do you think that list should be updated / expanded...? I mean:

  • instead of checking for RACE=MYCONID, it should probably check for GENERAL=PLANT (so as to include all plants, not just Myconids...?)
  • there are certainly other non-breathing creatures besides Undead / Golems / Plants...
    • See f.i. Slimes, unnatural creatures (demons and the like?),  Weapons (only relevant for the Mordenkainen's Sword), Green Dragons (?), others...?

The same holds for Earthquake-like spells / abilities. They check for Wyverns, Beholders and Harpies, but there are other creatures that can fly / levitate or "cannot fall to the ground"... see f.i. Weapons (again, Mordenkainen's Sword), Imps, Mephits, Dragons, Demiliches, incorporeal undead (shadows, spectres, wraiths, etc...), mists, will-o-wisps, oozes, others...?

A lot of these changes make sense and I think it's best to discuss standardizing immunities in a new thread.

20 hours ago, Luke said:

However, there is still the issue that Chaotic Commands blocks Earthquake... As I said in the other thread, if we do not want to break compatibility with existing mods, we should come up with either

  1. A new (alternate) Sleep opcode
  2. A tweaked op101

I'm trying implementing the second one in EEex (which is probably the easiest of the two), but I kinda got stucked ... I know engine-related stuff is not ideal for a fixpack (since only Windows users would benefit from it), but it's something you may want to consider for an official patch...

Or implement a flag to "bypass opcode 101" in the saving throw field (as bit23?) in the feature block? It would make the most sense to have this type of behavior there, among other things such as mirror image behavior. Then you hit several birds with one stone since you can seperate any opcode basically.

Link to comment
3 hours ago, Galactygon said:

Or implement a flag to "bypass opcode 101" in the saving throw field (as bit23?) in the feature block? It would make the most sense to have this type of behavior there, among other things such as mirror image behavior. Then you hit several birds with one stone since you can seperate any opcode basically.

Yes, sounds good.

Alternatively, if you do not want to touch the engine, I can share a WeiDU function that completely gets rid of op101 and relies solely upon splstates to determine what goes throught what. Since it completely removes op101, this function is supposed to be run as a "last mod", so as to ensure mods that still use op101 are compatible with the new system. However:

  1. As already said, people would be "forced" to install it
  2. It's kinda difficult to automatically handle op39 and its different uses
Link to comment
17 hours ago, Galactygon said:

Or implement a flag to "bypass opcode 101" in the saving throw field (as bit23?) in the feature block? It would make the most sense to have this type of behavior there, among other things such as mirror image behavior. Then you hit several birds with one stone since you can seperate any opcode basically.

 

13 hours ago, Luke said:

Alternatively, if you do not want to touch the engine, I can share a WeiDU function that completely gets rid of op101 and relies solely upon splstates to determine what goes throught what. Since it completely removes op101, this function is supposed to be run as a "last mod", so as to ensure mods that still use op101 are compatible with the new system. However:

  1. As already said, people would be "forced" to install it
  2. It's kinda difficult to automatically handle op39 and its different uses

Maybe (on installation) regexp search through .spl files and find those with spell school matching enchanter (0x0025) or spell type (0x001c) matching PSIONIC which also inflict a #39 in the feature block; this provides a list of obviously "mind affecting" spells or abilities causing sleep, then Chaotic Commands can be patched for opcode #206 vs these rather than the current #101 vs #39?

Still needs to come last in the install, unfortunately, and there seems to be no consistency in modders actually tagging psionic powers as psionic, rather than innate, SPIN775 seems to be the main one to consider on vanilla (others are cutscene only).

Wands and suchlike will also be a bit more complicated, and there are also edge cases where the spell/spell like ability causes secondary effects besides sleep if saved against that might not be conceptually intended as mental attacks.

Link to comment
On 7/7/2023 at 1:45 PM, Galactygon said:

A lot of these changes make sense and I think it's best to discuss standardizing immunities in a new thread.

Or implement a flag to "bypass opcode 101" in the saving throw field (as bit23?) in the feature block? It would make the most sense to have this type of behavior there, among other things such as mirror image behavior. Then you hit several birds with one stone since you can seperate any opcode basically.

Alternatively, you can also use the resist/dispel field? At least in eff v2, there's a bit there which signals that the effect bypasses deflection/reflection/trap opcodes though this bit is not present in eff v1 (& effects applied via spl or itm) formats. Somebody like @Bubb or @kjeron might have a better idea.

On an unrelated note, I wonder why "self-targeting" MR behavior is so complicated.

Link to comment

A "bypass op101" bit would be simple to implement. In fact, it's probably possible to make a binary patch to implement the bit on Mac and Linux as well. The engine only reads in the first two bits of the resist/dispel field, so for convenience’s sake an upper bit in the saving throw field would probably be best.

Edited by Bubb
Link to comment
On 7/7/2023 at 1:45 PM, Galactygon said:

Or implement a flag to "bypass opcode 101" in the saving throw field (as bit23?) in the feature block? It would make the most sense to have this type of behavior there, among other things such as mirror image behavior. Then you hit several birds with one stone since you can seperate any opcode basically.

Done.

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