                                  WADWHAT 2.3
                       by Gregory P. Kwok (gkwok@jps.net)

                              based on WADWHAT 1.1
               by Randall R. Spangler (rspangle@micro.caltech.edu)
                

-----------------------------------------------------------------------------
1. Introduction
-----------------------------------------------------------------------------

Have you ever downloaded a WAD file and wondered which maps it replaced?
Have you ever wondered if the map you're about to start contains 10
cyberdemons? And how much ammo can you afford to waste in the map, anyway?

If you've had any of these questions, then WADWHAT is for you. WADWHAT
provides simple, easy-to-read numbers on the contents of any WAD file.
Some nifty features:

* Prints which maps are contained in the WAD
* Tells whether a map can be used single-player, cooperative, or deathmatch
  (and prints the number of deathmatch starts)
* Lists things present in each map at each skill level
  - Bosses (Barons, Cyberdemons, Spiderdemons)
  - Monsters
  - Weapons
  - Items
  - Ammo
  - Total healing and armor
* Calculates a difficulty rating for each map based on the ratio of monsters
  to ammo
* Calculates an average brightness of the level--how well lit it is
* Prints the number of secrets, triggers, and sectors with nukeage floors
* IT'S FREE

What's new in version 2.3:
* Updated my e-mail address in the documentation and executable
  (no code changes)

What's new in version 2.2:
* Updated this short documentation file

What's new in version 2.1:
* Revisions in documentation
* Included source code for 2.x

What's new in version 2.0:

* Full support for Doom 2 wad files!
* Fixed count of deathmatch start positions
* Removed wildcard capability (eg, WADWHAT *.wad)
* Brief listing is highly compressed to accomodate all the new monsters

What's new in version 1.1:

* Fixed count of light amp goggles
* Total damage and monster hit points can be >65000 now
* Fixed divide-by-zero errors if there was no additional ammo in the level
* Prints average light level (not counting blinking lights)
* Prints number of secret sectors, nukeage sectors, total sectors
* Prints number of triggers, total linedefs
* Prints presence/absence of reject resource
* Fixed multi-player map info (/B4 and /B4M now print differently)
* Now has separate columns for each skill level of multi-player info


-----------------------------------------------------------------------------
2. Usage Restrictions and Warranty (lack thereof)
-----------------------------------------------------------------------------

