HEADER0103 (129K)


How to convert DOOM format PWADs to UDMF?




Important:

All files used during the conversion process must be in the same folder.




Note:
While it is possible to convert a DOOM format map to UDMF in one step, with GZDoom Builder or GZDoom Builder - Bugfix using Map Options (F2), you must be aware that only the map format is converted. The line special numbers are retained but not the line specials themselves, since they are different. So, for example the DOOM format line special 120:WR Lift Lower Wait would be converted to the UDMF line special 120:Radius_Quake.




The conversion, where line specials are preserved, is a two step process, each of which can be accomplished by a different method :

  1. the first step is to convert the Doom format pwad to G/ZDoom in Hexen format
    1. Window 7 Command Line (convoluted)
    2. Window 7 Command Line (easy with shortcuts)
    3. Window 10 Command Line
    4. Batch File (easy)
    5. ZWadConvGUI (easiest)
    6. GZDoom Builder or GZDoom Builder - Bugfix

  2. the second step is to convert the G/ZDoom in Hexen format pwad to UDMF
    1. Method 1: WAD2UDMF
    2. Method 2: GZDoom Builder or GZDoom Builder - Bugfix
    3. Revert from UDMF to G/ZDoom in Hexen format





Step 1




Download the file utils050999.zip from http://zdoom.org/files/utils/ and save to a folder, ie ZDconvert.
Unzip and find zwadconv.exe and zwadconv.txt.
Read zwadconv.txt.

Now you should have these files in the folder ZDconvert

zwadconv.exe, zwadconv.txt and the pwad to be converted which I named MyPWAD.wad

for example:

01 (12K)


The conversion can be done through the command line or through a batch file.


Note:
zwadconv.exe converts every map in a pwad in one step.

To know that a conversion was successful each MAPxx namespace of the new pwad will contain a BEHAVIOR lump.

namespace-d2-hex (7K)





Window 7 Command Line (convoluted)

To open the command line click on the Start button to open a context window like this

02 (120K)

then type cmd.exe in the Search programs and files bottom bar

03 (29K)

to open the command line window

04 (21K)

the prompt will, most likely, be different for your computer. Therefore we have to navigate the file system to the correct file location. This is done with the change directory command cd.. as below and type the zwadconv command line.

05 (29K)

Then press Enter to have the pwad converted

06 (35K)

Now find the converted pwad zdMyPWAD.wad in the folder.

go to top




Window 7 Command Line (easy with shortcuts)

The easy way to open the command line window in Windows 7 is with a key shortcut.

With the folder open which contains zwadconv.exe, zwadconv.txt and the pwad to be converted, which I named MyPWAD.wad, hit Shift+Rightclick, close to the files, to open a context window similar to this

07 (35K)

Clicking on Open command window here will take you immediately to the correct command line prompt.

08 (15K)

Now add zwadconv MyPWAD.wad zdMyPWAD.wad after the prompt

09 (24K)

hit Enter and find the converted pwad in the folder.

go to top




Window 10 Command Line

I have Windows 10 on my laptop, so the path for the folder is different from the Windows 7 steps above.

To open the command line window in Windows 10 is a lot easier.
With the folder open which contains zwadconv.exe, zwadconv.txt and the pwad to be converted, which I named MyPWAD.wad, hit Shift+Rightclick to open this context window

10 (7K)

Clicking on Open command window here will take you immediately to the correct command line prompt.

11 (3K)

Now add zwadconv MyPWAD.wad zdMyPWAD.wad after the prompt

12 (8K)

hit Enter and find the converted pwad in the folder.

go to top




Batch File

This works equally in Windows 7 and in Windows 10.

Create a text file with the contents

zwadconv %1 zdNew.wad

and save it as a batch file, ie convert.bat in the same folder with the other files.

Now drag the pwad to be converted on top of the batch file convert.bat to convert the pwad. The converted pwad will be written to the folder as zdNEW.wad. Rename this converted pwad if you want to.

Regardless of the success or failure of the conversion, a file convlog.txt will be written to the same folder.

go to top




ZWadConvGUI


GUI (21K)

The advantage of using ZWadConvGUI.exe is that the input pwad and output pwad can be in different folders.

  1. Click on Find Input Wad to browse for the pwad to be converted.
  2. Click on Set Output Wad to browse for a pwad name in another folder
    or type a pwad name in the bottom bar
go to top




GZDoom Builder
GZDoom Builder - Bugfix

While it is possible to convert a DOOM format map to Hexen format with GZDoom Builder or GZDoom Builder - Bugfix, via F2 (Map Options), only the map structure will be converted. If your map uses any linedef action special, none of those action specials will be translated to the Hexen format, they would have to be converted manually. Therefore it is still preferable to use zwadconv.exe instead.

go to top



Step 2




There are two possible ways to convert the DOOM in Hexen format pwad to UDMF. One way is to use WAD2UDMF.exe, which means again a choice of either using the command line or a batch file for the conversion. While this works quite well, it leaves many unnecessaary vertices behind, which need to be cleaned up with GZDB/GZDB-BF.

The second way is to use GZDoom Builder right away, which is easiest and most direct.

To know that a conversion was successful each MAPxx namespace will have these lumps.

namespace-hex-udmf (18K)





Method 1: WAD2UDMF

Use WAD2UDMF to convert a pwad in ZDOOM (Doom in Hexen) format to UDMF format.

Usage: wad2udmf [switch] [value]...
================================
-h displays this help dialogue
-input or -i binary wadfile to convert
-output or -oconverted udmf output file
-maps specified maps to convert

It is best to use a batch file, for example:

wad2udmf -i zdMyPWAD.wad -o uMyPWAD.wad

If there are more maps in a pwad, then the batch file should reflect this, for example:

wad2udmf -i zdMyPWAD.wad -o uMyPWAD.wad -map01 map02 map03 ...

After the conversion, the map(s) may require some postprocessing. For some reason, WAD2UDMF introduces many extraneous, connected and unconnected vertices. To get rid of those vertices open the map with GZDoom Bulder or GZDoom Builder - Bugfix, run the Map Analysis tool (F4), delete offending vertices and save.

go to top




Method 2: GZDoom Builder or GZDoom Builder - Bugfix

Open the converted to Hexen format pwad with GZDoom Builder or GZDoom Builder - Bugfix.

With the map open, select F2 (Map Options) and from the menu select either ZDoom: Doom2 (UDMF) or GZDOOM: Doom2 (UDMF).

Then hit OK, and at the next window

13 (97K)

hit YES.

The one line special which is not converted is 121:Line_SetIdentification as there is no equivilant in UDMF. If it was used, then conversion of the various parameters must be done manually in the Linedef window.

While GZDB/GZDB-BF is still open, it is advisable to check for any possible errors, which may have occurred, with F4 (Map Analysis).

Save the map

go to top




Revert from UDMF to G/ZDOOM in Hexen format

If for some reason it becomes necessary to convert a map in UDMF to Doom in Hexen format, GZDB/GZDB-BF can do that as well through the Map Options (F2) window.

Be aware though that the UDMF special settings will not be retained.

go to top



Happy fragging.
Kappes Buur, July 02 2016