Copyright: WinTex 4.1 (c) 1995 Olivier Montanuy


Welcome
 Welcome to WinTex 4.0

WinTex is an editor for the special configuration files (.WAD) of DOOM, DOOM2, and HERETIC.

Introductory

Presentation of Wintex.

How to Install WinTex.

Thank list of WinTex.

Please Register  WinTex if you like it.

Tutorials

Tutorial on Textures editing.

Tutorial on Floors and Ceilings editing.

Tutorial on Sprites editing.

Tutorial on Pictures editing.

Tutorial on Level editing.

Examine a WAD file with WinTex

WinTex will let you browse almost every entries in the WAD files.

View pictures and textures, listen to sounds, view the level maps, the level BSP tree nodes, the level Reject data, and most raw data lumps.

Editing a WAD file with WinTex

WinTex will let you Edit and Test WAD file in a very convenient way:

- modify graphics, sounds, musics, textures.

- cut and paste entries between WADs

- reorganise your WADs.

Modifying levels with WinTex

WinTex also help you edit level maps:

- Modify the level maps, by using one or more editors of your choice.

- Rebuild and check the BSP tree nodes.

- Rebuild the reject data and make special effects (like blind monsters)

Combine two or more WAD files with WinTex

WinTex will let you Combine two or more existing WAD files into one.

Especially suitable to combine WADs that redefine sprites, flats or textures.

Enables you play  DOOM wads under Ultimate DOOM.

Safely modify the main game file with WinTex

WinTex let you Modify the game files of DOOM, DOOM2 or HERETIC, so that your favourite WADs permanently become a part of the game.

Of course, WinTex will restore the game files to their (exact) original state whenever you want.

Data Utility License

This program comes with no warranty whatsoever. Intensive testing and careful coding has made it reliable enough, but no Windows application can pretend to achieve perfect reliability. No liability accepted.

DOOMtm and HERETICtm are trademarks of Id Software, Inc.

The DOOM and HERETIC characters and the Id Software logo are trademarks of Id Software, Inc. DOOM Copyright (c) 1993. Id Software Inc. All rights reserved.

This utility product is not a product of Id Software, Inc. and has not been approved by Id Software, Inc. Id Software will not provide technical support for this product.

The purchaser of this utility product may not distribute for money or other consideration any software data created and/or modified by the use of this utility product.


Registering WinTex

WinTex is user supported!

That means that if you like this tool, and would like it to continue improving, you are strongly encouraged to register WinTex.

Your money will be used to buy new development tools, and maybe to hire people to code parts that I don't have time to code (or that I'm not able to code). It will also be used to port WinTex to other environements (that doesn't depend on me).

And more importantly, it will be used for user support. Connection to Internet or Compuserve is not free for me, even late at night!

Why is WinTex Shareware?

I first intended to release WinTex 4.0 as freeware, like my previous DOOM editing tools (WinTex 3.41 and DeuTex). But WinTex 4.0 is a very big improvement over the two previous tools. It has cost me almost 4 months of work, in addition to my job. Also, I know that I will need much better tools for Quake editing: Visual Basic is not enough.

Also, WinTex 3.41 was a bitch to support, because it looked cool, but wasn't real easy to use.

I received lots and lots of mails, and people kept asking the same basic two or three questions. Some even thought they deserved immediate help, even though they were using a freeware tool. Well, now I will be able to fund the user support, I hope!

You don't feel like registering?

Well, enjoy WinTex as much as you want! There are no limits, no time constraints on this version of WinTex.

But keep in mind that with a small contribution you could help make this tool even better and finaly even more enjoyable for you.

Also, you're missing a good opportunity to register WinTex while it's still real cheap.

The next versions will be better, but they can't possibly be cheaper!

And maybe I will not keep the cool registration policy above ;-)

Registration

Via Compuserve

GO SWREG

Select Register Shareware.

Enter program identification: 7683  (for WinTex 4.0).

Via mail

Send your fee, or rather your enthousiastic participation to WinTex, in a self-adressed letter to the following address:

Olivier Montanuy

9, rue du Moulin

Ploumanach

22700 Perros Guirec

France

Please take just a few minutes to tell me what you think about this program, what could be modified, what should be added, what you may intend to do with it...

Don't forget to include your Name and  Address so that I can keep you in my records.

It would be cool also to tell me more about yourself! It's always more gratifying to be working for kind peoples than for some anonymous net junky!

For the moment, registration is only possible by sending directly to me around 10$, in the currency of your choice (preferably a common currency). I can't take checks or credit card, for lack of any relevant material. And the fee is too low to justify such means.

On Line (Compuserve)

On Compuserve, go SWREG and look for WinTex.

Compuserve didn't send me the registration info yet.

Note

If you are opposed to French atomic tests in the Pacific (in other words, if you are a normal and sensible person) please write explicitely in your mail or your e-mail that you deny the French government any right on the money you are sending.


 About WinTex

How can WinTex help you edit DOOM and HERETIC?

WinTex is one of the best WAD file browsers and editors for DOOM, DOOM2 and HERETIC.

WinTex is a tool to create or modify the wall textures, the pictures, the sprites, the sound effect, the musics, the floors and ceilings that are used by DOOM and HERETIC.

This tool is not a level editor: there are lots of very good level editors already.

With WinTex, you can concentrate on your creations, and forget about most of  the tricks and bugs of DOOM editing.

WinTex contains all the features needed to create WAD files with custom textures, and to generate and install WAD files with modified sprites and floors/ceilings.

Don't forget WinTex is shareware, register if you like it to become even better.

How comes WinTex makes editing easy?

WinTex is an integration tool. It is not a graphic editor or a sound editor by itself. With WinTex, you will use your favourite graphic editor or sound editor, because WinTex takes common BMP picture, WAV sound, or text files, and converts them to the special DOOM format.

WinTex also help you organise that data, so that DOOM can use it correctly.

WinTex includes features that are specific to DOOM, like Texture editing, Name identification, Reject map editing, Filtering of the different entry types.

WinTex handles Levels, Lumps, Sound, Textures, Graphics, Sprites, Patches, Flats, Music.

Moreover, all editing under WinTex is reversible. Just press 'restore WAD' and the WAD you had been modifying drops back to it's previous state. Of course, this waste data, so WinTex has a WAD optimiser to create WADs with no wasted data.

Last, WinTex will help you use some usefull but cryptic tools available on the net, like the Reject builders, BSP builders and end screen editors. There are many DOOM and HERETIC editing tool around, each specialised in it's own domain. WinTex is here to make them work together efficiently.


 Thanks list

All the WinTex was written by me only (took me about 6 months), however, it would never have been completed without the help of other kind people:

People who helped designing WinTex

Avery Andrews (tutorial on texture and flats)

Drake O'brien (tutorial complements).

Graham Evans (tutorial on sprites)

Valery Tsyplenkov (critical technical help).

Kevin McGrail (HevKev) (help file of DeuTex).

Renaud Paquay, (technical help)

Support of WinTex

Avery Andrew,

Steve McCrea,

Jens Hykkelbjerg,

Marc-Andre Bissonnette,

Jean Francois Fortin,

Dan Teeter,

Tony Muray,

Dr Sleep.

and many others I will list when I find the time to sort my mail box!

WinTex coding help

Matt Fell (DOOM specs)

Mark Mathews (learnt me how to produce clean and portable code)

Denis Moeller (his NWT tool was a good motivation to improve WinTex)

Elias Papavassilopoulos (DOOM technical tricks)

Robert Fenske, Jr and Jens Hykkelbjerg (err.. for future versions...)

Cryptic thanx

A great thanx to the Vandal, the Caveman and the Hacknight for their continued efforts at delaying the final release of WinTex 4.0!

Special Thanks to AOL (not!)

A special thanks to all the guys from AOL that still didn't tell me my program was lame, slow, didn't work, didn't make coffee, wasn't easy to figure out, crashed they machine, destroyed their game, stole their money or told to Microsoft that they had pirated programs.

Guys, you've been very kind to me!

But please tell the other 20,000 that they should behave like you did...


 Informations about WinTex

First, the name: WinTex is named that way because it's a windows version of DeuTex, my previous freeware tool. DeuTex was named that way because it was first derived from DEU (like many other DOOM tools) and originaly dealt with Textures only.

Thus, the name WinTex is now a complete nonsense. Well who cares about the name?

The clarity and stability of the code is all I bother about!

Visual Basic code

The interface of WinTex, named WINTEX.EXE, was made with Visual Basic 3.0 for Windows 3.1.

Visual Basic allows very fast prototyping, and sometime fast development... well, that is, when it's misfeatures don't require two weeks of additional coding.

Future versions of this WinTex should run without Visual Basic, because it loads the panels too slowly, and use too much memory.

C code

All the serious work is in fact coded in C.

The library LBWINTEX.DLL contains all the compiled C code.

Using C rather than Visual Basic made this tool smaller, less prone to crashes (surprising, no?) and of course much faster. Also, object-oriented techniques have been used in the C code, despite the fact that C is not object oriented (I don't trust C++ and never will).

External Tools

WinTex 4.0 does not rely on my DeuTex tool for DOS anymore.

This is the main reason why it is so much easier to use than WinTex 3.41.

WinTex still uses my DeuSF tool, because I felt that operations like Merge, Join and App were safer in DOS than in Window, because those operations modify the main WAD.

WinTex by itself will never modify the main WAD.

Also, DeuSF has to be distributed with WinTex, since it is used to install some special WADs.


Installation of WinTex
 Installation and Setup of WinTex

Installation Steps

1/ Install WinTex on your computer.

2/ Configure WinTex for your favourite Bitmap, Wave and Text editor.

3/ Configure WinTex for use with your favourite level editor.

4/ Configure WinTex for use with your favourite WAD tools.

Additional Informations

Most of the DOOM related tools are not designed for Windows, so it will be a bit more complex.

But you may leave this for later: When you will need an external tool, WinTex will prompt you for the name of the executable.

In case of problem you can directly edit the WinTex.INI initialisation file.

If you're a beginner, you probably should probably let this wait.


 Installation of WinTex

1. Make sure you have VBRUN 300.DLL

 This is a file all Visual Basic 3.0 program need.

If you already used a Visual Basic program, you probably have it. Otherwise, it's available on Internet (ftp.microsoft.com), Compuserve, AOL, Prodigy or every software BBS.

2. Create a directory for WinTex and put all the WinTex files there

This directory must be readable and writable, so it cannot be on CD-ROM.

This directory should contain:

 wintex.exe, the VB executable, that makes WinTex so cool (and so slow with windows).

 lbwintex.dll, the C code that makes WinTex so fast with WAD stuff.

 threed.vbx, some ugly code used for so-called 3D graphic controls.

 deusf.exe, a tool WinTex sometime needs (it's a small version of DeuTex).

 wintex.ini, an automatically generate file that contains various settings for WinTex.

3. Create a temporary directory on your system

WinTex needs to store some temporary files to disk, to exchange data with other tools. Having a temporary directory is a good way to avoid making a mess in the WinTex directory.

Your temporary directory should be C:\TEMP or C:\TMP. WinTex will detect if the environement variable TEMP or TMP is set, and act accordingly.

If that doesn't work, then from withing WinTex, in the menu Option, click Temp. Directory and

select the directory of your choice.

4. Launch WinTex

Just double-click on WinTex.exe.

You can use many WinTex at the same time, but it's completely useless since WinTex can edit many WADs at the same time.

The WinTex DLL can only handle 16 WADs at the time, but I don't think it's a limitation.

It can be increased in future versions, if necessary.

5. Select a game

For instance, assume you want to use WinTex on DOOM2.

When you start WinTex, the WinTex main window appears.

There you will notice a panel named main IWAD file in the upper part of the window.

This panel contains a few buttons. Click on button DOOM2 for instance.

WinTex will ask you the name of the directory containing DOOM2.WAD and DOOM2.EXE.

For instance, it could be C:\DOOM2.

If you give an invalid directory, it will be ignored.

You cannot use WinTex if you don't own DOOM, DOOM2 or HERETIC.


WinTex INI file
 WinTex defaults (INI file)

Contentes of  wintex.ini

The WinTex .INI file contains all sort of information that are specific to WinTex. It is not recommended to fool around with this, because I'm not sure WinTex will appreciate.

However, there are a few section that store the name and command lines of the Tools used by WinTex. These command lines are used to send precise informations to the tools.

Do not fool around with them, unless you know what you're doing.

[Tool]	contains the command line of the basic tools

[LevelEdit]	contains command lines for the DOOM level editors

[RejectEdit]	contains command lines for the level reject data builders

[NodeEdit]	contains command lines for the level node data builders

[ExeEdit]	contains command lines of DeHacked and HHE, the .EXE editors.

Explanations of all placeholders in the command lines

The command lines are built with placeholders (or, variables), that represent names that are subject to change. For instance %WAD% represent the name of the WAD file edited, and of course it changes each time a given tool is called.

Placeholder	Represents	Exemples
%IWAD%	.WAD file, main WAD of the game.	doom2.wad heretic.wad
%GAME%	Name of the game	DOOM2 HERETIC
%WAD%	.WAD file edited, containing just one level in.	e3m2.wad   trinity.wad
%RWAD%	same, but without .wad extension.	e3m2    trinity
%LEVEL%	Level edited	e3m2 map01
%TEXU%	.WAD file, containing custom textures or flats.	texture.wad  flat.wad  custom.wad
%OLD%	.OLD file, that was previously a .WAD.	e2m3.old
%WADED%	WadED game indication	-1             (for DOOM) -h             (for HERETIC)
%EDMAP%	Edmap level indication	/M:E2M3   (for E2M3) /M:01        (for MAP01)


Setup of basic editing tools
 Setup of basic editing tools (BMP, WAV, TXT)

For each basic type of file, WinTex will ask you what tool you want to use to edit it.

See the table below for the list of basic file types and suggested tool.

Select the executable of your editing tool

WinTex will interrogate WIN.INI, section [Extensions], to know what are your favourite Text, Bitmap and Wav editors.

If WinTex finds such a tool, it will ask you if it can use it.

If you reply no, WinTex will let you select the your favourite tool (point to the .exe file).

Command Line

Then WinTex will ask you what is the command line for your tool.

By default, WinTex assumes the command line is %FILE%. Don't be scared by this strange %FILE% name. It's only a placeholder for the name of the real file that will be edited with the tool.

If your tool is a standard windows tool, like pbrush, mplayer, winword,... just press OK.

If your tool take some special option in the command line, just write this option.

For instance, if the the tool needs the option -file, then write -file %FILE% for the command line.

Suggested Tools

TXT	text files, in DOS or Unix formats.	Megaedit (a shareware) Any plain text editor, unlimited in size Notepad.exe (if you have nothing else)
BMP	bitmaps, 256 color, not compressed.	PSP30.EXE (Paint Shop Pro 3.0, a shareware) Pbrush.exe (if you have nothing else)
WAV	wave sounds, mono, 8 bits, not compressed.	WHAM.EXE (Wave Hold And Modify, a shareware)  Soundrec.exe (if you have nothing else)
LMP	lump of data.	PV.EXE (ProView for Windows, a shareware) Any Hex editor will do ;-)
SCR	DOOM end screen data.	TED.EXE  (TED12.ZIP on all DOOM ftp sites) ENDOOM.EXE (ENDOOM.ZIP on all DOOM ftp sites)
MUS	DOOM Music.	MusPlayer (MUSPL165.ARJ on all DOOM ftp sites) MUS2MIDI.EXE (to convert to midi)
MID	MIDI Music.	Not supported yet :-(


Setup of Level Editors
 Setup of Level Editors for use with WinTex

Wintex is not a level editor: rather, it is meant to be used as a complement to existing level editors.

When you view a level map with WinTex, you can call your favourite editor on that level, modify anything you want, then reload it into the WAD file edited by WinTex.

Selecting your favourite level editor

In the Level Editing panel of WinTex, in the Level Edit menu, there is a sub-menu where you can select the editor you intend to use.

When you will first try to use this editor, WinTex will ask you to point to the executable (.exe) of this level editor.

For example, with WinDEU, you will point to WINDEU.EXE.

Particularities of your favourite level editor

There are many level editors around, each with it's own particularities. Most have not been designed to be called by an external tool like WinTex.

WinTex tries to cope with the most common ones (at least the versions I know about), by using either a specific command line, or, for the windows-based editors, by writing a specific .INI file.

Despite I checked those command lines, you may have to tweak a bit with those, if the editor doesn't work the way it should.

This command line contains options, like -file, -main, -w, and also strange placeholdders, that are filled by WinTex when it calls the editor.

Example of command line: WinDEU

The command line for WinDEU (or DEU) under WinTex is:

windeu -w %IWAD% -file %TEXU% %WAD%

This means that when calling WinDEU, WinTex will send something like:

windeu -w doom.wad -file texture.wad  e2m3.wad

More information about the placeholders, see the format of the WinTex INI File.

Recomended level editors

It's very difficult for me to recommend DOOM editors, because they all have lots of qualities, but also lots of bugs. The good editor is the one you manage to use.

That's why WinTex attempts to support so many of them.

Good editors include, in no special order:

DOS:	DEU 5.3 (not 5.21), DCK, EdMap (fast), DeeP/HeeP, WadEd.

Windows:	WinDEU, DoomCAD (slow on 486), EgoEd (slow on 486!), WadAuth

The rule is not very funny:

- If it's Windows, it has some chances to be bugged (because of Windows)

- If it's Visual Basic, it's slow. (slower than WinTex, which is 80% C code.)

- If it's DOS, it is lacking memory.

- If it's DOS extended (Borland DPMI) it may crash or lock your PC, under Win95.

- If it's DOS extendeed (GO32) it may need EMS, and bring you trouble under Windows.

All these programs are available on the DOOM ftp site (ftp.idsoftware.com, ftp.cdrom.com and mirrors), on CompuServe ACTION forum, and on AOL.


Setup of WAD tools
 Setup of WAD tools for use with WinTex

Select your favourite tools

WinTex doesn't (yet) include a BSP node and Reject map builder.

It will never contain a .EXE editor, because this is not legal to modify executables ;-)

Instead, it let you use your favourite BSP node and Reject map builders (there are many of them) and your favourite .EXE editor (well, actually, there is only one: DeHacked/HHE by Greg Lewis).

Node and Reject builder

The first time you use any such tool, WinTex will ask you where the executable lies.

Then it will propose a command line for the tool. This command line may not be right, because there are so many tools and so many versions, so you will have to tweak a bit.

DeHacked

One exception is DeHacked: WinTex only supports DeHacked and HHE versions above 2.3, because you don't want to use the versions below, they have bugs ;-)

DeHacked 3.0 or more is recommended, since even version 2.3 still had some bugs.

Example of command line: RMB 2.1

The command line for Reject Map Builder under WinTex is:

rmb  %OLD% %WAD% NOMAP

This means that when calling RMB, WinTex will send something like:

rmb  e2m3.old e2m3.wad NOMAP

More information about the placeholders, see the format of the WinTex INI File.

Recommended tools

This is my own opinion only. For BSPs, it's based on examination of the code, when available.

For the other tools, it's based on more remote knowledge of the way they work.

There are some tools that I may not know about, so don't trust this too much.

Node builder	Good: Fast and Fair: Fair: Not good:	Warm 1.4, DEU 5.3 (Zen?) DeepBSP (from DeeP) ID BSP BSP 1.2, DEU 5.21, DCK 2.3
Reject builder	Best: Fast: Not good:	RMB 2.1a Warm 1.4 Reject
EXE editor	Doom, Doom2: Heretic:	DeHacked 3.0 HHE 2.3

All these programs are available on the DOOM ftp site (ftp.idsoftware.com, ftp.cdrom.com and mirrors), on CompuServe ACTION forum, and even on AOL.


Browsing WAD files
 Browsing WADs with WinTex

You want to take a look at the contents of a WAD file? Easy!

1. Select a game

From the main WinTex window:

In the panel Main IWAD File choose the game you are interested in.

For instance, for DOOM2, press on button Doom2.

2. Select the WAD file to browse

From the main WinTex window:

In the panel Pwad to examine or modify, select the relevant directory, then click on a WAD file in the list. Only Wad files are listed. Then click on button Browse PWAD on the left.

The WinTex wad editing window pops-up. You can view the WAD, but not modify it.

3. View ordinary entries

In the WinTex wad editing window, just click on the entry of your choice.

WinTex will display it as text or picture, or play it on your soundcard.

4. View Wall Textures

Here is how to view the  List of Textures defined in the WAD file.

5. View level maps, BSP nodes and REJECT data.

In the WinTex wad editing window, click on menu Advanced | Edit levels.

The WinTex level editing window will pop-up.

If your WAD contains levels, you will see those level appear in the list at the left.

It might contain names like MAP01 or E1M2.

Click on one of these levels. The level layout will appear.

Click on the button Node, the nodes of the BSP tree will be displayed.

Click on the button Reject, the reject data will be displayed.

Click on the button Sides, the wall sides in the level map will be displayed.

Right Click to zoom in, press Shift and Right Click to zoom out.

Maybe now you want to know how to modify the levels.


Browsing the list of wall textures
 Viewing the Textures

In the WinTex wad editing window, click on menu Advanced | Edit Texture.

The WinTex texture editing window will pop-up.

This window contains a list of textures, on the lower left part.

Click on any texture in the list of textures, and it will be displayed.

Maybe now you want to know how to modify the textures.


Browsing nodes of the level BSP tree
 Viewing the nodes of the level BSP tree

In the WinTex wad editing window, click on menu Advanced | Edit Levels.

From the Wintex level editing window, select a level and press on button Node.

One node is examined at the time:

- The node split line is displayed in Yellow,

- The right branch is displayed in Green,

- The left branch is displayed in Red.

- The part of the tree that is out of the node is displayed in Grey.

If you click in the Green part, you jump to the Right child node.

If you click in the Red part, you jump to the Left child node.

If you click in the Grey part, you go back in the node tree.

Note: If you don't know what a BSP tree is, just click around and it will soon become fairly intuitive for you. BSP is a short of Binary Space Partition Tree, a structure that makes the rendering of hidden faces much faster.

See here how to Build correct nodes for your level.


Browsing level reject data
 Viewing the level reject data

In the WinTex wad editing window, click on menu Advanced | Edit Levels.

From the Wintex level editing window, select a level and press on button Reject.

Click on any part of the map, to select one sector.

Imagine this is the sector where the player is running.

The other sectors are the sectors where monsters are waiting in ambush.

The sector where the player is will appear in Yellow.

The sectors whence monsters can see the player will appear in Purple.

The sectors whence monsters cannot see the player will appear in Grey.

See here how to Build correct reject data for your level.

See here how you can make Special effects by using the reject data.


Browsing level wall sides
 Viewing the Sides

In the WinTex wad editing window, click on menu Advanced | Edit Levels.

From the Wintex level editing window, select a level and press on button Side.

Click on a level from the level list.

The level will be displayed.

Then Click anywhere on the level map.

The closest facing side will be displayed.

It will be Green if it is a right side (normal side)

It will be Red if it is a left side (back side of a two sided line)

Oh, I forgot to say: this function is not useful at all!

It will be useful in future version, for the level texture editing function.


 Combining WADs with WinTex

Menu

Join two WAD files into one.

Add all sprites to your WAD.

Add all flats to your WAD.

Modify the game's main WAD file.


Joining two WADs into one
 Combining two WAD files into one

Suppose for instance that you want to join the WAD files TRINITY.WAD and VOIDSHIP.WAD into one single WAD file, TRINITY.WAD.

Since both those famous WAD use redefined textures, ordinary tools will not be able to join them into one WAD. Hopefully, the tool DeuSF has a special trick to deal with such cases.

Usage

From the WinTex main window, select a game, for instance DOOM2.

You will notice a panel in the lower part of the window, that is named 'WAD to examine or modify'.  Go there and select a WAD file, for instance TRINITY.WAD.

You will notice a panel in the middle of the window, that is named 'WAD to Join'.

Go there and select another WAD file, for instance VOIDSHIP.WAD.

The just press on the button Join PWADs.

DeuSF will run for a while, and append VOIDSHIP.WAD to TRINITY.WAD.

This is reversible: just select TRINITY.WAD and click on button Restore PWAD, and TRINITY.WAD will be back to normal. Now talk of professional tools!

Important

In case two entries are conflicting, WinTex will discard the entry from the WAD that is being modified.

for instance, if both WAD files redefine level MAP01, then the level MAP01 from the modified file will be discarded.


Using DOOM wads with UDOOM
 Using DOOM WADs with Ultimate DOOM

An unexpected consequence of the WAD combining capability of DeuSF (coded long before Ultimate DOOM was out) is that if can be used to use DOOM wads with Ultimate DOOM.

If you have TRINITY.WAD, and the DOOM.WAD from Ultimate DOOM,  just join DOOM.WAD with TRINITY.WAD.

Then DOOM.WAD will contain TRINITY.WAD, and the textures will be re-calculated, so that it can be played without problems.


Add all sprites to a WAD
 Adding all sprites to a WAD file

Suppose you have a PWAD file that contains some sprites that were modified. You may expect such a WAD to work like any usual PWAD, but this isn't quite true. If you try to play this WAD (using -file) the game will lock up. This is a bug of DOOM.

There are some tricky way to overcome that bug, by modifying the game executable, but the easiest way is to use the function of DeuSF that adds all sprites to a PWAD.

When using the Add all sprites function, you put in the WAD all the missing sprites, and then DOOM (or DOOM2) will accept to run the WAD. Don't try to understand why!

(Note: it works also with HERETIC, but it's less reliable: prefer the Merge function.)

(Note: if a sprite WAD was made for DOOM, then adding all sprites of DOOM2 will enable it to run under DOOM2.)

The big drawback is that it takes a lot of time, because it adds about 4 meg of data to your WAD, in the worse case.

Of course, do not distribute a WAD with all flats appended to it! If you really want to distribute such a WAD, learn how to install it.

Usage

From the WinTex main window, select a game, for instance DOOM2.

You will notice a panel in the lower part of the window, that is named 'WAD to examine or modify'.  Go there and select a WAD file that contains custom sprites, for instance SIMPSON.WAD.

The just press on the button Add all sprites

DeuSF will run for a while, and append all sprites of DOOM2.WAD to SIMPSON.WAD.

This is reversible: just select SIMPSON.WAD and click on button Restore PWAD.

Then WinTex will tell you the WAD has been restored, and SIMPSON.WAD will be back to normal.

Maybe now you want to know how to modify the sprites.


Add all flats to a WAD
 Adding all flats to a WAD file

Suppose you have a PWAD file that contains some flats that were modified. You may expect such a WAD to work like any usual PWAD, but this isn't quite true. If you try to play this WAD (using -file) the game will lock up. This is a bug of DOOM.

It is possible to overcome that bug, by using only names of flats that were never used before, but the easiest way, especially if you redefine animations, is to use the function of DeuSF that adds all flats to a PWAD.

When using the Add all flats function, you put in the WAD all the missing flats, and then DOOM (or DOOM2) will accept to run the WAD. Don't try to understand why!

(Note: It works also with HERETIC, but it's less reliable: prefer the Merge function.)

The big drawback is that it takes a lot of time, because it adds about 2 meg of data to your WAD, in the worse case.

Of course, do not distribute a WAD with all flats appended to it! If you really want to distribute such a WAD, learn how to install it.

Usage

From the WinTex main window, select a game, for instance DOOM2.

You will notice a panel in the lower part of the window, that is named 'WAD to examine or modify'.  Go there and select a WAD file, for instance TRINITY.WAD.

The just press on the button Add all flats

DeuSF will run for a while, and append all flats of DOOM2.WAD to TRINITY.WAD.

This is reversible: just select TRINITY.WAD and click on button Restore PWAD.

Then WinTex will tell you the WAD has been restored, and TRINITY.WAD will be back to normal.

Maybe now you want to know how to modify the flats.


 Modifying the main WAD of the game

WinTex allows you to modify the game's main WAD file (for instance, DOOM2.WAD) in a very secure and very reliable way.

Note: The method is completely different from the method used in other tools, and only a minimal modification is made to your main WAD file. When this main WAD file is later restored, this is a complete and perfect restoration, meaning that you can even use upgrade patch on this main WAD. The method is much better than the one used in DMGRAPH for instance.

If you don't want to modify the main WAD, check how to modify the WAD files.

Why modify the main WAD?

There is one good reason for that: Bugs.

Not bugs in WinTex, bugs in DOOM, DOOM2 and HERETIC.

You know of course that you can play PWAD files by using the -file parameter, and the name of the PWAD. but due to the lousy file system used by ID software, this -file cannot handle properly PWADs that contain modified sprites and flats.

Merging a PWAD withing the main WAD is the only way to get rid of all the restrictions.

There is another good reason: Network play.

I have never managed, personnally, to run a fine network game with the -file parameter. There seem to be another bug there, and you will get more game play inconsistency that you should.

There is a last reason: Portability

Sprite and flat PWADs meant for DOOM can be merged into DOOM2.WAD, and they will play just fine. (That was not possible with tools like DMADDS!)

Usage

Suppose for instance that you want to modify DOOM2, so that the sprites from SIMPSON.WAD are always used by DOOM2.

From the WinTex main window, select a game, for instance DOOM2.

You will notice a panel in the middle of the window, that is named 'WAD to Join'.

Go there and select another WAD file, for instance SIMPSON.WAD.

The just press on the button Merge in IWAD.

DeuSF will run for a while, and append SIMPSON.WAD to DOOM2.WAD.

This is reversible: just click on button Restore IWAD.

WinTex will tell you that the main WAD was restored, and DOOM2.WAD will be back to normal.


 Editing WADs with WinTex

Menu

How to save the WAD directory.

How WinTex modifies WAD files.

Modify lumps (texts, screens, demo, colors).

Modify sound effects (wave and PC speaker sounds).

Modify texture lumps (wall textures).

Modify graphics (title picture, status bar, helps).

Modify sprites (monsters, weapons).

Modify patches (parts of textures).

Modify flats (floors and ceilings).

Modify musics (level musics).

Important

When you have finished editing a WAD with WinTex, please  clean it.

This is because editing under WinTex is reversible, so lots of useless data are not destroyed, because they could be needed if the WAD file was restored to it's previous state.

Tutorials

Tutorial on Textures editing.

Tutorial on Floors and Ceilings editing.

Tutorial on Sprites editing.

Tutorial on WAD installation.

Tutorial on Pictures editing.

Tutorial on Level editing.


 Cleaning WADs

Never distribute a WAD before you clean it: it would contain lots of waste data.

This is due to the way WinTex edits WAD files: it never destroy the old data, in case the user would like to cancel the last modifications. That creates holes in your WAD files.

However, this is not a problem since at any time you can get back a perfectly clean WAD, with no waste of data at all. If your WAD goes too fat, just clean it!

Note that all the other tools, DMGRAPH, DMAUD and NWT and many other WAD editors work similarly, except that the editing is not even reversible, countrary to WinTex.

To clean a WAD file, there are 2 solutions:

1/  Under the WinTex Wad editing window, click on menu File | Cleanup WAD.

That will use the WinTex cleanup function. This function does not take WAD compression into account, so it's a bit limited. It future versions of WinTex, I will take the time to make it really powerful.

2/  Under the WinTex main window click on menu File | Clean WAD.

That will make use of the cleanwad tool, a freeware tool distributed with WinTex by courtesy of it''s author, Serge Smirnov. Watch for the latest release of this utility!


 How WinTex modifies the edited WADs

Entries in WAD files

Each time you read a new WAD entry, or modify it, or import it form another file, WinTex keeps a copy of both the old entry and the new one.

In fact, WinTex never deletes any entry; unless you use the clean wad feature.

Since the WAD containes more data than is really needed, it is bigger than it should.

The WAD file thus contains data separated, apparently, by hole: lots of  unused data that seems wasted.

This is not a problem for the game.

This is not a problem for editing. It's even quite convenient.

Only when you're about to distribute your WAD, don't forget to clean it!

WAD directory

WinTex also keep a copy of the previous WAD directory, together with some informations about the previous file size, various pointers and even the time stamp of the file.

This allows WinTex to make complete restorations.

A Wad modified by WinTex can be restored by DeuSF or DeuTex, not by NWT.

The other tools don't have any WAD restoration feature.

WAD restorations

The WAD restoration function brings you back to the situation just before you started your WAD editing session. It cancels all the modifications made during that session.

This is not equivalent to the 'cancel' command of most editors, since it does not cancel one modification at the time. So beware.

If you restore a WAD, you will lose your modifications forever.

If you restore a WAD twice, then you lose modifications made during your last two editing WAD sessions.


 Saving the WAD directory

The WAD directory is a special part of the WAD that describes what is contained in the file.

It's basically the list you see when you click on menu Select | All, with some other technical stuff.

You should only bother about this if you are using another tool on the same WAD that you are editing with WinTex.

WinTex usually only updates the WAD directory when you read a new entry into the WAD, or when you quit, or when you start using a level editor.

WinTex doesn't update the WAD directory each time you modify entry names, or offsets.

To make sure the WAD directory is up to date, in case you made some modifications lately:

From the WinTex Wad editing window, click on menu File | Update Wad.


 Changing the default transparent color

What is the transparent color?

You may wish that some areas, in the pictures that you send to WinTex, remain transparent in the game.

But there is no normal way to code for transparency in bitmap pictures, so WinTex uses a trick:

All the areas you will draw in cyan will remain transparent.

I mean exactly cyan (Red=0, Green=255, Blue=255).

If you use something close to cyan, but not cyan, it will map to light blue.

Changing the transparent color

From the WinTex main window, click on menu Option | Transparent color.

WinTex gives you the choice between three default colors, and a custom color.

- Cyan is the default color, used by every tool since DMGRAPH.

Cyan is used because it doesn't exist in the game, and is a very uncommon color in real-life pictures, except in the sky.

- Black is the color to use, if you generated sprites with POVRAY.

Povray draws pictures on a black background, by default.

- Dark Grey is the favourite color to use for the background of sprites.

That's because if you smooth a picture on a dark grey background, then it's edges will look fine in the game. Don't use black or cyan for that!.

Once you set a transparent color, it is used in every current or later WinTex sessions.


 The picture format

WinTex currently accepts only Bitmap pictures, because it's the most common format under Windows, it's easy and fast to read, and reliable.

The Bitmap file:

Must be a Microsoft Bmp Format, not OS/2

Appologise for the use of a Microsoft format, but... no choice.

Must not use any compression

Especially, it must not use RLE compression. Use only RGB coding.

Must use 256 colors (8 bit per color).

You can use 16 colors, but it's not enough colors!.

You can use Million of colors, (24 bit) but it will be slow as hell. And it doesn't do any ditherig. There are specialised programs for that.

Must use the color palette of DOOM (or HERETIC), for better results

If you use different color palettes, WinTex will have to convert, and the conversion might not give the best possible result.

Most good Bitmap editors will allow you to save the color palette of a sample DOOM picture extracted by WinTex, so that you can reuse this palette in later pictures.

Must have a strictly compliant Bitmap format.

The Bitmap format defined by Microsoft is very lousy, and some products, including those of Microsoft, don't even respect it. Paintbrush is an example.

Sometime WinTex will complain about errors in a Bmp file that looks valid. Well, too bad. That means your bitmap editor probably is using some trick WinTex is not aware of. Get a descent bitmap editor, and try again.

Here is a suggestion for a good (though limited) general purpose editor:

Paint Shop Pro 3.0.  It's a shareware. Since I use it, you can be sure that WinTex runs with it.

Note however that for some strange reason, PSP3.0 default BMP format is RLE encoded, so disable RLE encoding first.

Future version of WinTex may support TGA, PCX, GIF, or rather the new Compuserve format.

If you need that format, ask! I may take the time to code it.


Modifying the data lumps
 Modifying the data lumps (demo, texts, misc.)

Modify a lump

From the WinTex Wad editing window, click on menu Select | Lumps.

Double click on any listed lump to edit that lump.

Click on menu Edit | Read entry from file to load a new lump.

Particularities of lump entries

There are many kind of lump entries, each with it's own particular format.

It you change the data associated to such an entry, the new data must have the exact same format as the old data.

WinTex knows the most common type of lumps, and will handle the data you provide depending on the kind of lump.

But if your lump is of a very special kind, and WinTex doesn't know the format, then WinTex will just load that lump as a raw data file, without even bothering about the format. So you'd better know what you are doing.

Common lump formats

Kind of lump	Format expected	Example of entry
DEMO	Special game demo format (See the specifications)	DEMO1 (.LMP)
SCREEN	Text screen 80x25, colored. (like in DOS text mode)	ENDDOOM (.SCR)
TEXT	Text configuration file  (Unix or DOS format)	DMXGUS (.TXT)
BITMAP	320x200 flat picture (with common color palette)	TITLEPIC (.BMP) (Heretic only)
PALETTE	256 RGB colors	PLAYPAL (.LMP)
COLORMAP	33 color maps	COLORMAP (.LMP)
RAW DATA	format unknown	GENMIDI (.LMP) TINTAB (.LMP)


 Modifying the sound effects

From the WinTex Wad editing window, click on menu Select | Sounds.

Double click on any listed entry to edit that sound.

Click on menu Edit | Read entry from file to load a new sound.

Usage of sound entries

The sounds represent the various sound effects that are played when for instace a weapon is used, or when a monster shouts, or when a door closes.

The name of the entry completely determines what the sound will be used for, and this is hard coded in the game executable.

So to replace a sound in the game, you must simply put in your WAD a sound entry of the same name.

When you select a sound entry, WinTex tells you what it is actually used for.

For instance, WinTex will tell you that DMPISTOL is the name of the pistol sound.

WinTex will also automatically start playing the sound. If you don't want to hear the sound playing, click on menu Select | No Sounds.

Particularities of sound entries

The only format of sound accepted by WinTex is a very simple one:

WAVE files	(file with extension .WAV)

11025 sample per seconds (prefered rate, but you can use others)

8 bit per sample (not 16 bit per sample)

No compression (PCM encoding, not ADPCM)

The sound can be up to 64K in length. If you provide more than 64K, WinTex will handle your sound alright, but the game will ignore the data after 64k. (So if you want long sounds, use a slower sample rate.)


 Modifying the wall textures

Don't forget to read the tutorials.on texture editing.

Modifying a texture

From the WinTex Wad editing window, click on menu Advanced | Edit Texture.

This will start the WinTex Texture editing window.

On the right of the WinTex Texture editing window, you can see the list of patches.

Click on menu Patches | In main WAD to obtain the main list of wall patches.

Click on menu Patches | in PWAD, to obtain the list of your custom patches.

(first you must put some custom patches in your WAD.)

Click on any patch in the list, it will appear on the texture.

Position the ppatch on the texture, click on it, and it will be dropped there.

In the center of the WinTex Texture editing window, you can see the list of patches in the texture currently edited. You can move or delete patches in that list.

On the left of the WinTex Texture editing window, you can see the list of textures. When you create a new texture, it will be inserted above the currently selected one.

Usage of the textures

The textures are the pictures that appear on the level walls (not on the floor or ceilings).

They are not actual pictures, but rather are made of a combination of smaller pictures, the wall patches.

About Special textures

Some texture names are a bit special: they indicate that the texture represents a switch, or that the texture is part of an animation (a film, a fire...), or if the texture is used for the sky.

This default behaviour of textures is hard coded into the game executable, WinTex canot change it.

But WinTex will tell you if the texture name is special, and what it is used for.

To create animated textures, just redefine the start and the end of an animation sequence, and put some new animation frames between those start and end textures.

Note: it is critical that your new textures appear in the list after the animation start, and before the animation end.

Use custom textures in levels

See how to use custom textures in your levels.


 Modifying the general pictures

Don't forget to read the tutorial on picture editing.

Modifying a picture

From the WinTex Wad editing window, click on menu Select | Pictures.

Double click on any listed entry to edit that picture.

Click on menu Edit | Read entry from file to load a new picture.

If you have troubles with a graphic picture,  check the picture format.

Usage of picture entries

The pictures represent the title pictures, help pictures, menu items, end level pictures.

The name of the entry completely determines what the picture will be used for, and this is hard coded in the game executable.

So to replace a picture in the game, you must simply put in your WAD a picture entry of the same name.

For most pictures, WinTex will tell you what the picture name means.

For instance, WinTex will tell you that M_DOOM represents the DOOM logo.

Particularities of picture entries

If you want to replace a picture by another one, please use exactly the same width and height as in the original picture.

For menu items, it is possible that using different heights cause no special trouble, but most of the time it should cause trouble when playing the game


 Modifying the sprites

Don't forget to read the tutorial on sprite editing.

If you want to distribute sprite WADs, read the tutorial on WAD installation.

Modify a sprite

From the WinTex Wad editing window, click on menu Select | Sprites.

Double click on any listed entry to edit that sprite.

Click on menu Edit | Read entry from file to load a new sprite.

If you have troubles to load a sprite picture,  check the picture format.

Usage of sprite entries

Sprites are the monsters, players and objects seen in the game.

The sprite entries are pictures that are used at different stage of the animation of sprites.

For one single sprite, there are many sprite entries, that will show the sprite walking, the sprite seen from front, from left, from behind, the sprite being hurt, or similar stuff.

Browse the list of sprites, and you will understand.

The name of the entry completely determines what sprite is concerned, what phase of the sprite the picture is used for, and what viewpoint it is used for.

This is hard coded in the game executable.

Of course, WinTex will decode the name for you, and write the result in the viewpoint panel.

Particularities of sprites

Modifying sprites is more difficult than it looks.

In particular, if a WAD contains modified sprites, it cannot be used by the game.

To be able to use such a WAD, for instance with DOOM2, you must either:

Append all the sprites of DOOM2

(use the menu Merge | Add all sprites from the WinTex main window)

Merge the WAD into DOOM2.WAD

(use the menu Merge | Merge in IWAD from the WinTex main window)

There is no other choice. This is due to a bug in DOOM2, that WinTex attempts to compensate, at the cost of some meg of wasted disk space.

The only way to avoid this is to use only new names for sprites, and use S_END as end sprite marker.

Sprite offsets

The panel on the upper right of the sprite picture show the offsets of the sprite.

Those offsets tell how the sprite picture should be placed, relatively to the point where the sprite is walking (this is the point where the two thin black lines cross).

For wielded weapons, the offsets position the weapon relatively to the screen (there is no cross displayed in this case).

You have the choice between 6 default offsets:

Weapon offsets: use it for most wielded weapon pictures.

Weapon offset 2: use it for some wielded weapons (if the first one doesn't work fine).

Walking offsets: use it for monsters that are walking.

Flying offsets: use it for explosions, and monsters that are flying.

Null offsets: use it only for graphics, not for sprites.

Then you can adjust the offsets like you wish.


 Modifying the wall patches

Don't forget to read the tutorial on texture editing.

Modify a wall patch

From the WinTex Wad editing window, click on menu Select | Patches.

Double click on any listed entry to edit that patch.

Click on menu Edit | Read entry from file to load a new patch.

If you have troubles to load a wall patch,  check the picture format.

Usage of patch entries

The patch entries are pictures, that meant to be used as components of wall textures.

You will build a wall texture from one, two, three or more wall patches that you will have previously put in your WAD. (In fact, you can also use sprites as wall patches.)

The name of the wall patches can be chosen at your convenience, there is no restriction, except that it must not conflict with another entry name (WinTex will tell you, then).

Particularities of wall patches

The size of the wall patches can be chosen at your convenience, but it must be smaller than 512x256, for reasons related to the encoding of pictures.

It is recommended that you use 64x128 or 128x128 for the wall patches.

Remember that ordinary textures pad every 128 in height, so using a height of more than 128 would be a waste, and using less than 128 would leave holes.

However, you may wish to use heights of more than 128 if your patch is meant to be used in a transparent texture, that will be put on a transparent or semi-transparent wall (a two sided wall).

Also, you may wish to use a height of 245, and a width of 256, if your patch is meant to be used in a sky textures.


 Modifying the floors and ceilings

Don't forget the tutorial on floor and ceiling editing.

If you want to distribute flat WADs, read the tutorial on WAD installation.

Modify a floor or ceiling

From the WinTex Wad editing window, click on menu Select | Flats.

Double click on any listed entry to edit that flat.

Click on menu Edit | Read entry from file to load a new flat.

If you have troubles to load a flat picture,  check the picture format.

Usage of flat entries

Flats are special 64x64 pictures that represent the floors and ceilings in the levels.

Note that the sky is not a Flat, it is a wall texture.

The flats can have any name you wish, provided it doesn't conflict with other names. WinTex will tell you if a particular name cannot be used.

The Flat pictures

When you provide a picture that will become a flat, it must be of size 64x64, and the drawing must be designed so that it can smoothly tile vertically and horizontally.

This is because a flat is repeated every 64 X or Y coordinate, in a level.

Particularities of the flat entries

Modifying flats is more difficult than it looks.

In particular, if a WAD contains modified flats, it cannot be used by the game.

To be able to use such a WAD, for instance with DOOM2, you must either:

Append all the flats of DOOM2

(use the menu Merge | Add all flats from the WinTex main window)

Merge the WAD into DOOM2.WAD

(use the menu Merge | Merge in IWAD from the WinTex main window)

There is no other choice. This is due to a bug in DOOM2, that WinTex attempts to compensate, at the cost of some meg of wasted disk space.

Using custom flats with level editors

See how to use custom floor and ceilings in your levels.

Animated flats

When you put a flat, in the list of flats, between a flat that is the start of an animation, and a flat that is the end of an animation, then this flat becomes part of the animation.

WinTex will tell you the names of the flats that are the start of the end of an animation.

Don't put too much flats between the start and the end of an animation, otherwise the game may crash.


 Modifying the musics

Modify a music

From the WinTex Wad editing window, click on menu Select | Musics.

Double click on any listed entry to edit that music.

Click on menu Edit | Read entry from file to load a new music.

Remember the file must be under the MUS format.

Usage of music entries

There is one music entry associated to each level. This music is played continuously when you are in the level.

For instance, in DOOM, the music D_E2M4 plays when you are in level E2M4.

In DOOM2, the name of the music is less easy to figure out, but WinTex will help you by providing the list of musics, and their associated level.

Particularities of music entries

The Music entries are not MIDI or MOD files.

They are under a special format, MUS.

Hopefully, this format is well known, and there are converters from and to MIDI files.

WinTex cannot to that, though, for lack of time.

Playing MUS file under windows

The first beta release of the MUS player from Vladimir Arnost, from Q&A software (e-mail xarnos00@dcse.fee.vutbr.cz) is now integrated into WinTex.

Each time you click on a music entry, WinTex will start playing the music.

If you want to disable the music, click on menu Select | No Sounds.

Converting from MIDI to MUS

If you declare MUS2MIDI as the external editor for MUS files, then when you double click on MUS entries, they will be converted to MIDI files. But the current MUS2MIDI is very slow.

There is no support for MIDI2MUS, because I didn't know how to integrate it.

The whole MUS and MIDI handling must be redesigned in fact.


 Modifying the levels

Menu

Modify the level  layout.

Calculate the nodes of the BSP tree, before playing a level.

Calculate the reject data, to make the game faster.

Do special tricks, with the reject data.

Use custom textures in your levels.

Use custom floor and ceilings in your levels.

Note: WinTex cannot edit the level objects.


Modifying the level plans
 Modifying the level maps

Usage of level maps

The level maps are of course the places where you will be running around, as a player.

WinTex does not and will never edit DOOM or HERETIC levels.

There are lots of good DOOM editors around, and I consider it's a specialised job.

The current WinTex developments are aimed directly at Quake, which is much harder to edit.

So to modify the level maps, you will need a level editor. But WinTex will make it easy for you to integrate levels in one single WAD, and to fool around with those levels.

WinTex will save a temporary map file, feed it to your level editor, and then load it back when the editor has finished working on it.

You will of course need to configure configure that level editor for WinTex.

This is because all level editors have their personnal way to deal with WADs, and WinTex must tell them what game to use, what WAD to edit, and what is the name of WAD with custom the textures and flats.

Modify a level map

From the WinTex Wad editing window, click on menu Advanced | Level editing.

The WinTex level editing window will appear.

If your WAD contains levels, those levels will appear in the list of levels, on the left.

If not, you can still click on menu Level | Load level, give a name to your level, like MAP01, and then click on a WAD file containing a level you want to load in your WAD.

You can also cut and paste a whole level, from the WinTex Wad editing window, provided you open another WAD that contains levels. That might be more convenient.

Once you have a level in your WAD, click on menu Level | Editor and select an WinDEU.

Then click on menu Level | Edit Level, and WinTex will call WinDEU with the right parameters:

WinTex will certainly ask you to point to WINDEU.EXE, and then WinTex will ask you to confirm the command line for WinDEU, this is just for security. This command line should be right.

WinTex will then disappear temporarily.

Under WinDEU, modify your WAD as much as you want. Save your WAD to the same file name. Then exit WinDEU.

WinTex will then come back, and ask if you want to reload your modified level in the WAD.

Click OK if you were satisfied of your modifications, no otherwise.

Then WinTex will ask you if you want to delete the temporary file, click OK.

Here you are, your level has been modified.


Building the BSP tree
 Calculating the nodes of the BSP tree

From the Wintex level editing window, select a level and press on button Node.

This calculation is very intensive, and is critical for a good game play:

- If nodes are build incorrectly, the game display will look fuzzy.

- If nodes builts are not optimal, the game will run slower than with good nodes.

(However, there are cases when even the best nodes cannot make the game faster.)

Click on menu Node | Calculate, that will save the level to a temporary file, and then run a node builder tool on this temporary file.

See the setup of Node builders tools.


Building the Reject structure
 Calculating the reject data

From the Wintex level editing window, select a level and press on button Reject.

There are many line of sight caculations needed to build even a basic reject data.

So you'd better first use an external tool on the level.

Click on menu Reject | Calculate, that will save the level to a temporary file, and then run a reject tool on this temporary file.

See the setup of Reject tools.


Special effects with level reject data
 Special effects with the level reject data

From the Wintex level editing window, select a level and press on button Reject.

First check how the reject data is displayed.

Then check how the reject data  can first be calculated automatically.

Modifying the reject data

Warning: Edit reject data only when you are sure you will not need to add new sectors you your level. Otherwise, all your hard work will have to be discarded.

Press Shift and Click on a sector: you then  toggle the sector status.

A Purple sector will become Grey: That means that now the monsters cannot see the player anymore, and remains indiferent to the player.

A Grey sector will become Purple; That means that now monsters in this sector will see the player (provided no wall blocks their sight).

If you Shift and Click on the player's sector, it becomes Green. This sector is now safe, because monsters there cannot see the player, so cannot attack him.

Making sectors safe or unsafe

Select a sector, by clicking on it.

Then click on menu Reject | Safe Sector:

The selected sector appears in green, and the other sectors appear in grey.

Now monsters from any sector cannot see the player, when he is in the selected sector.

Then click on menu Reject | Unsafe Sector:

The selected sector appears in yellow, and the other sectors appear in purple.

Now monsters from all other sectors can see the player, provided there is a line of sight, when he is in the selected sector.

Saving the modifications

For security, the reject data is saved only when you decide it is correct.

Click on menu Reject | Save changes.


 Things

WinTex cannot modify things, yet. It cannot even list them.

That's because I didn't take the time to code the special list of things.

Next version should list some statistics about the things.

Sorry. Use your favourite level editor!


 Using custom textures in levels

Don't forget to read the tutorials.on texture editing.

WinTex doesn't have yet a feature to change the textures on the level walls.

So it relies on a level editor to do the job.

Some level editors can use custom texture WADs, some can't.

If your editor can use custom texture WAD, WinTex will attempt to tell to your editor the name of the WAD you are currently editing. This is done on the command line, see the configuration of the level editors.

If your editor can use custom texture WADs

Then from the WinTex main window, click on menu File | Open WAD and select

your texture WAD, say, TUTOR.WAD.

You will have to load a level a level into this texture WAD.

Then you will start a level editor on that level, and WinTex will then tell your level editor that your TUTOR.WAD contains interesting information.

Normally, your level editor should read TUTOR.WAD at see that there are new textures there.

Then under your level editor, you should be able to use a new texture, called for instance MYDOOR.

If this doesn't work, check the configuration of your level editors. There are many tricks and bugs, and WinTex cannot compensate for them all.

If your editor cannot use WADs with custom textures.

Editor like DoomCAD, WadEd cannot (or could not, in previous versions) use custom textures.

So here is the WinTex trick, assuming that you are using DOOM2 and that your texture WAD is called TUTOR.WAD.

From the WinTex main window, in the panel PWAD to join, select the file TUTOR.WAD.

Then click on the button Merge in IWAD.

DeuSF will run for a while, and introduce TUTOR.WAD into DOOM2.WAD.

That way, any editor will be fooled, and beleive that DOOM2.WAD contains the textures listed in TUTOR.WAD.

You can start your editing session normally, and use a new texture, for instance MYDOOR, as if it had always been in DOOM2.

Create a level called MAP01.WAD and use MYDOOR as door texture.

When you have finished, click on button Restore IWAD, because you don't want DOOM2.WAD to remain modified forever, don't you?

Of course, this will mean that the level you have just created, let's say MAP01.WAD, will not run with DOOM2, because the texture MYDOOR doesn't exist in DOOM2.

Well, WinTex strikes again:

From the WinTex main window, click on menu File | open WAD, and select TUTOR.WAD.

The WinTex Wad editing window appears.

From the WinTex Wad editing window click on menu Select | Level, because you are going to load a new level into TUTOR.WAD.

Then click on menu Edit | Read entry from file.

WinTex asks for the name of an entry. Type MAP01 for instance.

Or rather, select MAP01 form the drop box, that's faster.

WinTex then tells you that MAP01 is replacing an entry from the main WAD.

This has better be! if it wasn't the case, your level name would be ignored by DOOM2.

Then WinTex ask you to point to a WAD file, MAP01.WAD.

This Wad should contain only one level. WinTex will only read the first level it finds, if the WAD contains more than one level.

WinTex then loads the level MAP01.WAD into TUTOR.WAD.

TUTOR.WAD is now complete, and ready to be used in the game!


 Using custom Floors and Ceilings in levels

Don't forget to read the tutorials.on floor and ceiling editing.

When you use a level editor on a WAD, from within WinTex, WinTex indicates to your level editor that this WAD contains new flats and textures.

However, most level editors will not take custom flats into account.

This is a restriction that can hardly be compensated by WinTex.

There are three methods to make  useable:

1/ use only new names for flats, and use F_END. This is tricky.

2/ append to your WAD all the flats of DOOM2. This is slow, but very safe.

3/ merge your WAD into the main WAD. This is fast, and safe.

Read the information about the use of textures, because the way to use your level editor with custom flats is very similar.

But once you have a WAD, let's say TUTOR.WAD, that contains custom flats, contrary to custom textures, you cannot just use it. If you attempt to use it, the game will crash.

You will have to either merge this WAD into the main WAD, or to add all flats to TUTOR.WAD.

If you want to distribute a WAD with flats, read the tutorial on WAD installation.


 Testing WADs

Get an error report about your WAD

From the WinTex main window, click on menu Examine | check PWAD,

and select the WAD you want to check.

The tool DeuSF will run and generate an error report.

This error report will tell about possible errors in the texture definition, will signal textures that can't be used on transparent walls, and will tell about undefined textures in levels.

This check function is a bit obsolete. In future version it will be better, and integrated to WinTex.

Check if your WAD contains wasted space

From the WinTex main window, click on menu Examine | List wasted space,

and select the WAD you want to check.

If this is a WAD you are currently editing, you will notice there is a LOT of wasted space.

This is entirely normal: it's due to the fact that editing is reversible.

Of course, this will only motivate you to clean your WAD file before you distribute your WAD to other people (hey, don't forget to send it to me, by the way).


 Tutorial on texture editing

Creating and inserting a new wall texture is easy with WinTex, but don't be surprised if you don't understand it all on first try. WinTex makes it quite easy, but this texture thing is real tricky if you're a newcomer in the DOOM editing world.

However once you've learned how to insert one new texture you'll find that it's just as easy to insert 50 or more...

For this tutorial, we assume that you are usinf DOOM2, and that WinTex is installed.

You will be editing a new PWAD file called TUTOR.WAD.

Menu

A bit of theory on textures.

Creating a new wall texture.

Using your own patches in wall textures.

Using  custom textures in the levels.

The Advanced topics of texture editing.

Viewing the textures used in a WAD.

From the WinTex main window, select a WAD.

Then simply click on menu Examine | List Textures Used.

DeuSF will run and report the textures that are really used in the levels.


Tutorial on Textures: Theory
Tutorial on Texture: Theory

What is a Texture?

Countrary to the common belief, a wall texture is not a picture.

It is only a list of wall patches, which are the actual graphic images.

Sometime, this list is composed of only one wall patch, so you could confuse texture and patch.

A texture is composed by placing wall patches one after the other in specific position, with the later ones sitting on top of the earlier ones.

This 2-level approach can provide considerable economy of memory and disk space, since the same level patch can be used in more than one texture. A typical example is the EXIT patch, that appears in lots of different textures, at the exit of levels.

The different textures lists

The list of textures is usually stored in an entry called TEXTURE1.

This list is automatically created by WinTex if you create or modify any texture.

Open DOOM2.WAD with WinTex, click on menu Select | Textures, and click on TEXTURE1, you will see that list of textures, with names and size of the textures.

Coming with the list of textures, you can find a list of patches, PNAMES.

You should not bother about this list, since WinTex handles it automatically, but you must know that it must be present, if you have added new patches.

Now click on PNAMES and see the list of patches.

With DOOM and HERETIC, there is another list of textures, called TEXTURE2.

This list contains textures that are only in the registered version of the game.

Open DOOM.WAD with WinTex, click on menu Select | Textures, and click on TEXTURE2, you will see that list of textures, with names and size of the textures.


Tutorial on Textures: Creatinf a new texture
Tutorial on Texture: creating a new texture

Start WinTex.

From the WinTex main window, click on menu File | New Wad.

Select DOOM2 directory and give a name to your new Wad, for instance TUTOR.WAD.

The WinTex Wad editing window appears.

From the WinTex Wad editing window, click on menu Advanced | Edit Texture.

The Texture editing window appears.

Take a look at a texture

On the left down panel, you can see a list of textures.

Click on one texture, for instance ASHWALL7.

The Upper part of the screen is not displaying the texture ASHWALL7. This textures only takes a very small part of the screen, since WinTex is designed to edit textures of size 512x128.

Create a new texture

Click on menu Textures | New Texture.

You are requested to give the name of a texture.

Type the name MYDOOR in the drop box, and press OK.

Note that MYDOOR is inserted in the texture list, just above the last selected texture (so you will probably find it just above ASHWALL7).

Click on MYDOOR in the texture list.

A picture of size 128x128 appears, and it contains nothing.

Note that the color cyan means that the picture is completely transparent.

Bad news: if you give a transparent texture to DOOM2, it will crash, so you have to put something on your texture, and you'd better leave no transparent areas.

The things you can put on the textures are of course the wall patches.

Get the list of wall patches in main WAD

The right down panel contains the list of patches in your WAD. Since TUTOR.WAD is a new WAD, it contains no patches at all so the list is void.

You'd better list the patches that are contained in the main WAD file.

Click on menu Patches | In main WAD.

The list of patches in main WAD now appears in the right down panel, and this panel now has 'in main WAD' for title.

Put a wall patch on your textures

This is real easy.

Click on a wall patch, anywhere in the list of wall patches (for instance, click on WALL00_1)

When you click on WALLOO_1, you notice that WALL00_1 is displayed in the middle of the textures.

Now move with the mouse to the middle of the texture: you will notice that WALL00_1 follows the mouse.

Move WALL00_1 to the left part of the texture and click on it.

You have dropped WALL00_1 on the texture, and it doesn't move anymore.

Note that WALL00_1was added to the list in the middle panel: This is the list of all patches for the texture MYDOOR, and of course it contains only WALL00_1.

Add more wall patches to your texture

Click again in the patch list, and drop more patches on your textures.

Yes, I know, it's not easy to find that patch you always dreamed of, because the list is long and badly organised. DOOM2.WAD is a real mess! You'll do better with your own WADs.

Drop patches until you cannot see any cyan pixels. That means your texture doesn't contain transparent areas, so it's usable without any problems.

Note: under certain conditions, you can use textures with transparent areas. This is useful for windows, for instance. But don't attempt that until later, it's not as easy as it sounds.

Save your new texture

Click on menu File | Quit.

WinTex will ask you if you want to save the texture in the WAD. Answer OK.

The Texture editing window disapears (slowly, too slowly...).

The Wad Editing window appears.

In the Wad Editing window, you can see that your WAD now contains two entries, called TEXTURE1 and PNAMES. This is normal.

Okay, now you've got a WAD with a new texture, and though it is probably not very artistic, you're eager to use it in a level. Action now! art will wait.


Tutorial on Textures: New patches
Tutorial on Texture: using your own wall patches

Since now, you have used wall patches from the main WAD.

Now you certainly want to put your own pictures on the walls, and it's just as easy.

What you will do is simply: create a new patch in TUTOR.WAD, by using a .BMP picture.

Find some kind of picture, to use on the walls

Get your favourite Bitmap editor, and load any picture you think is real cool.

Reduce the size of this picture to a size of 100x100 (that's real small) and save it as POSTER.BMP.

It's going to become a great poster for your door.

See the general tutorial on Pictures to know how to create pictures suitable for DOOM2. You can use an ordinary picture, but it may look real lame when in DOOM2.

Create a new wall patch from that picture

We assume you are currently editing TUTOR.WAD. If you are not, then from the WinTex main menu, click on File | Open Wad and select the WAD where you want to put your new wall patch, for instance TUTOR.WAD. The WinTex Wad editing window will appear.

From the WinTex Wad editing window, click on menu Select | Patches.

This tells WinTex that you are now ready to edit wall patches.

Now click on menu Edit | Read Entry from File.

WinTex ask you for the name of an entry. This is the name that will be used in your WAD to represent the entry. Type POSTER, because you want a now poster for your door!

Click OK.

Now WinTex want you to select a .BMP file named, by default, POSTER.BMP.

Go to the right directory and click on the file POSTER.BMP that you prepared earlier.

WinTex should read that picture and put it into the WAD file.

An entry named POSTER should appear. Click on it, and you will see your picture.

Troubles with pictures?

Your picture could not be loaded?

Your picture's colors have changed and look lame?

See the general tutorial on Pictures to know more about the format of the .BMP picture that WinTex can accept.

WinTex is not a general purpose picture editor, it accepts only one (or two) formats.

Modifying your patch

Once you have inserted you patch in a WAD, you can modify it, like any other entry, by selecting it and clicking on menu Edit | Edit entry.

Alternatively, just double click on the entry name.

This will save your entry to a temporary file and start a graphic editor on it.

Using your patch in texture.

Well, now that's real easy:

From the WinTex Wad editing window, click on menu Advanced | Edit Textures as usual.

The WinTex Texture editing window appears, as usual, and you can see the list of textures.

But now, you can also see your new patch POSTER in the panel on the right down part.

This panel is named 'Patches in WAD' because it lists all the patches in TUTOR.WAD, and currently there is only POSTER.

You can of course still get the list of patches in main WAD, with menu Patches | In main WAD.

You can get back the list of patches in the WAD with menu  Patches | In PWAD

Adding your patch to a texture

Click for instance on texture MYDOOR, in the list of textures.

then click on POSTER in the list of patches, and drop POSTER on the texture.

Here you are. A Door with a poster.


Tutorial on Textures: Using texture in levels
Tutorial on Texture: using custom textures in levels

Note: You will need a level editor for that job, and WinTex is not a level editor, yet.

Of course, if WinTex is successful enough, I will code a special stuff to add your own textures to some levels, and even to align your textures manually, something that no level editor can do correctly.

Unfortunately, some level editors have been designed by people who never imagined that textures could be edited. Other editors allow the use of custom textures, but this is not easy.

Well, it all depends on your favourite editor.

We assume that you are in the WinTex main window, and you intend to editing TUTOR.WAD, a file that contains one custom texture called MYDOOR.

If your editor can read WADs with custom textures

Editors like DEU, WINDEU, DCK are able to use custom texture WADs.

From the WinTex main window, click on menu File | open WAD, and select TUTOR.WAD.

The WinTex Wad editing window appears.

Fist see how you can load a load a level into your WAD.

You will load a level called MAP01 in TUTOR.WAD, to try your new texture.

Then check how to use textures in your levels by tricking your level editor.

You will edit MAP01, using a temporary file and add the texture MYDOOR on the door of your choice.

After you edited your level, WinTex should re-load the level automatically in TUTOR.WAD.

If this fails for some reasons, you can always reload a level the level yourself, provided you didn't delete the temporary file C:\TEMP\MAP01.WAD.

Try your new level

Exit WinTex, and play TUTOR.WAD with:

doom2 -file tutor.wad

If it doesn't work, there may be a problem with your level editor, but read that tutorial again, just in case...


Tutorial on Textures: Advanced
Tutorial on Texture:Advanced topics

Finding errors in textures

There is no texture check coded yet in WinTex, but you can use the one in DeuSF.

From the WinTex main window, select a WAD and click on menu Examine | Check PWAD.

DeuSF will run for a while, and try to report any obvious errors in the textures of the WAD.

It should warn you agains the medusa effects and column without patch errors.

Textures for transparent walls

You certainly want to create transparent textures for walk through walls or for windows.

You can, but there is a trick: If any column in your texture is covered by more than one patch, then something real strange, called Medusa Effect, will happen.

So better use only one patch on transparent textures, that is safer.

Errors due to columns without patches

It is a rule in DOOM that every texture column must be covered by at least one patch, even if that part of the patch is entirely transparent. Failure to respect this rule will cause a game crash with the message column without patch

Tutti frutti effect is also possible. This means that a transparent area is displayed, but there is nothing to display behind, so DOOM2 displays some random pixels

If you are composing a non-transparent texture the tutti-frutti effect can be caused by improper alignment of a background patch.  A simple example: a 128x128 texture composed of only one 128x128 patch whose upper left corner is pointed at the coordinate 1,0.

A Wrap Around Sky

Despite what one could expect, the sky in DOOM and HERETIC is a texture, not a Floor or Ceiling.

But it's a special texture that cannot be animated and is displayed as if it had been mirrored horizontaly. When you will edit such a texture with WinTex, keep in mind that the real sky will be mirrored.

Replacing a sky texture requires re-using a DOOM2 sky texture name.

We'll reuse SKY1.

Compose four continuous patches 256x128 pixels each. Don't use cyan! but you can use some pale blue. Call those patches SKYA, SKYB, SKYC, SKYD.

Insert those four patches in TUTOR.WAD, by the usual method to insert patches.

Go to the WinTex texture editing window and select texture SKY1.

WinTex reports that this is the sky texture for MAP01 to MAP11.

When you click on SKY1, you can see that the texture is of size 256x128.

Make it 1024x128 by clicking on the horizontal scroll.

Then select the patche SKYA and drop it at position 0,0.

The position 0,0 will be indicated in a little text box above the texture.

Similarly drop SKYB at position 256,0.

Now drop SKYC at position 512,0.

You will need to use the horizontal scroll on the left, because WinTex can only display a 512x256 picture, so you need to move that picture a fair bit on the left.

Now drop SKYD at position 768,0.

Here you are with your non-repeating warparound sky. Funny isn't it?

Try the levels MAP01 with TUTOR.WAD, go outside and see for yourself.

Note: if you're under Heretic, the procedure is the same, but the patches must be bitmaps of size 256x245. However, the texture will still be declared as 1024x128.

Animated Textures

New animated textures require re-using the Doom animated texture names, eg.  BFALL1, SFALL1, FIREBLU1.  Our example will use the FIREBLU1 to 2 sequence (the 'cold fire' texture).

We will use original Doom patches: for the background WALL40_1, and for the animation the eight patches in the VILEG1 to VILEG8 sequence.

Go to the WinTex texture editing window.

Click on menu Patches | In main WAD.

There, select the patch WALL40.

Now in the texture list, select the texture FIREBLU2, the end of the FIREBLU animation.

You will notice that WinTex report them as start and end of an animation.

Create 6 new textures, called FIREA, FIREB, FIREC, FIRED, FIREE, FIREF.

Make sure that those textures are created between FIREBLU1 and FIREBLU2, otherwise they won't be animated. That's why you must always select FIREBLU2 before creating a new texture.

Now, for each of the texture FIREBLU1, FIREA, FIREB, FIREC, FIRED, FIREE, FIREF, FIREBLU2:

- replace the background patch by WALL40.

- Put one of the VILEG1, VILEG2, ... VILEG8 patch.

Put the VILEGx pictures in sequence, and at roughly the same place, for better animation.

By the way: don't be surprised to use sprites on textures. This is well known since TRINITY.WAD by Steve McCrea, one of the best WADs ever.

Now you have the idea, which is to sandwich a sequence between an Animation Start and an Animation End, in that order. Note that it must be the same animation (FIREBLU here), and the Start must be placed before the End. Otherwise, you crash DOOM. Simple.

Go play any level that contains FIREBLU, and see the result. Poor Archvile is turning round and round!

For more detailed information about animated walls read the Unoffical DOOM Specs by Matt Fell.


  Tutorial on Floors and Ceilings editing

This tutorial will help you understand how WinTex can be used to modify the appearance of floors and ceiling, a kind of entry that is called a flat by ID software.

For this tutorial, we assume that you are usinf DOOM2, and that WinTex is installed.

You will be editing a new PWAD file called TUTOR.WAD.

Adding new floors and ceilings to a WAD, and modifying them, is much easier than editing textures. However, it is much more difficult to use those floors and ceilings. One reason is that there is a bug in the DOOM engine, and the other reason is that most of the level editors don't let you use WADs with custom level and ceilings.

So you will need a bit of luck, and a bit of help, before you can actually use custom floor and ceilings. If you're a new user, just forget about this for the moment.

Viewing the flats

First, you may wish to take a look at some flats, to know what it's all about.

From the WinTex main window, click on menu File | Open WAD. Select DOOM2.WAD.

The WinTex Wad editing window appears. There, click on menu Select | Flats

Click on any flat entry in the list of entry, this entry is displayed.

Adding a new flat to your wad

WinTex deals with flats (almost) the same way as with any other graphic entry.

From the WinTex main window, click on menu File | Open WAD.

Select TUTOR.WAD, the same name that is used in the Texture tutorial.

From the WinTex Wad editing window, click on menu Select | Flats.

Then click on menu Edit | Read entry from file.

WinTex will ask a name for the Wad entry, type any name you want, for instance CARPET.

Then WinTex will ask for a picture that will represent your flat.

WinTex will require a picture of size 64x64. You should not use any other size for flats, or you may get real strange results. This size is a constraint of the DOOM engine, not a limitation of WinTex.

There must be no cyan pixels in your picture, or rather no transparent pixels. This is because flats cannot be transparent: there is nothing drawn behind.

Using the flats in your levels

If you have been replacing an existing flat, use your level editor as usual, except that you will know that there is a flat that will look different.

If you have been creating a new flat, like CARPET, then the trouble begins. Your level editor might not be able to let you use CARPET as a flat.

See how you can load a load a level into your WAD.

Then check how to use flats in your levels by tricking your level editor.

Using a WAD containing Flats

Once you have made a WAD containing flats, you may have trouble to use it, because of the bug in the game.

Assuming that in TUTOR.WAD you may have modified an existing flat, here is a safe way to use your WAD: just append all the flats from DOOM2 to your WAD, and then it becomes usable, and fairly fat too.

Go to the WinTex main window, click on menu Merge | Add all flats.

Select TUTOR.WAD.

DeuSF will run for a while and produce a TUTOR.WAD that can be used.

As it is, your WAD, TUTOR.WAD is not usable.

There are three methods to make it useable:

- use only new names for flats, and use F_END. This is tricky.

- append to your WAD all the flats of DOOM2. This is slow, but very safe.

- merge your WAD into the main WAD. This is fast, and safe.

Distributing a WAD file with modified flats

If you are using new names for flats, and using F_END, then you can directly distribute your WAD.

This is the big advantage of using this tricky method. The disadvantage is that you cannot redefine animated flats.

Otherwise, you will need to use an installation batch using the tool DeuSF.

Advanced Flat editing topics

Skip this if you deal with flats for the first time.

Don't replace the flat F_SKY1, it is never used by DOOM2.

It's a fake entry that is always replaced by the sky Texture, when the game runs.

As with other graphics, you should consult the Picture Tricks before you start serious work on a flat. The flats are especially sensitive to Aliasing.

When you insert a flat in a WAD, you will notice that WinTex automatically adds two entries called FF_START and FF_END. These entries indicate the start and end of the flat list. All the flats must remain together.

You can request to use F_END instead of FF_END. Click on menu Guru | Use F_END.

Do this only if you don't redefine any flat. If you use a name that already exist in the main WAD and use F_END, the game will not start. This is because of a bug in DOOM2.


Tutorial on Level editing
 Tutorial on Installation batch

The tool DeuSF, combined with an installation batch, provides a secure way to deal with WADs that contain redefined Sprites or redefined Flats (Floor and Ceilings).

This tutorial assumes that you are using DOOM2, that WinTex is installed, and that you have a WAD called TUTOR.WAD that contains sprites or flats, or both.

If you follow the instruction, you will be able to distribute a small WAD together with two other small files, and anyway it will install properly on any other PC.

Don't distribute WAD files that contain copyrighted data

First, you may have noticed that if a WAD contains redefined textures or flats, you can make it playable by appending all the sprites or flats of DOOM2, or by merging it into the main WAD, DOOM2.WAD.

The idea is to avoid distributing a modified TUTOR.WAD or DOOM2.WAD, because it becomes real huge, and contains a lot of copyrighted data from DOOM2, so it's illegal to distribute it.

This is what the installation batch is for: it is a file that tells DeuSF what to do to install TUTOR.WAD on another PC, if TUTOR.WAD contains redefined sprites or flats. It also create a PLAY.BAT file to play DOOM2 with TUTOR.WAD, and a RESTORE.BAT file, so that TUTOR.WAD can be restored to it's initial state.

When other guys will want to play your WAD, they will just have to type INSTALL, and then when install is complete, they will type PLAY and that's it. It can hardly be made simpler.

Create an installation batch for your WAD

This is almost automatic.

From the WinTex main window, click on menu File | Open WAD.

Select TUTOR.WAD. The WinTex Wad editing window appears.

From the WinTex Wad editing window, click on menu Advanced | Install WAD.

The WinTex install batch window will pop-up. This window is made of three panels.

You will notice TUTOR.WAD indicated on the top panel.

You will also notice there two check box: one for sprites, one for flats.

As you already guessed, check the sprite check box if TUTOR.WAD contains redefined sprites.

check the flat check box if TUTOR.WAD contains redefined flats.

The middle panel is dedicated to DeHacked patches. You can forget about it.

Go directly to the panel at the bottom and click  on button Create.

WinTex will then quickly create the installation batch.

Press on button View, and a text editor will pop-up, that will display the install.bat file that was created.

Unless you're very good at DOS, this file will look fairly cryptic.

You don't need to understand that file.

Files that must be distributed with your WAD

Now you just pack:

- deusf.exe

- install.bat

- tutor.wad

in a single archive file, add a cool tutor.txt file that describes your new creation in enthousiatic terms, and spread it around! Don't forget to tell people that they must put all this in their doom2 directory, and type INSTALL, to run install.bat.

if you are using PKZIP, just type

pkzip tutor.zip  deusf.exe tutor.wad install.bat  tutor.txt

What is the advantage of using DeuSF?

DeuSF is the last version of a tool that I started developping in mid 94. It has been extensively used and tested, and is by far the most reliable (and the most powerful) tool to do the tricky job of sprite and flats installation. Other tools like NWT can do the job, though, but they are not as reliable.

"Thanx" to the new Borland C++ 4.5 libraries, DeuSF.exe has grown very fat, lately.

But it still compressed to around 40K, which makes it smaller even than the tool NWT.

But what if the other guys don't have a PC with DOS?

Well, there are also versions of DeuSF for Linux, SUN O/S, OS/2, and even for strange machines like the Silicon Graphics and the unix DEC stations with processor Alpha.

There is no DeuSF version for the Mac, though.


 Tutorial on Level editing

WinTex is not a level editor. You will need the manual of a level editor for the more basic stuff.

For this tutorial, we assume that you are usinf DOOM2, and that WinTex is installed.

You will be editing a new PWAD file called TUTOR.WAD.

Load a level in a WAD with WinTex

We will explain here how to load a level in TUTOR.WAD.

From the WinTex main window, click on menu File | Open WAD, select TUTOR.WAD

From the WinTex Wad editing window,

Click on menu  Advanced | Edit Levels.

That will start the WinTex level editing window.

This window is not a real level editor, you can just browse levels and do some very special reject tricks here.

Click on menu Level | Load Level.

WinTex will ask you for a level name, type MAP01.

WinTex will tell you that it's an existing level, which is rather normal since you are replacing MAP01, the first level.

Then WinTex will ask for a WAD file, that should contain at least one level. You could select DOOM2.WAD if you have no other WAD, but you could also select another WAD.

The first level in the WAD will be read, and loaded in TUTOR.WAD as level MAP01.

Now MAP01 must have appeared in the list of levels, on the left of the WinTex level editing window.

See level editing for more info on what you can see, and how to use your editor from withing WinTex.


 Tutorial on Sprite editing

Derived from a text by Graham Evans (100101.3700@compuserve.com, author of Urban.wad and Moria.wad), with consent of author.

For this tutorial, we assume that you are usinf DOOM2, and that WinTex is installed.

You will be editing a new PWAD file called TUTOR.WAD.

Menu

1/	A bit of theory on sprites.

2/	How to browse the list of sprites.

3/	How to modify a simple.

4/	Adjust the offsets of sprites.

5/	Playing a WAD containing redefined sprites.

6/	How to modify the monsters sprites.

Preparations

From the WinTex main window, click on menu File | New WAD.

WinTex will ask for the name of a WAD, type TUTOR.WAD.

This will lauch the WinTex main editing panel, on a new WAD completely empty.

Now click on menu Select | Sprites to start a sprite editing session.


Tutorial on Sprite editing: Theory
 Tutorial on Sprite: Theory

There are three main types of sprites in Doom2: Weapons, Monsters and Things.

- Weapons are the pictures that represent the weapon you weild: chaingun, shot gun, etc.

- Monsters are the picture that represent the monsters, in various postures of movement, attack or agony.

- Things are objects like keys, lamps, bodies, etc..

We are going to change the barrels, a kind of thing.

By changeing a sprites, we do not alter how it behaves or what it is called, we just change what a sprite looks like.

(You can alter the way a sprite behaves by using DeHacked. Go to the WinTex editing panel, click on menu Advanced | Install WAD. You will find in the Install panel a small portion of the screen dedicated to DeHacked. Although I've done it, others are more qualified to explain it.

OK, so our new barrel is going to look different but will still explode if you shoot it or crush it.

Secondly, it is NOT possible to add completely new sprites to DOOM or DOOM2, you can only change existing sprites. (With dehacked you can change the name of sprites, but not create entirely new sprites. Well, not if you're new to this at least.)

All sprites for things in Doom are identified as follows:-

XXXXB0

Where XXXX is a four letter identifier, eg PISG for the Pistol, BAR1 for the Barrel.

When you clicked on menu Select | Sprites, you may have noticed that a drop box appeared. If you take a look inside, you will see indications concerning the conventional names of sprites for DOOM2, and what those names are used for.

For instance you will see that BAR1???? corresponds to barrels. This will be useful later, because the conventional names of sprites are not very intuitive nor very relevant.

Where B is a single letter for the sprite frame (the sequence)

The sprite frame starts at A and runs through in sequence, B, C, D, etc.

This is hard to figure out, but DeHacked will help you understand all this.

For monsters this can be different but not for this tutorial.

Where 0 indicates the point of view for the sprite.

A 0 as a number at the end means that it will look the same from all

directions which is why the eye in the triangle always seems to move round

with you.  Monsters and certain things have different viewpoints for different

views but we'll deal with that later.

Barrels have many parts.  There are 2 pictures for the barrel sitting there and 5 pictures for the simple barrel exploding.

BAR1A0  BAR1B0	for sitting there

BEXPA0  BEXPB0  BEXPC0  BEXPD0 and BEXPE0	for explosions

BAR1  means Barrel sitting there. A-B identifies the order of the frames (only two, to provide a very crude animation) and the 0 means it looks the same from all sides.  (No problem 'cause it's round)

BEXP  means Barrel exploding.

OK, now this bit you have to take my word for, BEXPA0 and BEXPB0 are the two frames you see when the Barrel is just about to explode.

BEXPC0, D0 & E0 are the explosion.

Since these are just an explosion, by changing only A0 and B0, we fool ourselves and others into thinking the whole explosion looks different.

Importing  sprites from the main WAD

Theory over let's get to it.


Tutorial on Sprite editing: Browse sprites
 Tutorial on Sprite: Browsing sprites

Go back to the WinTex main panel, and click on menu File | Open WAD. There, select DOOM2.WAD as the WAD to edit.

Don't worry, your precious main WAD won't be modified, even by mistake: WinTex has a protection to prevent modifications to the main WAD file.

This will start another WinTex editing panel, but this time on the main WAD file, so it's not really empty. There, click on menu Select | Sprites, to see only the sprite, otherwise you will be lost.

On the left is a box with all those funny looking names in it like PISGA0 etc.

If you click on a name in this box, the window at right of the screen will show the picture that corresponds to this funny name. For instance, PISGA0 will show a hand with a pistol.

Have a look at a few, weapons, monsters, things, they are all here.

You can click on the two buttons at the bottom of the list, to quickly jump from one sprite type to the next or previous one.

Page down the list about 4/5ths of the way and spot BEXPA0 - E0.  Click on each one, here are your 5 pictures of barrel explosion.


Tutorial on Sprite editing: Modify a sprite
 Tutorial on Sprite: Import a sprites

Now select all entries from  BEXPA0 to BEXPE0 and click on menu Edit | Copy File.

Nothing happens apparently.

Then go back to the panel dedicated to the new WAD, tutor.wad. For the moment this WAD is empty. There, click on menu Edit | Paste Entries. All of sudden the entries BEXPA0 - E0 are transfered from the main WAD to the new tutor.wad!

Well, this will work only if the main WAD panel is still open. So don't close it.

Do the same for BAR1A0 and BAR1B0.

Now the WAD tutor.wad contains the list of entries:

BEXPA0   10  28  =BEXPA0

BEXPB0   10  27  =BEXPB0

BAR1A0   10  28  =BAR1A0

BAR1B0   10  27  =BAR1B0

OK what has happened.

When you have requested to copy the entries from doom.wad, WinTex has stored the references of those entries in the clipboard (not the entries themselves).

When you pasted the entries, WinTex read those references and then copied the corresponding entries from doom2.wad to tutor.wad.

Then Wintex has updated the WAD directory, so that tutor.wad is now a valid WAD.

If you click on any of the entries, you will notice that the same picture than in doom2.wad will be displayed.

You will also notice, more to the right, that a small panel will appear, with strange indications: the x and y offsets of the pictures. Go to that panel, and click on the vertical and horizontal scrolls. See how they change the offsets, and how the picture moves. This is the easiest way to figure out what those strange offsets are used for!

More technically, the offsets determine the position of the sprite picture relatively to the point where the sprite is walking (this point is the center of the cross).

Editing  the sprites

The simpler way to modify a sprite is to select an entry, for instance BAR1A0, and click on menu Edit | Edit Entry. Alternatively, just double-click on BAR1A0.

When you started editing your entry, the WinTex panel will temporarily disapear. This is only to prevent other modifications to the WAD. Don't worry, the WinTex editing panel will come back.

WinTex now will save a .BMP file to your temporary directory (C:\TEMP) and launch your favourite bitmap editor on that file.

Setup a bitmap editor

However, before you edit any bitmap entry, you must tell WinTex what editor you intend to use. WinTex will probably propose to use PBRUSH.EXE because it's the default Windows tool.

If you have a better tool, like PSP 3.0, refuse PBRUSH. Then WinTex will ask you to designate the editor of your choice, for instance PSP30.EXE.

Then WinTex will propose a command line for the tool. Just accept it, unless your bitmap editor is really particular.

Modifying the sprites

Under your bitmap editor, make some modifications to the picture of the sprite.

For instance, you could add a number on the barrel.

Be warned that the cyan color (light blue) that surrounds your barrel will be interepreted as transparent. So if you draw anything in cyan on the barrel, it will look like a hole has been poked into the barrel.

When you've finished, just save the bitmap file and quit your bitmap editor.

The WinTex editing panel, for tutor.wad, will then pop back.

Note that this panel will not pop back until you have closed your editor. So if you don't leave the editor, it will remain hidden forever.

Once the WinTex editing panel is back, WinTex will ask you if you really want to modify the entry. Click OK, unless the drawing you made didn't look good enough.

Then WinTex will ask you if you want to delete the temporary file. Click OK unless you intend to reuse that file for some other reason.

It is possible that WinTex complains about the format of the bitmap file. Please make sure that you saved your temporary file as a 256 color Windows Bitmap, with no compression (RGB, not RLE. RLE is a kind of lame compression).


Tutorial on Sprite editing: Adjust offsets
 Tutorial on Sprite: Adjust the offsets

Now click again on your entry. You will notice that it has changed, and taken your modifications into account.

If you wish you can modify the offsets of that picture, and move it, for instance, more to the right, so that your barrel will look off-center: modify the horizontal offset by clicking on the horizontal scroll, in the offsets panel. You will notice that the X offset will increase, while your picture moves to the right.

Then press on Apply, in the offsets panel. This will write the offsets into the WAD file (Only do that when you are sure that the offsets are those you desire).

Now click on another entry, and click back on BAR1A0. The offsets have not been forgotten.

End of the sprite editing session

Just select menu File | Quit. Now tutor.wad is a valid WAD file, that can be used by other DOOM tools, or edited again by WinTex.

OK.  Next Beer or cigarette.


Tutorial on Sprite editing: Playing a WAD with sprites
 Tutorial on Sprite: Playing a WAD with sprites

Now, because you cannot just run a wad with a couple of new pictures in it

(this is a DOOM bug) you MUST do the next steps in this order.

Go to the main WinTex screen.

then choose whichever solution suits you.

First solution: make a complete sprite WAD.

There, you will see a panel named Wad to edit or modify. There, select the WAD file tutor.wad that you have just finished to build. You may have to change the directory to C:\tutor.

Then press on the button Add All Sprites on the right of this panel.

DeuSF runs for a while, then a text editor screen will pop: this is only DeuSF telling you that it has modified your WAD tutor.wad. close this text.

You will notice tutor.wad has grown much bigger. It now includes ALL the sprites in DOOM2.

You can now play with: doom2 -file tutor.wad

the following is my start up line, remember my Doom2 is in C:\Doom2, my Wad is in C:\tutor directory, you will need to change this line to reflect your settings.

at the C:\DOOM2> prompt I type

doom2 -file C:\tutor\tutor.wad -nomonsters -warp02

This starts doom2 using the wad I have created and goes direct to map02 where I know there are some barrels and turns off the monsters so I don't get killed before I've got to those barrels!

Have a wander and look at your creation, then shoot one and watch it explode!

There you go, wasn't that simple.

Doom2 should not crash, despite you are using a modified sprite WAD.

When you have finished playing, select tutor.wad again and press button Restore PWAD.

Press it only once! WinTex will then quickly tell you that your file tutor.wad has been restored, and actually it has dropped back to it's previous size and content. A sheer miracle!

Second solution: modify the main WAD

Note: IWAD is just another technical name for the Main WAD, doom2.wad.

The solution above is cool, because it doesn't modify the main WAD file. But it is very slow, and takes a lot of disk space.

Since the modifications that DeuSF makes are reversible, why not rather modify the main WAD file, and restore it later?

Go to the panel labeled PWAD to Join, and there, select tutor.wad. You may have to change the directory to C:\tutor.

Press the button Merge in IWAD, and let DeuSF run for a short while.

Your main WAD, doom2.wad has been modified.

In fact, tutor.wad has been merged to doom2.wad, and made into a bigger doom2.wad.

You can browse doom2.wad and see that the barrel is not the same as usual.

But rather, just play DOOM2 as usual: At the C:\Doom2> prompt  type

doom2

You don't need to add -file tutor.wad, because tutor.wad is already in doom2.wad.

When you have finished playing, press on the button Restore IWAD, and doom2.wad drops back to it's previous state (well, that's a good thing, because you sure don't want to install those 15 megs again).

Note that if meanwhile you had delete tutor.wad, well tutor.wad is also restored when you restore the main WAD. Just some DeuSF magic.

The kind of touch that should convince you that DeuSF is really better than other tools ;-)

Distributing a WAD with modified sprites

If you are using new names for sprites, and using F_END, then you can directly distribute your WAD. This is the big advantage of using this tricky method. The disadvantage is that you need to modify the executable of DOOM2, with DeHacked, to change the name of some sprites.

Otherwise, you will need to use an installation batch using the tool DeuSF.


Tutorial on Sprite editing: monster sprites
 Tutorial on Sprite: editing monster sprites

Once you have figured out how to modify the barrel, modifying monsters is not very complicated.

The only additional difficulty is the viewpoints.

Go back to your doom2.wad editing panel.

Select the monster TROO, which is the Imp.

You will notice that TROOA1 is the Imp seen from front, and TROOA2A8 is the Imp seen from the right. Well, actually TROOA2A8 is also the Imp seen from the left, but inverted first.

When you click on TROOA1, WinTex will display the picture, the offset panel, and a small panel under the offset panel. This panel is the Viewpoints indication.

For TROOA1, the viewpoint panels tells you that the normal viewpoint is Front (view) and the phase is A. Which is no more than an explicit decoding of A1.

For TROOA2A8 , the viewpoint panels tells you that the normal viewpoint is Front Left (view) and the phase is A, but the inverted viewpoint is Front Right (view) and the phase is A.

This should be enough for you to understand that A2 codes for the normal viewpoint, and A8 codes for the inverted viewpoint. This means that when the sprite will be seen from Front Right, Doom2 will use the same picture as for Font Left, but mirrored horizontally.

So an entry which is related to a sprite has a strange name composed of five parts.

For instance let's take the sprite TROOA2A8:

Sprite name:	TROO	(means:an Imp)
Normal picture, phase:	A	(means: first walking phase)
Normal picture, viewpoint:	2	(means  front left)
Mirrored picture, phase:	A	(means: first walking phase)
Mirrored picture, viewpoint:	8	(means: front right)

Apply this pattern strictly, when modifying the names of other sprite entries.

If WinTex cannot decode a sprite name, then something is wrong with it.


 Tutorial on picture editing

For this tutorial, we assume that you are using DOOM2, and that WinTex is installed.

You will be editing a new PWAD file called TUTOR.WAD.

Viewing the pictures

First, you may wish to take a look at some pictures, to know what it's all about.

From the WinTex main window, click on menu File | Open WAD. Select DOOM2.WAD.

The WinTex Wad editing window appears. There, click on menu Select | Graphics

Click on any entry in the list of entry, this entry is displayed.

Adding a new graphic to your wad

From the WinTex main window, click on menu File | Open WAD.

Select TUTOR.WAD, the same name that is used in the Texture tutorial.

From the WinTex Wad editing window, click on menu Select | Graphics.

Then click on menu Edit | Read entry from file.

WinTex will ask a name for the Wad entry, type any name you want, for instance TITLEPIC.

Then WinTex will ask for a picture that will represent your graphic.

Select a 320x200 picture (that is, a picture of the same size of the original titlepic).

Modifying graphics from the game

This is not recomended, because those graphics are copyrighted.

However, if you really want to do it:

Keep TUTOR.WAD opened.

Form the WinTex main window, open DOOM2.WAD like you opened TUTOR.WAD.

Don't worry, you can't modify DOOM2.WAD by mistake. WinTex refuses to modify IWADs.

A new WinTex Wad editing window appears, that deals with DOOM2.WAD.

Click on menu Select | Graphics.

Now, in the list of entries, select entry TITLEPIC (or more entries).

Click on menu Edit | Copy entry.

Now go back to the WinTex Wad editing window than deals with TUTOR.WAD.

Click on menu Edit | Paste entry.

The entry TITPLEPIC from DOOM2.WAD is now in TUTOR.WAD.

You can close the Wad editing window that deals with DOOM2.

Warning: you can copy between files for DOOM and DOOM2, but not between files for DOOM and HERETIC. This is because pictures use a different color palette.

The picture tricks

Those are general tricks to use when creating Graphics for DOOM or HERETIC.

Those tricks are made necessary because of the limitations of the DOOM engine.

This engine is especially sensitive to aliasing, and unable to deal with colors correctly.

Reduction of picture colors (Color quantisation)

Most of the time, when you work on pictures meant for DOOM, you will work on RGB pictures (24 bit mode). But unfirtunately DOOM only supports 256 colors (8 bit color), and even worse: only the 256 colors of a special DOOM palette. It's the same for HERETIC, but the palette is different.

So you must fit the colors in your pictures down to that special palette.

Of course, the first step is to alway use colors that are close to the DOOM or HERETIC palette.

Here is how to fit your picture to the DOOM palette, using the cool Shareware PaintShop Pro 2.0.

- Load a reference picture file, extracted from the main WAD.

- Select menu Colors | Save Palette and save the palette to a file.

- Load the file you want to convert.

- Select Menu  Colors | Load Palette, browse to find the palette, select it.

- In the 'apply palette to image using' box, possibly select Error diffusion. Select Ok.

Then save your file as BMP - OS/2 or Windows Bitmap, Windows RGB Encoded

DOOM will now display your Graphic pretty much as you expect. Experiment with this first, as your program might not do what you expect it to. For example ZSoft's PC Paintbrush will load the DOOM Graphic correctly and allow you to save the palette. However, if you take a 24 bit image and load the palette, nothing will happen. You can let PC Paintbrush convert the image to 256 colors (which it will do poorly), and then apply the palette. The results will be grotesque, because it doesn't quantize when applying a palette. A DOOM palette saved in this program would be useful only for Graphics you want to hand-draw from scratch. The moral is, if you don't know what you're doing, experiment first before using a Graphic you don't want to lose.

Note that WinTex supports 24-bit bitmap (millions of colors), but color matching is slow as hell.

Avoid using Million colors with WinTex, always use 256 colors.

Smooth the pictures (Anti-aliasing)

The DOOM engine use a pervert technique when scaling down a picture (for instance, a monster seen from very far away): it suppresses lines and columns.

Do that, and at best, you end-up with a terrible looking pictures. At works, you are a victim of aliasing, the same phenomenom that happens when a sound is under-sampled. Hight frequencies and low frequencies mix up and the result can be painful to the eye (or the ear).

There is only one defense against aliasing: cutting the high frequencies, which, put in graphic terms, means smoothing your picture.

After you created a picture of a monster or a wall patch or a floor, you'd better apply one of those smooth or blur filters found in all graphic package. Be warned that they may only work with 24-bit RGB picture, and thus you will need to quantise your color after smoothing.

Paint Shop Pro can do all that: convert your picture to 24-bit, smooth it, load the DOOM palette and you've got a valid bitmap again, but much more suitable for DOOM this time.

Avoiding regular patterns (Anti aliasing)

You will want to avoid all repeating or regular patterns in your wall patches or your floors.

The reason is always the same: aliasing. A repeating pattern, especially if the pattern is short, corresponds to rather high frequencies, and when it's scaled down the resulting mess is terrible.

Good example of that mess are the yellow and black stripes in Aliens-TC, and the original floor of Alien-TC.

To avoid trouble, you will never use grids or meshes, unless they have a very irregular pattern. A grid of step 64 pixel will generate little aliasing, execpt at very far distance.

The rule is: the further your pattern shall be seen from, the least regular is shall be.