Chapter 9

                      Utilities and add-ons


9.1  Editing utilities


This section contains all programs which can be used in editing
somehow.

9.1.1  BUILD

The BUILD program is currently the only Duke3D .MAP editor in
existence. Personally, I don't think that it will be replaced
anytime soon :)

Documentation to it are in the file BUILDHLP.EXE (press [F2]
while viewing and give a filename to create an ASCII file instead
of printing all that stuff) and in this FAQ.

I hear somebody is working on a new .MAP editor, but it's for
Windoze95 (ugh).

9.1.2  EditArt

EditArt is also included on the Duke3D CD and allows you to
change the graphics included in Duke3D. If effect, it allows you
to extract/import graphics (use something else to actually edit
the graphics).

You'll first have to extract the .ART files using the command
KEXTRACT DUKE3D.GRP *.ART

Watch out, though: this will create the files TILES000.ART to
TILES014.ART, taking up nearly 15MB of space on your drive. If
you just want to change part of the graphics, try extracting a
single .ART file:
KEXTRACT DUKE3D.GRP TILES000.ART

Documentation to EditArt are in the Build Docs; here are just
some notes:

9.1.2.1  Changing graphics

To extract a tile from a .ART file to a .PCX file, use [PgUp] and
[PgDn] to select the tile. You can also use [V] or [G] (Goto).

Press [F12] to create a CAPT0000.PCX file in your directory,
containing just the tile.
Edit this tile with your favourite graphic tool. While EditArt
can also edit graphics (as the name suggests), I prefere to use
something like NeoPaint or somesuch. The guys at 3DRealms used
Dpaint, so make sure you save as an 8-bit 256 color PCX,
preferably in 320x200 format.

Then go back into EditArt, select the tile again and press [U] to
import the .PCX file. After selecting the image, use the mouse to
drag the rectangle over the whole image (grabbing all of it) and
press [Enter].

Voila! Now all you have to do is keep the changed .ART file in
your Duke3D directory, and the game will load the new graphics
automatically on starting.

9.1.2.2  Adding new graphics

Adding new graphics is fun and easy: simply modify the
TILES0014.ART file.
It contains only a single tile, called 'user art'. You can
replace this and all others in the .ART file using the above
method.

User art starts at tile number 3584.

Now you can access the graphics like any other tiles in BUILD.

9.1.2.3  *Using DOOM I graphics*

Adding DOOM graphics is less easy - here's a step-by-step account
on how to do it (there's probably an easier way, but I haven't
found it yet):

    *  Extract TILES0014.ART from DUKE3D.GRP, as explained above.

    *  Back up your PALETTE.DAT and NAMES.H files, preferably by
       copying them in their own directory (I use the same one I
       backup my .CON files into).

    *  Convert the DOOM graphics (you'll need the original
       DOOM.WAD):
       WAD2ART D:\GAMES\DOOM\DOOM.WAD
       (You'll find WAD2ART in the \GOODIES\WAD2MAP directory on
       your Duke3D CD)
       This'll take a while, but you only need to do it once.

    *  You now have three new files in your directory: NAMES.H,
       PALETTE.DAT and TILES000.ART.

    *  Call up EditArt and select the graphics you want to
       convert (tiles start at number 462). Press [F12] to make a
       screendump of each.

    *  Rename TILES000.ART to something else in case you want to
       convert more DOOM art later. Best to place it in its own
       directory, together with the new NAMES.H and PALETTE.DAT.

    *  Restore your original NAMES.H and PALETTE.DAT files.

    *  Call up EditArt, select an empty tile and import the DOOM
       .PCX screens as explained in 'Adding New Graphics' above.

    *  The sprites are going to need a fair amount of retouching.
       For example, I replaced all octabrains with cacodemons
       only to find that they shade real poorly when moving into
       a lower sector :(

9.1.2.4  General notes

    *  All files must be 320x200x256. So even if you have an
       64x64 tile, you'll have to stamp it into a 320x200 image
       to import it properly.

    *  If one graphics format doesn't work for you, try another
       one. Personally, I have the least problems using BMP.

    *  Tiles with a 2^n size (like 16, 32, 64, 128, 256) seem to
       make the least problems when importing.

    *  Note possible palette problems. While EditArt can convert
       a palette for you, it usually sucks, so do it yourself
       before loading the image.

9.1.3  Wad2Map utilities

The Wad2Map programs (included on the Duke3D CD) allows you to
convert your DOOM .WAD pages to .MAP format, as well as
converting the graphics.
You will need the original DOOM.WAD file (called an IWAD file).

I very highly recommend copying the WAD2EXE directory into its
own subdirectory on your hard drive, as you'll be overwriting
some of your files (PALETTE.DAT and NAMES.H) from Duke3D
otherwise.
In any case, make a backup of your original PALETTE.DAT and
NAMES.H files.

Also, don't forget to remove line 733 from DUKE.TXT as the
conversion won't work well with it (the cautious amongst you can
just comment it out - put a semicolon (;) before it).

