Page 1 of 5

Unwad - minimal wad tool (mingw build script now in svn)

Posted: Fri Aug 29, 2008 10:06 pm
by bagheadspidey
Windows version ready for testing!
download link below.

Goals:

* simple command line tool with optional advanced features
* take a wad name (or multiple wad names) as parameters (done)
* output a pk3 or folders full of files ready to be zipped into a pk3 (done)
* convert all doom format images to png (with grab chunk) (done)
* convert all doom format sounds to flac .wav / .au (done)
* identify formats of non-doom lumps and export them with appropriate file extensions (done)
* put each map into a separate PWAD (done, can't rename maps yet)

Advanced features:

* filter extracted files by type (done)
* filter extracted files by regular expression (done)
* transform extracted file names by regular expression. Use '/' to indicate a directory separator. (done)
* group sprites into folders by first X characters of sprite name (done)
* merge data option when extracting multiple wads (done)
* text lumps can be appended instead of overwritten when dealing with merged lumps. (done)

You can get pre-compiled binaries of the latest development versions of unwad here:
unwad for windows | unwad for linux.

If you want to compile unwad yourself, check it out from the svn repo.

You can view the latest readme.txt in your web browser.

Feature suggestions welcome!

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sat Aug 30, 2008 7:01 am
by Gez
For DECORATE export, what could be useful would be the possibility to change a huge DECORATE lump into a list of many little text files, in this way:

Code: Select all

ACTOR Whatever : Blah { lorem ipsum yadda yadda }
ACTOR Stuff : MoreStuff { et caetera and so on }
ACTOR YetMore { and so forth }
This would become

Code: Select all

#include Decorate/Whatever.txt
#include Decorate/Stuff.txt
#include Decorate/YetMore.txt
And of course all these text files would contain said actor.

I don't think it would be too hard to do this if you've got a parser that is able to find the beginning and end of an actor definition and identify its name.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sat Aug 30, 2008 3:29 pm
by bagheadspidey
Gez, that's an interesting idea. The problem I see with it is lots of times you'd want more than one actor in a file. You might want a monster, its projectile, and its dropped item all in one file, for example. Or you might have a bunch of classes that extend each other that are really all part of one thing. I'm just not sure every actor deserves its own file.

However, I can see that it could definitely be useful too. Does anyone else have an opinion on that?

Also maybe doing something like this is a better idea than merging the decorate lumps together when processing multiple wads. I could at least include it as an option. So Afrit.wad/DECORATE would become monsters.pk3/decorate/Afrit.txt, and monsters.pk3/decorate.txt would #include Afrit.txt.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sat Aug 30, 2008 4:00 pm
by Gez
bagheadspidey wrote:Gez, that's an interesting idea. The problem I see with it is lots of times you'd want more than one actor in a file. You might want a monster, its projectile, and its dropped item all in one file, for example. Or you might have a bunch of classes that extend each other that are really all part of one thing. I'm just not sure every actor deserves its own file.
I know. But by all mean, if you have an idea to make your utility smart enough to guess when an actor is just ancillary to another and select where to put it, do it... :P (It's certainly possible to make some guesswork. "Hm, this has the "Projectile" quality so I'll just lump it with the first weapon or monster that calls it" But that seems to me to be far too much work to implement and bugfix all the detection and logic system for this.)

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sun Aug 31, 2008 1:40 am
by Nash
It's another of those "I fail it" posts... but... what can this tool do that SLumpEd can't? I understand that this is simply a cmdline tool that extracts stuff out of WADs. I can already do that with SLumpEd?

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sun Aug 31, 2008 4:36 am
by Enjay
Unless I'm reading it wrong, it sounds like one of it's functions will be to take a WAD that is in the traditional WAD format and automagically export all the lumps, presumably using an appropriate directory structure, and package it all up as a Zdoom compatible pk3. Although it isn't the hardest take in the world, doing that manually with a big project can take a while and involve a few annoying intermediate steps.

And, by the sound of what people have been saying, it is planned to do one thing that Slumped can't - run on Vista without crashing. However, I neither use Vista (yet) nor Slumped so I can't really comment on that.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sun Aug 31, 2008 5:06 am
by Gez
Enjay wrote:And, by the sound of what people have been saying, it is planned to do one thing that Slumped can't - run on Vista without crashing.
You might have gotten SLumpEd and Doom Builder confused. SLumpEd does crash, but those crashes appear unrelated to OS and more caused by improper checks before doing certain operations. (I.e., it crashes when attempting to view some lumps which it cannot read as it thinks it can.)

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sun Aug 31, 2008 10:00 am
by Penguinator
Neither Slade or SLumpEd even start for me, and Slayer said that at least Slade was made on Vista itself. Apparently, my main computer is the only one using Vista that has trouble with Slade. :?

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Sun Aug 31, 2008 12:57 pm
by bagheadspidey
@Nash - transparency handling is a bit wacky in slumped. Although Gez was able to partially fix it, transparency still takes up one of the palette spots because of the way slumped is written. Doom patches have 256 colors plus transparency. Slumped treats patches as 255 colors plus transparency, which takes up a palette spot. This is incorrect.

Also as far as I know nobody has been able to compile slumped on linux, and it is apparently a pain in the ass to compile on windows as well.

Also, what enjay said.

Also, this will be able to work with multiple wads, merging them all into one pk3. This will be very useful for, say, dropping a bunch of bestiary monsters into a project, which is really the reason I'm writing this thing in the first place.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 2:23 am
by Unknown_Assassin
Enjay wrote:And, by the sound of what people have been saying, it is planned to do one thing that Slumped can't - run on Vista without crashing. However, I neither use Vista (yet) nor Slumped so I can't really comment on that.
SLumpED works for me in Vista.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 6:10 am
by leileilol
Nash wrote:It's another of those "I fail it" posts... but... what can this tool do that SLumpEd can't? I understand that this is simply a cmdline tool that extracts stuff out of WADs. I can already do that with SLumpEd?
Slumped can't assemble a wad from a batch file. We still have to rely on really-old-arse deutex to do that.
Unwad doesn't assemble of course, but its nice to have a new commandline tool that's not bogged by an interface.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 7:46 am
by MasterOFDeath
Could there by an option to extract sounds as WAV instead of FLAC?

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 11:35 am
by bagheadspidey
MasterOFDeath wrote:Could there by an option to extract sounds as WAV instead of FLAC?
Yes. Yes there could. This is the kind of response I was looking for.

I have a concern though - WAV is microsoft's format. It's probably heavily patented. Not that this probably matters, but it would be really nice to store it in a similar uncompressed format that's not proprietary. Does anyone know if a format like this exists?

There will probably also be an option not to do any conversion at all.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 12:23 pm
by Nash
Oh, in that case, then once cmdline WAD creation is possible, I can't wait to ditch deutex.

Re: [~85%] Unwad - a minimal wad convertor and extractor

Posted: Mon Sep 01, 2008 12:43 pm
by Rachael
bagheadspidey wrote:I have a concern though - WAV is microsoft's format. It's probably heavily patented.
If it ever was patented, I think it's safe to assume the patents have long wore off by now. WAV has existed for an excess of 16 years (I could be wrong about the exact year, but I remember playing with it in Windows 3.1). As far as I can see, other patents are being built USING .WAV technology doing other things.