WADUTILS v1.0 README for: INFO MAKEWAD BREAKWAD WALL2PCX PCX2WALL WALLVIEW PLEASE NOTE: Apogee(tm) and 3DRealms(tm) do not in ANY WAY support these programs; they are not the authors. PLEASE do not mail them any questions about this software; instead, direct all inquiries to the author, Derek Greentree, . Thank you! WADUTILS v1.0, is, of course, freeware! You may distribute these files as long as they are in their original form: complete, intact, and unaltered. The package includes: INFO.EXE, MAKEWAD.EXE, BREAKWAD.EXE, WALL2PCX.EXE, PCX2WALL.EXE, WALLVIEW.EXE, DOS4GW.EXE, HEADER.XXX, and README.TXT P.S. If you make external wadfiles with this and distribute them in a .RTC or .RTL level pack, please include the name of this package in the editor(s) used section of the author file(RT?_AUTH.TXT); make a simple programmer(me) happy. TOC {1} What are these programs? {2} The Resource Textfile {3} Building PWADs for use with new RotT levels(.RTLs) and COMM-BAT levels (.RTCs)! {4} About the Author/How to Contact the Author {1} What are these programs? INFO is a program which displays the information tables for a Rise of the Triad(tm) WADfile. Its usage is: INFO where is the name of a WADfile in RotT format(i.e. DARKWAR.WAD). INFO will pause at every new screen. When INFO pauses, press "Q"(or "q") to quit, or any other key to continue the listing. MAKEWAD is a program which will generate a RotT WADfile. Its usage is : MAKEWAD where is a resource textfile(see below) and is the name of the WADfile to be generated. MAKEWAD will also optionally take a fourth parameter. If you enter the letter "r" on the command line after , MAKEWAD will delete the resource after it builds it into the wadfile. BREAKWAD is a program which will decompose a RotT WADfile. Its usage is: BREAKWAD where is the name of the WADfile to be decomposed, and is a resource textfile(see below), which will be built upon running. WALL2PCX is a program which will generate a .PCX image from a RotT Wall file. Usage: WALL2PCX where is the filename of the wall to convert to pcx, is the name of the .PCX file to write, and is the filename of the palette to use in creation. This ought to be the palette contained in DARKWAR.WAD . Upon decompiling with BREAKWAD, this resource is named "PAL.XXX". PCX2WALL is a program which will generate a RotT Wall file from a .PCX image. Usage: PCX2WALL where is the name of the .PCX file to create the wall from, and is the filename of the wall to be created. WALLVIEW is a program which will let you view the walls contained in a WADfile. WARNING: WALLVIEW by default allows you to view 74 walls; if your WADfile has less(or more), WALLVIEW may crash if you attempt to view walls that do not exist! Usage: WALLVIEW Where is the name of the WADfile to read, and is the name of the palette to use if one is not found in the WADfile. Once WALLVIEW is started, press the "?" to see instructions. {2} The Resource Textfile This is a very simple textfile which tells MAKEWAD the number of lumps in the WADfile to be made, and the filename of each of those lumps. A lump is a file resource. For example, when RotT loads a texture called WALL1, this texture is a lump. The resource textfile has the following format: numlumps(N) filename1 filename2 . . . filenameN So, if you wanted to make a new WADfile with only 2 resources, and you wanted the data for those resources to come from the files STEVE.TXT and JOHN.TXT, then your resource file would look like this: 2 STEVE.TXT JOHN.TXT The resource textfile is very rigid. Comments are NOT supported, at least not in this version. Be sure that when you make your resource textfile you adhere to the format above, or you will get unpredictible results. BREAKWAD makes a resource file exactly as this format specifies. However, there are complications, namely : 1) RotT stores the id for their lumps as a string with 8 places; therefore, the extensions are automatically cut off files when they are made into a lump, and null characters are added to the first part of the filename. Therefore, for our example resfile above, a wad would be generated having two lumps with the id's(ignore the quote marks): "STEVE " and "JOHN ".(the spaces here are actually null chars) 2) On account of number 1, whenever you run BREAKWAD on a wadfile, the original extension of the files generated is unknown, so BREAKWAD filters out nulls and appends ".XXX". BREAKWAD will always use ".XXX" unless a file of the same name already exists. For example, in DARKWAR.WAD, the resource TSPHERE1 appears twice. BREAKWAD will write the first one as TSPHERE1.XXX, and the second as TSPHERE1.XXZ. Again using the sample WADfile described above, BREAKWAD would create two files, STEVE.XXX and JOHN.XXX . Also, the resource file generated would be: 2 STEVE.XXX JOHN.XXX The next version of these utilities(if there is one) should have a little smarter extension control. SPECIAL NOTE: Since the .RTS files used in Rise of the Triad and Duke Nukem 3D are, for all technical purposes, WADfiles, the utils can be used to make and break Remote Ridicule Files. {3} Building PWADs for use with new RotT levels(.RTLs) and COMM-BAT levels(.RTCs) First, a few guidelines: 1)Always include section headers in your WADfiles, such as WALLSTRT, WALLSTOP, etc. To make these simply take the sample one included in this package (HEADER.XXX) and copy it to the names of your section headers using DOS's type command. Ex: type HEADER.XXX > WALLSTRT.XXX will create a zero-length file named WALLSTRT.XXX. 2) Whenever you replace a wall, even if it is just one wall, your new WADfile MUST contain all 74 walls between the headers WALLSTRT and WALLSTOP, or RotT will not replace the walls succesfully; don't ask me why. Tutorial for creating PWADs: Text contained by << and >> is a command; you are meant to enter it on the command line. Step 1: Make a directory for all the resources that you are going to use. Step 2: Decide what types of resources you wish to replace, and create section headers by making them from the included HEADER.XXX file. If you are replacing walls, type: << type HEADER.XXX > WALLSTRT.XXX >> and << type HEADER.XXX > WALLSTOP.XXX >> Refer to the table below for headers for other data types. DATA TYPE | HEADER ------------------------------------------ Sounds in .VOC format | DIGISTRT / DIGISTOP Walls | WALLSTRT / WALLSTOP Elevators | ELEVSTRT / ELEVSTOP Skies | SKYSTRT / SKYSTOP Floors/Ceilings | UPDNSTRT / UPDNSTOP Songs(MIDI format) | SONGSTRT / SONGSTOP Step 3: Edit the resources as you wish. Step 4: Create the resource textfile; first, calculate the number of lumps you are going to have by taking the number of resources you are going to include plus 2 times the number of different data types you are using. For example, if you are editing only walls, then numlumps would be 76 : 2*(1 data type, i.e. walls) + 74 Walls = 76 Lumps If you are editing both walls and songs, say you are using 5 songs: 2*(2 data types, walls and songs) + 74 Walls + 5 Songs = 83 Lumps second, add headers for the different data types you are using. For example, if you are replacing walls, then after numlumps in your resource textfile put WALLSTRT.XXX WALLSTOP.XXX If you are replacing both walls and songs, put WALLSTRT.XXX WALLSTOP.XXX SONGSTRT.XXX SONGSTOP.XXX third, fill in the filenames between the headers: WALLSTRT.XXX WALL1.XXX WALL2.XXX . . { WALL3.XXX - WALL73.XXX } . WALL74.XXX WALLSTOP.XXX Step 4: Generate the WAD by using MAKEWAD. The SETUP utility distributed with RotT supports command-line option passing: so, to use both a new .RTC file and a new WADfile, one would type SETUP file mywad.wad (mywad is the name of your wadfile, duh) and then proceed through the menu system normally to use an alternate level file. NOTE: "SPECIAL" resources in DARKWAR.WAD PAL.XXX - This is the palette used in RotT LICENSE.XXX - This is the legal stuff for RotT(don't mess with it). WARNING: Feel free to change the file extensions freely. However, a reminder, if you change the file NAME(the non-extension part), then you are also changing its id in the WADfile. ---- Other files in the game are discussed in the file HACKROTT.COM, which I strongly suggest you read. <- Really, it is very good for beginning editors. {5} About the Author/Contacting the Author I am Derek Greentree, also the author of the RotT FAQ v3.0. I can be reached via email at derekg@icanect.net or via the WWW at http://www.icanect.net/~derekg/ Be aware that for the WWW site above you will need a frames capable browser. Miscellaneous technical info you probably don't care about: These programs were written in C and compiled with Watcom C/C++ v10.5, and they use Tenberry Software's DOS/4GW Protected Mode Runtime Extender. "And now the questions. Do I kill them? become their friend? Do I eat them? raw or well done? Do I trick them? I don't think they're that dumb! Do I join them? I guess that's the one." Rise of the Triad is (c)1995 Apogee Software Ltd. These programs are (c)1996 Derek Greentree. DOS/4GW (c)1990-1994 Rational Systems Inc. DISCLAIMER: Even though it is very unlikely, I cannot be held responsible for any damage caused by using these programs.