Page 1 of 57

WadSmoosh - merge all official id releases into one PK3 IWAD

Posted: Tue Jul 05, 2016 6:40 pm
by JPL
Hi folks. Recently I've been learning the intricacies of how ZDoom reads resources, and created a tool others might find useful:

https://jp.itch.io/wadsmoosh
(this link will always have the most recent released version)

It reads available IWADs, Master Levels, and No Rest for the Living PWADs from a subfolder called "source_wads/" and creates a new PK3 with all the unique content from each merged together and organized into episodes via custom mapinfo data. All the music, intermission text and art, etc are correct for each episode.

Note: With the sole exception of SIGIL, non-official content, even stuff that was sold at retail by random companies like the Lost Episodes, is not supported! People in this thread have customized WadSmoosh to do this but it's outside the scope of what I wrote WadSmoosh to do and I have no intention of supporting it. Also please note that you don't need WadSmoosh to merge non-commercial content! Use a WAD editing tool like SLADE3 instead.

Here's what the episode select screen looks like:
UyoUFl.jpg
The tool is called WadSmoosh. I wrote it in Python but a Windows EXE is included, as well as a shell script for running the source script on Linux and macOS (Python2 only, for the moment). It uses the wonderful OMGIFOL library to do all the lump extraction, and I used SLADE to build the texture definitions for each IWAD.

Other details of note:
- The full size pk3 is about 40mb uncompressed. (17MB with max ZIP compression, 11MB with 7zip compression - you'll have to do these yourself though)
- WadSmoosh does not apply any map fixes directly to maps, it relies on GZDoom's internal level compat process.
- WadSmoosh is smart enough to not include the Master Levels and NRftL levels if Doom 2 isn't present.

If you have any comments or run into any issues using this, let me know!

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:09 pm
by Somagu
Ooh, so there's no texture conflicts or anything? This is pretty excellent.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:13 pm
by wildweasel
It is worth noting, if you're like me, that the IWADs in the source_wads/ folder need to NOT be tagged Read-Only for this to work, or else the script aborts with a "permission denied" error.

[edit] Whoops, bug report:
Image
Doom 1 episodes have Doom 2 skies.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:24 pm
by JPL
wildweasel wrote:It is worth noting, if you're like me, that the IWADs in the source_wads/ folder need to NOT be tagged Read-Only for this to work, or else the script aborts with a "permission denied" error.

[edit] Whoops, bug report:
Doom 1 episodes have Doom 2 skies.
Should be fixed now if you re-download (and re-run the tool, natch) - sorry, I did some last minute texture def restructuring.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:31 pm
by wildweasel
JPL wrote:Should be fixed now if you re-download (and re-run the tool, natch) - sorry, I did some last minute texture def restructuring.
Cheers for the quick response, boss, just ran it again and it works just fine now. (I'm thinking I ought to go buy DOOM 3 BFG Edition just to have a legit copy of NRFTL, though, heh).

[edit] Oh, do the Master Levels come up in a specific order, or did you implement Zippy's Master Levels menu interface?

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:39 pm
by Death Egg
I've been waiting a long time for something like this. Thank you.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:42 pm
by JPL
wildweasel wrote: [edit] Oh, do the Master Levels come up in a specific order, or did you implement Zippy's Master Levels menu interface?
Master Levels have been pieced into a single 21-level episode, using the PSN order. Inventory resets after each level, TEETH.WAD MAP31 secret exit leads to MAP32, correct skies for each WAD are extracted and used. Lots of D_RUNNIN given that most of the maps are in the MAP01 slot, but I didn't want to make any subjective creative decisions. You can change the MAPINFO files inside the PK3 if you have a preferred ordering, music list, etc.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:45 pm
by wildweasel
JPL wrote:Master Levels have been pieced into a single 21-level episode, using the PSN order. Inventory resets after each level, TEETH.WAD MAP31 secret exit leads to MAP32, correct skies for each WAD are extracted and used. Lots of D_RUNNIN given that most of the maps are in the MAP01 slot, but I didn't want to make any subjective creative decisions. You can change the MAPINFO files inside the PK3 if you have a preferred ordering, music list, etc.
Ah, okay, that makes sense! Pretty much the only thing I'd wish for beyond that is to see if something like Jimmy's Jukebox works with this (probably not, since it's expecting traditional map numbering, IIRC). Maybe TerminusEst's randomizer works? Maybe it's time I rolled a custom version of that for personal use.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 7:48 pm
by Death Egg
Out of curiosity, any way you'd consider making it work with the Eternity Engine as well?

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:04 pm
by DarkkOne
Does gzDoom "trust" file extensions for its handling, or does it make use of header information and override them?

For example, could I name this something like Doom2.wad so that gzDoom shows it in its IWAD menu alongside the non-Doom games? Or is that likely to cause significant problems? (Honestly, I've never used an IWAD with gzDoom, and so I'm not even sure what's necessary to load with a non-standard IWAD until I get home later).

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:11 pm
by wildweasel
I suspect it doesn't read the file extension at all; in order to be loaded as an IWAD, it'd need specific WAD lumps to be present - not the least of which are PLAYPAL and COLORMAP - to even be able to run the game.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:16 pm
by DarkkOne
Well, the original post says it merges them into one "PK3 IWAD." I assumed then that it could be loaded on its own, without another IWAD as a base? Or do I need to load it as a PWAD on top of something for it to work properly?

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:26 pm
by wildweasel
DarkkOne wrote:Well, the original post says it merges them into one "PK3 IWAD." I assumed then that it could be loaded on its own, without another IWAD as a base? Or do I need to load it as a PWAD on top of something for it to work properly?
Huh, you're right, I'm able to run it as an IWAD with the -iwad command line switch. The Doom 1 titlepic and status bar borders get used, but the Doom 2/Final Doom episodes still work just fine...however, if you're loading any custom PK3s that include /filter subfolders, it'll identify the game as Doom 1.

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:37 pm
by DarkkOne
Would it be possible for a change to be made to make it identify as Doom 2? That would be the "most compatible" choice right? Not a lot of mods that only work with Doom but not Doom 2, right?

Re: WadSmoosh - merge all official id releases into one PK3

Posted: Tue Jul 05, 2016 9:47 pm
by durbdoogle
This is great. I'm surprised it's taken this long, that I know of, for someone to do this. Great work!