[No] Allow autoloading support for DEH and BEX files

Moderator: GZDoom Developers

Allow autoloading support for DEH and BEX files

Postby Marphy Black » Sun Aug 16, 2015 9:20 pm

ZDoom's autoload feature is quite handy for automatically running a common set of modifications across multiple sessions. You can autoload most any format the engine already supports: WAD, pk3, and so forth. However, I've run into two conspicuously missing formats: DEH and BEX files.

Loose DeHackEd patches still in DEH or BEX format can be run directly in ZDoom either by the -file command line launch parameter or simply dragging and dropping the DEH/BEX file onto the executable. However, loose DeHackEd patches do not take effect if you try to add them into the autoload section in the ini configuration file. Put a DEH file in the autoload list and it just won't work. The only way to autoload a DEH file is to add it as a lump in a WAD file and autoload that WAD. This seems like a superfluous step as loose DEH files can be loaded manually anyway. Hence, I request the ability to autoload DEH/BEX files just as any other supported format can be autoloaded.

Example usage: I have created a compilation of minor Doom 1/2 DeHackEd fixes to accompany a minor sprite fixes WAD I also put together some time ago. In order to retain vanilla executable compatibility, these DeHackEd patches are provided as loose DEH files. Just as I autoload my minor sprite fixes WAD in ZDoom, I would also like to autoload my minor DeHackEd fixes DEH files, like so:
zdoom-user.ini wrote:[doom.doom2.commercial.Autoload]
Path=C:\games\doom2\D2DEHFIX.DEH
Despite being correctly defined in the ini file as illustrated here, this method currently doesn't work.

For the record, I'm not sure if this behavior is a bug or not, so I'm posting this as a suggestion.
User avatar
Marphy Black
 
Joined: 12 Nov 2012

Re: Allow autoloading support for DEH and BEX files

Postby The Zombie Killer » Mon Aug 17, 2015 1:57 am

I believe this only works if the filename is dehacked.deh or dehacked.bex
User avatar
The Zombie Killer
King of the Kangaroos
 
Joined: 14 Jul 2011
Location: Gold Coast, Queensland, Australia
Discord: Zombie#1795

Re: Allow autoloading support for DEH and BEX files

Postby Gez » Fri Aug 21, 2015 7:03 am

You can autoload any lump, so if you name it dehacked.deh it's not really different from autoloading a sndinfo.txt or whatever. You could autoload dehacked.d2dehfix for example, ZDoom will only look at the file name and ignore the extension.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Allow autoloading support for DEH and BEX files

Postby Marphy Black » Fri Aug 21, 2015 11:13 am

Gez wrote: You could autoload dehacked.d2dehfix for example, ZDoom will only look at the file name and ignore the extension.
Well, this is strange. I renamed my patch file from "D2DEHFIX.DEH" to "DEHACKED.D2DEHFIX", and ZDoom will then correctly autoload it. However, the autoload doesn't work with either the DEH or BEX extension, as originally mentioned. Is this therefore a bug?

Edit: Further testing suggests that something is indeed wrong here. Using my originally named "D2DEHFIX.DEH" file, the following autoload definition does not work, as stated:
zdoom-user.ini wrote:[doom.doom2.commercial.Autoload]
Path=C:\games\doom2\D2DEHFIX.DEH

However, the following autoload definition does work:
zdoom-user.ini wrote:[doom.doom2.commercial.Autoload]
Path=C:\games\doom2\D2DEHFIX

There are no alterations to the DeHackEd file here. It's still named "D2DEHFIX.DEH". The only change is the removal of the extension in the ini file. ZDoom will not autoload the patch file if the ".DEH" extension is included in the autoload definition.
Last edited by Marphy Black on Sat Aug 22, 2015 4:56 pm, edited 1 time in total.
User avatar
Marphy Black
 
Joined: 12 Nov 2012

Re: Allow autoloading support for DEH and BEX files

Postby NeuralStunner » Sat Aug 22, 2015 11:42 am

For loose files (not wad/pk* archives), the "lump name" is checked and the extension is ignored. Pretty much any supported definition lump, as well as graphic replacements, can be loaded loose this way. There's little difference to ZDoom whether you're giving it DEHACKED.something or a wad file containing a DEHACKED lump.

As far as not working with the extension: I seem to vaguely remember a ZDoom feature where loading "SomeMod.wad" would also load up a "SomeMod.deh" if it's present. Might this have anything to do with it?
User avatar
NeuralStunner
not actually a catgirl
 
 
 
Joined: 21 Jul 2009
Location: =o_O=
Discord: NeuralStunner#1293
Operating System: Windows Vista/7/2008 64-bit

Re: Allow autoloading support for DEH and BEX files

Postby Marphy Black » Sat Aug 22, 2015 4:59 pm

My bad, scratch everything I said about the extension in my last post. I forgot I had a test WAD file with the same name that was nothing more than a container for the DEHACKED lump. Removing the file extension in the ini file's autoload definition caused ZDoom to load the WAD file by default, not the DEH file.

I've checked again, and I can confirm everything that has been stated so far. To clarify and summarize the current behavior, ZDoom's autoload feature will only accept a DeHackEd patch file if it is named "dehacked". The extension does not matter as the engine merely identifies it by the special lump name. However, this means that a DeHackEd patch file with any other file name will not be accepted by the autoload. This is the problem as it means one cannot autoload DEH or BEX files if provided in loose form with unique names, hence this feature suggestion.
User avatar
Marphy Black
 
Joined: 12 Nov 2012

Re: Allow autoloading support for DEH and BEX files

Postby Gez » Thu Aug 27, 2015 10:50 am

Yeah, I think autoloading dehacked patches might require a different ini section (something like [doom.doom2.commercial.autodeh] for example) since loading a deh/bex file uses a different semantic from loading an archive (such as the -deh parameter instead of -file).
Gez
 
 
 
Joined: 06 Jul 2007

Re: Allow autoloading support for DEH and BEX files

Postby Graf Zahl » Sun Nov 29, 2015 4:44 am

Too much work for too little gain. Why don't you put the patches into the WAD as well in addition to the loose versions?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest