Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Afterglow

Wad Merging

Recommended Posts

Are there any decent command line tools for merging two PWADs? I can't find such an option in Deutex (there's only one for merging PWADs into an IWAD when doom2.exe didn't support add-on sprites).

I need something I can use in a batch process, specifically for compiling test cadidates for Crucified Dreams. I have separate WADs for the graphic resources, music, and one for each map. There'll be a compilation every couple days so I really don't feel like doing this manually. I don't even care about conflicts in the merge as I know there aren't any... and if no such tool is available, I'll damn well program it myself. >:|

Share this post


Link to post

WTF! Crudreams! Anyway, OMGIFOL is probably able to do that kind of stuff.

[edit]
Apparently OMGIFOL does not yet support wad1 + wad2 yet, so you might have to read each WAD's lumps and add them to the new WAD.

Share this post


Link to post

Deutex must support wad1 + wad2 merging, because wintex (4.3) does it, which is just a shell.

Share this post


Link to post

I played around a bit with OMGIFOL and came up with this script:

from wad import *

wads = ["wad1.wad", "wad2.wad"]

finalwad = WAD()

for w in wads:
	wadfile = WAD()
	wadfile.Load(w)
	for l in wadfile.Find("*"):
		finalwad.Append(Lump(wadfile.Lumps[l].Name, wadfile.Lumps[l].Data))

finalwad.Save("finalwad.wad")
There's probably a better way, but I guess only Fredrik knows better :)

Share this post


Link to post

Thanks for that. I'll try it out tomorrow and add reading the wad filenames from command line parameters if it works. But for now... sleep!

Share this post


Link to post

iori said:
Deutex must support wad1 + wad2 merging, because wintex (4.3) does it, which is just a shell.

Yeah. The commands list in the "manpage" text has an error where join has the same description as merge. I bet that's how you missed it, Afterglow.

Both DeuTex and DeuSF take the join command:

-join    

+           Will join two pwads:  mysecond.wad is put inside myfirst.wad.
+           Great for combining pwads!
+           If entries are duplicated, mysecond.wad has priority
+           If custom textures are defined in both wads, they are
+           preserved, but those of mysecond.wad have priority.

Share this post


Link to post

so a batch file along the lines of

join c.wad cmap01.wad
join c.wad cmap02.wad
join c.wad cmap03.wad
join c.wad ctex.wad

should do it?

didnt someone build a tool whereby a wad was unlumped into a dir and the wad could be "relumped" by reversing the process?

Share this post


Link to post

It'd be...

deusf -join c.wad cmap01.wad
deusf -join c.wad cmap02.wad
deusf -join c.wad cmap03.wad
deusf -join c.wad ctex.wad

didnt someone build a tool whereby a wad was unlumped into a dir and the wad could be "relumped" by reversing the process?

Yes, DeuTex! It writes a definition of the wad in text that goes with the resources you dump.

Share this post


Link to post

Thanks Myk, that works great. Now I just have to add a call at the end of the script to CleanWad to get rid of the 1mb of wasted space in a 25mb WAD.

Share this post


Link to post
boris said:

WTF! Crudreams! Anyway, OMGIFOL is probably able to do that kind of stuff.

[edit]
Apparently OMGIFOL does not yet support wad1 + wad2 yet, so you might have to read each WAD's lumps and add them to the new WAD.

Omgifol 0.2 does. I really should update the SF page :P

Share this post


Link to post
Szymanski said:

Did mesko finish his map?


He hasn't worked on it, no. The only thing I'm going to do with it is add some texture variation and align everything since I think the layout is good enough. He doesn't seem to like the layout but he hasn't done anything in the past 5 years to fix it. Jon Rimmer has to finish his too. I know you're reading this. Fucker.

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
Sign in to follow this  
×