The utilities consist of two parts:

9.1.3.1  WAD2ART

Converts the DOOM textures (I've only tried this with DOOM I so
far) to TILE*.ART format.

Usage:
WAD2ART D:\GAMES\DOOM\DOOM.WAD
(or wherever your DOOM.WAD file is).

This will create three files in your current directory:

TILES000.ART   A huge file containing all the DOOM graphics.

NAMES.H        The names of all the new tiles.

PALETTE.DAT    The original DOOM palette.

9.1.3.2  WAD2MAP

Here's what we all want: a program to automatically convert the
DOOM maps to Duke3D maps!

Unfortunately, the system crashes when trying to convert a PWAD
(add-on WAD file) for DOOM. We get around this by using DEU (Doom
Editing Utility) or a similar tool to change the first level of
the original DOOM (the IWAD) to the PWAD. To find out how to do
this, read the DEU docs.

There are two ways to make a .MAP from a .WAD: with conversion
(trying to convert the DOOM walls and objects to Duke3D walls and
objects - the recommended method) or without conversion (for
those brave souls who want to try to run everything on DOOM
graphics and can face reprogramming every single sprite).

With conversion:
WAD2MAP D:\GAMES\DOOM\DOOM.WAD E1M1 DUKE.TXT

Without conversion:
WAD2MAP D:\GAMES\DOOM\DOOM.WAD E1M1

The DUKE.TXT file is an ASCII file listing the things to be
converted. You're very welcome to mess around in it and try to
improve it. If you create a perfect one, let me know!

Note that there's still plenty of work to be done on a fully
converted .WAD. You'll have to load it into BUILD and check every
single object, sector, texture (the HOM is back!) and wall.
I've had some walls crash on me after conversion, and I haven't
yet found out why - seems to be caused by sprites hanging about
in midair.

If you did the WAD->MAP without conversion, you'll have to use
DOOMs PALETTE.DAT (automagically created for you) _and_ you'll
have a lot of work in front of you: not only do none of the doors
etc work, but you'll have to shift the graphics for the sprites
as well.
But you'll be able to play DOOM maps with DOOM textures in Duke3D
(wheeee).
9.2  Future add-ons


This section contains a list of vapour-ware :)
Both software users are wishing for and projects currently in the
making are listed here.

9.2.1  Add-on software wish list

Attention programmers! Here is a wish list, created by the DN3D
players, of add-on software that should be made for DN3D. If you
would like to make an addition to this list, please send me E-
mail.
Additionally, if you are planning on creating one of these
utilities, tell me, and I'll move it to the "Add-on software in
the making" chapter.

    *  A DEU-like pre-editor for the rough work (to be fine-tuned
       later by BUILD.EXE). Ideally, this preeditor would be
       network-capable to allow several people to work on a level
       simultaneously.

    *  Automatic .CON file patcher to allow easy inclusion of
       .CON modifications.

    *  Lots of additional graphics, allowing the building of
       realistic 'normal' street and house maps.

    *  A program to organize and keep track of additional .MAP
       files. Ideally, this would allow us to enter a description
       to each map, find a map quickly and launch it straight
       into Duke3D.

9.2.2  Add-on software in the making

This chapter tells about add-on software which is being currently
worked on.
If you are working on something that is not in here, please send
me E-mail so I can put it in.
In this section, you can also request help on creating some add-
on software.