WADWHAT is free. Completely free. Source is even included, for the curious.
(Note that it's even COMMENTED :-) All I ask is that if you use the source
for WADWHAT in any other program that you give me credit in the
documentation.

WADWHAT also comes with no warranty of any kind (hey, you get what you pay
for). Use it at your own risk. May contribute to global warming and many
other disasters. If, by some chance, you find a way to melt down your
computer with WADWHAT, you're on your own.


-----------------------------------------------------------------------------
3. How to Use WADWHAT
-----------------------------------------------------------------------------

It's pretty simple. Just give it a filename and the directory:

     WADWHAT foo.wad

WADWHAT will then print the contents of all the WAD files to your screen.
Because there's quite a bit of output, you might want to pipe the output of
WADWHAT to MORE (which comes with MS-DOS). This will pause the output every
screenful:

     WADWHAT doom.wad | MORE

You can also redirect the output of WADWHAT to a file:

     WADWHAT doom.wad > doom.inf


-----------------------------------------------------------------------------
4. Output Format--Normal
-----------------------------------------------------------------------------

When run on a WAD file, WADWHAT will produce output similar to the following:

C:\Games\Doom2\Wads>wadwhat fortress.wad
WADWHAT 2.3 by Gregory P. Kwok (gkwok@jps.net)
Based on WADWHAT 1.1 by Randall R. Spangler (rspangle@micro.caltech.edu)
===============================================================================
PWAD FILE fortress.wad:
-------------------------------------------------------------------------------
MAP 01              Difficulty: S1    S2    S3   S45 |    M1    M2    M3   M45
-------------------------------------------------------------------------------
    Play modes:
	Single player
	Cooperative (4 player)
	Deathmatch (10 starts)
    Bosses:
	Baron                    0     0     1     2 |     0     0     1     2
    Monsters:
	Trooper                  0     0    50    18 |     0     0    50    18
	Sergeant                42    42    18     2 |    42    42    18     2
	Chaingun guy             0     0     0    42 |     0     0     0    42
	Imp                     20    20    28     0 |    20    20    28     0
	Demon                    4     4     8     0 |     4     4     8     0
	Spectre                  0     0     0     8 |     0     0     0     8
	Cacodemon                0     0     2     4 |     0     0     2     4
	Archvile                 0     0     0     1 |     0     0     0     1
	Revenant                 0     0     4     8 |     0     0     4     8
	Mancubis                 1     1     2     0 |     1     1     2     0
	Arachnotron              1     1     2    16 |     1     1     2    16
	Mini Baron               2     2     0     0 |     2     2     0     0
	Pain Elemental           0     0     0     2 |     0     0     0     2
    Weapons:
	Super shotgun            1     1     1     1 |     2     2     2     2
	Chaingun                 1     1     1     1 |     2     2     2     2
	Rocket launcher          1     1     1     1 |     1     1     1     1
	Plasma gun               1     1     1     1 |     2     2     2     2
	Chainsaw                 0     0     0     0 |     1     1     1     1
    Equipment:
	Backpack                 1     1     1     1 |     2     2     2     2
	Berserk                  1     1     1     1 |     1     1     1     1
	Invisibility             1     1     1     1 |     1     1     1     1
    Expendibles:
	Bullets                460   230   480   320 |   520   260   510   350
	Shells                 736   368   272   208 |  1336   668   572   508
	Rockets                106    53    53    53 |   108    54    54    54
	Cells                  200   100   100   100 |   320   160   160   160
	Armor points           400   200   200   200 |   400   200   200   200
	Health points         1000   500   500   500 |  1000   500   500   500
    Difficulty:
	Total monster hp       496   496   922  2006 |   496   496   922  2006
	Max ammo damage       8132  4066  3644  3036 | 12672  6336  5914  5306
	RATIO                0.061 0.122 0.253 0.661 | 0.039 0.078 0.156 0.378
    Other info:
	Average brightness             241 (0=dark, 255=bright)
	Secrets                          0
	Nukeage / sectors         1 /  149
	Triggers / linedefs      43 /  675
	Reject resource                YES

At the top of the output is the name of the WAD file. Id has
requested that all add-on files be PWADs, but you may run across an
IWAD or two out there. After that is the information for each map
(the example file contains only one map). The columns contain

     * The type of thing being counted
     * The number present at skill level 1 (I'm Too Young to Die)
     * The number present at skill level 2 (Hey, Not Too Rough)
     * The number present at skill level 3 (Hurt Me Plenty)
     * The number present at skill levels 4 and 5 (Ultra-Violence and
       Nightmare)
     * Similar numbers, but for multi-player (cooperative or deathmatch) mode

If a thing does not appear in a map (for example, dork.wad doesn't have any
Rad Suits) it won't be listed.

Expendibles are calculated differently from the previous sections. These are
the total amounts of each thing from all possible sources. For example,
bullets come from clips, the chaingun, boxes of ammo, and killed troopers.
Armor comes from the green and blue armors, and the helmet armor bonuses.

Skill level 1 (I'm Too Young to Die) is the same as skill level 2 (Hey, Not
Too Rough), except that all damage to the player is halved and all ammo
amounts are doubled.

A level with a low average brightness (128 or less) will be poorly lit; one
with a high brightness (220 or more) will be very well lit, with only a few
dark nooks. Secret sectors and sectors with nukeage (floors which damage you)
are counted. Triggers are lines which open doors, drop lifts, and so on when
you walk over, push, or shoot them. The total number of sectors or linedefs
is a good gauge of level complexity. The REJECT resource speeds up drawing
the level--the same level will play more smoothly if this is present.


-----------------------------------------------------------------------------
5. Output Format--Brief
-----------------------------------------------------------------------------

If you're trying to compare a number of WAD files, the full output may be a
bit unwieldy. WADWHAT has a brief output mode which prints one line per map,
assuming a given skill level:

C:\Games\Doom2\Wads>wadwhat /B4 fortress.wad
WADWHAT 2.3 by Gregory P. Kwok (gkwok@jps.net)
Based on WADWHAT 1.1 by Randall R. Spangler (rspangle@micro.caltech.edu)
===============================================================================
St Bosses   Monsters                                     Weapons  Equip   RATIO
cd ba-c-s-f tr-se-ch-ss-im-de-sp-ls-ca-av-re-ma-ar-mb-pe cps2crpb bvsiral -----
4A  2 0 0 0 18  2 42  0  0  0  8  0  4  1  8  0 16  0  2 .2.#456. B.SI... 0.661
The brief output has the following sections:

St             Starting positions. "c" is the number of cooperative
               players, and "d" is the number of deathmatch starts, in hex.
Bosses         The number of barons, cyberdemons, and spiderdemons.
Monsters       The number of troopers, sergeants, imps, demons,
               spectres, lost souls, and cacodemons. "++" will be
               printed if more than 99 of a monster are present.
Weapons        Which weapons can be found in the level: C=chainsaw,
               P=pistol, S=shotgun, 2=double shotgun, C=chaingun,
               R=rocket launcher, P=plasma gun, B=BFG-9000.
Equip          Which equipment is present: B=backpack,
               V=invulnerability, S=berserk, I=invisibility, R=rad
               suit, A=computer map (allmap), L=light amp goggles.
RATIO          The difficulty ratio of the map at the specified skill
               level.

Some levels add additional items in multi-player mode. To see the
brief totals in multiplayer mode, add a 'M' to the end of the /B flag
(so "/B4M" instead of "/B4").


-----------------------------------------------------------------------------
6. Difficulty RATIO
-----------------------------------------------------------------------------

The difficulty ratio is an attempt to provide some indication of how
challenging a map is, based on the number of monsters and the amount of ammo
in the map. Total monster hp is the damage required to kill all the monsters
in the map. Max ammo damage is the amount of damage that could be done by
using up all the ammo in the map. This assumes that every pellet from a
shotgun hits, and rockets always hit directly. The higher the RATIO is, the
more difficult the map.

Some numbers from the DOOM episodes:

Average episode 1, "Hurt Me Plenty"               0.177
Average episode 2, "Hurt Me Plenty"               0.399
Average episode 3, "Hurt Me Plenty"               0.374

Average "I'm Too Young to Die"                    0.096
Average "Hey, Not Too Rough"                      0.192
Average "Hurt Me Plenty"                          0.317
Average "Ultra-Violence"                          0.448

Easiest map: E1M1, "I'm Too Young to Die"         0.013
Hardest map in shareware: E1M8, "Ultra-Violence"  0.493
Hardest required     map: E3M6, "Ultra-Violence"  0.738
Hardest secret map: E2M9, "Ultra-Violence"        0.915


Some numbers from the DOOM 2 levels:

Average "I'm Too Young to Die"                    0.104
Average "Hey, Not Too Rough"                      0.208
Average "Hurt Me Plenty"                          0.400
Average "Ultra-Violence"                          0.565

Easy map: MAP01, "I'm Too Young to Die"           0.060
Hard map: MAP08, "Ultra-Violence"                 1.218
Hard map: MAP16, "Ultra-Violence"                 1.118
Hard map: MAP20, "Ultra-Violence"                 0.583
Hard map: MAP24, "Ultra-Violence"                 0.578
Hard map: MAP28, "Ultra-Violence"                 0.987


-----------------------------------------------------------------------------
7. Bugs and Limitations
-----------------------------------------------------------------------------

If -respawn is used, the effective number of monsters in the map will
increase because they keep coming back to life.

The RATIO ignores damage that may be done by exploding rockets, barrels,
BFG-9000 blasts, and monsters killing each other. It also doesn't take into
account damage done by the chainsaw or fists. A better measure of map
difficulty would probably also use the amounts of armor and health available
(any ideas for how they should be counted?)

In multi-player mode, there will be slightly less ammo available because each
weapon can only be picked up once per life. However, players which die start
over with 50 bullets each time and can pick up each weapon again, so the net
effect is probably small.


-----------------------------------------------------------------------------
8. Information About the Authors
-----------------------------------------------------------------------------

WADWHAT is FREEWARE, but you can send comments, money, etc. to

  Snail mail: Randall R. Spangler (WADWHAT 1.1)
              Caltech 116-81
              Pasadena, CA 91125
              USA

  Internet:   gkwok@jps.net (Gregory Kwok)
              http://www.jps.net/gkwok/

              rspangle@micro.caltech.edu (Randall Spangler)

Gregory Kwok has written several shareware and freeware programs available
on his website.

Randall Spangler has also written some inexpensive shareware programs--try
them out! (available by anonymous FTP, or e-mail):

 HOWITZER 0.95 (a SuperVGA artillery simulation game, 386 required)
   ftp://ftp.uml.edu/msdos/Games/Misc/hwitz095.zip

 UNIXCORN 1.3 (enhances any shell or DOS Prompt, for Windows 3.1)
   ftp://oak.oakland.edu/SimTel/msdos/windows3/unixcn13.zip
   ftp://winftp.cica.indiana.edu/pub/pc/win3/util/unixcn13.zip


