Page 1 of 1

Working UDMFConvert for Doom maps

Posted: Sat Mar 17, 2012 5:51 pm
by hfc2x
Hi, peeps. I've taken some time to kinda "fix" this program that some may know, It's called UDMFConvert.
The problem with it (if you can call it like that) is that the utility that converts Doom maps into UDMF didn't work as I would expect. What it did was to transform all the data of a Doom map to a text file, which is okay, but it did convert the map into the Doom namespace (and not ZDoom), meaning that LINEDEF and SECTOR specials were just passed and not converted. Although the map converted this way is perfectly playable, loading it into Doom Builder 2 (the only map editor with UDMF support) would cause headaches.
Since it was easier to copy a map manually and then change Line and Sector specials by hand, there wasn't much use to this program. So, I took some liberties and added the ability to transform every Line and Sector special from Doom to UDMF, so you don't have to do it manually anymore. Note that it doesn't convert BOOM specials yet, but if anyone wants to do it, so be it.

Here is the Win32 binary

And the incredibly messed up source:
http://www.mediafire.com/?pia7igzc8cp5ok3


To convert a map from Doom format to UDMF, the usage is as follows:

Code: Select all

doomconvert -w WADFILE.wad MAPNAME TEXTFILE.txt
For example, to convert E2M4 from Doom, you should do this:

Code: Select all

doomconvert -w doom.wad E2M4 whatever.txt

Then, open your generated text file and in the first line, change 'namespace = "Doom";' to 'namespace = "ZDoom";'. After that, open a resource editor (preferrably Slade3) and create a new WAD document. Inside it, create three lumps in this order:
-Your map name (example: E2M4)
-a TEXTMAP lump (and inside of it, paste everything from the generated text file)
-and finally an ENDMAP marker.

Save it and the map is now loadable in Doom Builder 2, with every Line and Sector special already converted to their UDMF equivalent.

BTW, I'm a n00b into C++, that's why the source is a mess now. :lol:

Re: Working UDMFConvert for Doom maps

Posted: Sat Mar 17, 2012 6:16 pm
by Gez
Interesting.

That said, the main point of doing a conversion to the Doom or ZDoomTranslated namespace is that you don't have to bother with the translation yourself. If you hardcode something for Doom values, you run into a few problems. First, the conversion might be simply wrong. Secondly, it can't be used for a mod which would require a different set of translation. For example, it's for Heretic or Strife. Or it's [wiki]Caverns of Darkness[/wiki].

Still, I support it'll be enough for most people's needs.

Re: Working UDMFConvert for Doom maps

Posted: Sat Mar 17, 2012 6:33 pm
by hfc2x
Gez wrote:If you hardcode something for Doom values, you run into a few problems.
Yeah, that's why I only uploaded the precompiled DoomConvert executable. The Modifications I made to the source were rather hasty and uncautious, so if you compile the other binaries, there WILL be problems.
Anyways, maybe when Doom Builder 2 supports the UDMF namespaces other than ZDoom, I may try and fix this mess.

Re: Working UDMFConvert for Doom maps

Posted: Sat Mar 17, 2012 6:50 pm
by Gez
Well, it already does, technically; all that's missing is a configuration file for it. Which nobody made since there's no strong incentive for creating one as long as there aren't other ports than ZDoom implementing UDMF.