Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Csonicgo

DeHackEd bugs and limitations

Recommended Posts

A lot of "limitations" and "bugs" have been noticed in DeHackEd, and the source ports that added support for it, but none of this is clearly documented. Let's change that!

So here's what I know so far...

Recently I have noticed that the original DeHackEd didn't support changing quit messages. Quite a weird omission. Were quit messages not the same as any other strings in the EXE? Or was it just an unfortunate omission?

There is also a "Yes/No" pair of strings in the Doom executable that seem to change no text in a single player game if those strings are changed in DeHackEd. Were these part of the default multiplayer chat macros? ZDoom picks this up and modifies the Yes/No strings in the zdoom-specific menus, such as the compatibility options. Never noticed it until I came across a mod that changed those strings. ZDoom may be the only port that does this.

The "Monsters Infight" flag is broken in certain ports(Boom?).

There is a bug in Boom that omits certain "You need a key to activate this object" strings. ZDoom also exhibits this behavior.

Then there is the "Batman bug" which causes the fist in Batman Doom to become "stuck" because the weapons table becomes corrupted. From Fraggle's patch that fixes this:

# This is a small fix for Batman Doom.  Under most source ports it runs
# fine (this patch is not needed).  However, when playing under DOS with
# Vanilla Doom  there is a problem caused by a limitation in DOS dehacked.
# batman.deh edits Frame 966, which is the last frame in the Doom frame
# table.  However, dehacked internally allocates an array which has one
# element less than Doom itself.  Therefore, editing Frame 966 overflows
# dehacked's internal array.  The data instead overwrites the weaponinfo
# array.  
#
# The end result of all of this is that if you play under Vanilla
# Doom patched using DOS dehacked, if you switch weapons to the fist you
# are unable to switch away again, because the weapons table has been
# corrupted.
Chocolate-doom emulates this limitation. Do other ports do this?

This weapons mod has a "Jesus weapon" that gives the player an arch-vile attack. Works in Vanilla and Chocolate Doom, but not others. Eternity Engine actually crashes when this weapon is used. Quasar said something about this years ago on IRC and I do not remember the specifics of it, something about arch-vile attacks and "NULL".

It's also possible to make lost souls into non-floating immortal beings with no clipping. It's not a ghost monster, it's something much worse. I attempted to document this but I don't think it's quite right. Some stuff just can't be explained.

I want to add this information to the doom wiki, as the current information is scattered around online and not where it needs to be. But all of it needs to be verified before I can slap something up on the wiki.

Share this post


Link to post

Another one worth mentioning, you cant use infinite ammo for guns in vanilla as it draws from your "max shells" pool instead. https://www.doomworld.com/vb/doom-editing/55266-infinite-ammo-with-dehacked/

Also worth mentioning, custom sprite use via dehacked: https://www.doomworld.com/vb/doom-editing/66056-vanilla-engine-custom-sprites-in-a-pwad/ even more info, including the fact that .bex doesn't support the .deh sprite replacement trick: https://www.doomworld.com/vb/doom-editing/70755-vanilla-custom-sprites-oddities/

Share this post


Link to post
Csonicgo said:

So you were the one who made that.

Quasar gave a technical explanation here

Although a page for DeHacked bugs would be better.

Share this post


Link to post
bzzrak said:

One little question about this one. Selfie Doom has this bug. But how, if the selfie stick replaces the chainsaw?

EDIT: I'm dumb. The stick replaces the BFG.

The type of weapon doesn't matter; the type of attack function does. Punch and Saw attacks never consume ammo, so they're proof against this bug. FireBFG consumes as much ammo as defined in the "BFG cells per shot" field in "Misc" table, so it's proof against this bug ONLY if the value in said field is set to 0. All other player weapon attack functions are prone to this bug.

Share this post


Link to post
Csonicgo said:

Then there is the "Batman bug" which causes the fist in Batman Doom to become "stuck" because the weapons table becomes corrupted. From Fraggle's patch that fixes this:

Chocolate-doom emulates this limitation. Do other ports do this?

Most don't bother and it's quite understandable to be honest. Chocolate Doom only does it because it's pedantic in its correctness.

Batman Doom is a vanilla mod but never seems to have been tested with actual vanilla. In fact the website recommends using Boom and the text file lists Ty Halderman in the PC conversion credits, so I think they never bothered. For the time it was quite understandable - with the dawn of source ports, vanilla seemed very obsolete.

DOS dehacked has an annoying bug where its in-memory frame table is one frame too short, so any attempts to write to that last frame trash the weapons table instead. Most source ports just let it slide and allow patches to use the last frame.

Share this post


Link to post

I always found it strange that you can change the BFG's 40 ammo usage, but not the 2 shells of the SSG

Share this post


Link to post
fraggle said:

Batman Doom is a vanilla mod but never seems to have been tested with actual vanilla. In fact the website recommends using Boom and the text file lists Ty Halderman in the PC conversion credits, so I think they never bothered. For the time it was quite understandable - with the dawn of source ports, vanilla seemed very obsolete.

It ran on the 'vanilla' Mac Doom port, at least, since that's what the developers used (as there were no other options on the platform for several years).

Share this post


Link to post
uhbooh said:

I always found it strange that you can change the BFG's 40 ammo usage, but not the 2 shells of the SSG

BFG cells count is set through the dehacked "Misc" section which is the weird oddball section found in dehacked files.

Almost everything in dehacked (things, frames, weapons, sounds, ammo, etc.) involves changing tables of data that the dehacked developers found in the vanilla .exe files. The id guys designed a lot of Doom's logic to be table driven - partly because things are just more maintainable that way, and maybe partly because they were hoping to make the engine generic so they could sell it to other companies in the future. I think there was some maybe some integration with DoomEd too as well so that you could change some of these tables from within the editor? All the tables in info.c are autogenerated.

The "Misc" section is the one that doesn't fit this pattern - it's basically program code hacks that people in the '90s figured out - "if we change this particular byte then we can change the initial health" or "if we change this byte then monsters will infight within species". It's very much a grab-bag, arbitrary collection of random things you can tweak, and I'm not sure all source ports even get it right (I think I remember Boom interpreting some of them wrong?)

esselfortium said:

It ran on the 'vanilla' Mac Doom port, at least, since that's what the developers used (as there were no other options on the platform for several years).

Indeed. It's something I'm quite curious about since I don't think I've ever actually seen the Mac version of Batman Doom (and I've played the PowerPC Mac version of Doom in the past). It looks like there were a couple of tools for Mac OS Doom hacking which worked similar to Dehacked so I guess Mac Batman Doom used one of these. Certainly I expect Doominator just modified the same state tables that Dehacked changes anyway so it was probably a fairly straightforward conversion.

EDIT: Looks like it indeed used Doominator, but the Mac download is a broken link :(

EDIT 2: Looks like the Mac version is here just in case anyone is curious.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×