Jump to content

Let's talk about shapechange bugs


subtledoctor

Recommended Posts

I want this to be a bit of a brainstorm thread. I understand that there is a bug related to e.g. druid shapechanges, to wit, if your druid shapechanges into a bear, the bear's paws can be dispelled and the druid will end up in bear form with his human hands and weapon.

 

My understanding is that the "Create Weapon" opcode doesn't respect the "No Dispel/Bypass Resistance" setting.

 

I think I even saw someone say that they are *automatically* dispelled, implying that the usual level-based calculus for Dispel Magic doesn't spy. Can that be true?

 

What about other similar things: Spiritual Hammer, MMM, Black Blade of Disaster, etc. Are they subject to the same effect?

 

What about stuff like wolpak's Classes Reborn mod in development, which uses invisible undroppable items in the 'ammo3' slot - can they be dispelled as well?

 

In short, I'd like to learn as much as I can about how this bug works, and what can be done to minimize its effect, aside from the horrible symbolic paws "solution" that a few mods use. (No offense to those modders, I just think the symbolic paws thing is terrible in actual gameplay.)

 

Do can anyone enlighten me? Throw out ideas for other, more reasonable solutions? Have at it.

Link to comment

Is it accessible to modders? Can I find and use it for mod-added items?

 

And what about the EEs? No ToBEx possible there, and I recall reading that the bug is present in them as well.

 

I guess I'm just trying get a solid handle on the precise boundaries and effects of the bug. Most forum posts discussing it are less-than-informative. (Could be a signal-to-noise issue in trying to sift through them, though.) Is there a good discussion about it somewhere?

Link to comment

You can check out SR's Dispel Magic Fix component. It currently uses Taimon's .exe patching code, which implements behaviour similar (but not identical) to ToBEx.

 

The important parts to look at are the changes to the various resources:

  • For all .itm/.spl abilities and .eff files that contain effect 58 ("Dispel Magic")
    • Change the behaviour of magical weapon dispelling to use the new algorithm with corrected dispel chance (unless the effect is set to "always dispel")
    • Delete all instances of effect 112 ("Remove Item") from the ability
  • For all resources (.itm/.spl/.eff) that contain effect 111 ("Create Magical Weapon")
    • Record the name of the .itm file referenced in the resource parameter
  • For all recorded items that can be created by effect 111 ("Create Magical Weapon")
    • Give them immunity to dispelling
  • For a customized whitelist of magical weapons created by spells (e.g. Energy Blades, Black Blade of Disaster, Phantom Blade, Melf's Minute Meteors, Sol's Searing Orb, etc.)
    • Remove the immunity to dispelling
This means all the items created by effect 111 that are not on the whitelist will be immune to dispelling, and all the ones that are on the whitelist will be subject to dispelling using the corrected dispel algorithm. Compared to the vanilla behaviour, where all magically-created weapons were dispelled automatically and all other dispel chances were bugged, it's a big improvement.
Link to comment

I swear I read somewhere that the EE fix doesn't work... maybe I'm mistaken.

 

How can a modder include this function? Can I just save an item with that flag set in NI (from an EE or a TobEx-modder install) and distribute it that way, or will that cause problems? (My mod makes no assumptions about the presence of TobEx, it's meant to work on all versions of the engine.)

 

Or do I instead need to add an ACTION_IF [Tobex or EE] THEN BEGIN and set the bit in Weidu, at install-time?

 

Thanks for the help btw!

Link to comment

I'd assume you'd be safe distributing your item with the appropriate item flag set. That flag was previously unused, so an unmodified vanilla version of the game will probably just ignore it. Newish versions of NearInfinity and probably DLTCEP should identify that bit, or you can set it in code.

 

WRITE_BYTE 0x1b (THIS BOR 0b00000001)
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...