DOOM THING STATS
================

Doom Thing Stats - Prints statistics for things in Doom/Doom2 levels.

Similar to, and inspired by "Doom Thing Analyser" by Yonatan Donner,
but doesn't need MS-DOS to run.

Author: Dennis Katsonis

Synopsis
--------
doomthingstats [OPTIONS] 

Description
-----------

This analyses the "THINGS" lump in Doom/Doom 2 WADs and prints
statistics regarding how many monsters, weapons and items are in the
level.  It also (optionally) prints totals and a few statistics which
may be useful for determining the weapon/monster balance.

This will analyse ALL levels in the WAD.

By default, it lists how many of each item is in the level.  This
ignores static items which don't impact gameplay, such as decorations
and obstacles.

The information this gives you is...
* How many of each type of monster is in the level.
* How many of each ammo type is in the level.
* How many of each weapon is in the level.  This does NOT include
weapons dropped by monsters.
* How many of each artefact and powerup is in the level.
* Keys in the level.
* Player starts and teleport destinations.

Optionally, you can print totals, to get the total monsters, total
weapon, ammo, artefact and weapon pickups.  There is also an option to
print a "Grand Total", which adds all the items for all the levels
together, giving you an overview of the entire WAD.  Obviously, this
won't do anything if your WAD has only one level.

Along with the totals, is the total number of health points that you
can pick up in the level, and total armour points.  These are
calculated based on the maximum number of health and armour points the
pickup can provide, so Blue Armour counts for 200, Soul Sphere 100
health and Berserk 100 health.  During gameplay, often some of this is
"wasted", for example, if you pick up a Soul Sphere while you have
130% health, you only get the additional 70%.  So "Health Points" and
"Armour Points" are the maximum theoretical.  Note the berserk counts
for 100, even though you can never get more than 99 additional health
units from it.  I'll leave it to you, dear reader, to figure out why
that is.

Note that with the ammo totals, this by default does NOT include ammo
dropped by enemies.  You can use the "-m" option to include
weapon/ammo drop by enemies in with the count.  Note that sometimes
the weapons and ammo cannot be picked up because the enemy was killed
in a place where the player cannot reach, they might be crushed or
gibbed and not drop a weapon.  For this reason the default is to not
include these, for a conservative ammo count.

By default, the Ammo Damage just assumes that ALL ammo in the level
can be used, regardless of whether there is a weapon available in the
level which can be picked up to use it or not.  Use the "-e" option to
exclude this ammo from the Ammo Damage count.  The ammo will still
appear as an item though.  Also, if this is a multilevel WAD, and you
are printing stats for the entire WAD, then any weapon pickup in a
level, will count as being in the players possession for the entire
WAD therein.  If you are printing a grand total at the end, and are
using this option, then the total will not take into account the fact
you can only carry a limited amount of ammo from one level to the
next.  So if there are 1,000 cells in levels 1-3 for example, and you
don't pick up the Plasma Gun until level 4, then the individual level
stats will make sense, but the total ammo damage for the WAD will
assume all 1,000 cells were picked up.  Obviously this is wrong, but
its difficult to properly account for this accurately, and usually
multilevel WADs won't give lots of ammo for weapons which are not
available to such an extent

Monster Hitpoints is the total hitpoints of the enemies in the level,
that is to say, the amount of damage that will need to be dished out
to kill all enemies.  This does not include enemies that are
resurrected by Archviles, or Lost Souls spat out by Pain Elementals,
so the figure may be higher.

Ammo Damage is the total hitpoints that can be delivered by the ammo
in the level.  That is to say, the number of hit points damage that
would be inflicted on enemies, if all the ammo present in the level
was used.  This is based on the average damage, as there is some
randomness that can make a shot give more or less damage.  Two things
to note here.  The damage from shells is based on the shell being
fired from a Shotgun, not Super Shotgun.  The Super Shotgun can give a
little more damage per shell.  For cells, these are calculated based
on the Plasma Rifle.  The BFG 9000 gives a different amount of
damage, which is highly variable.  So this means that for Doom 2
levels, the Ammo Damage component from shells may be underestimated,
and for levels with a BFG 9000, the Ammo Damage component from cells
may also be underestimated.

The Monster Hitpoint/Health ratio is the ratio of monster hitpoints to
your own hitpoints, or health available.  The higher this is, the more
difficult the level.

Lastly, the Ammo:Monster hitpoint ratio is simply the ratio of damage
that can be dealt by the weapon and ammo pickups, vs the damage that
needs to be dealt to kill monsters.  So a ratio greater than 1 means
there is likely more ammo than is needed to kill the monsters, and a
ratio of less than 1 means that there is less ammo than is needed to
kill the monsters.  This is also impacted by whether you include
monster weapon and ammo drops or not in the ammo count or not.  To put
it simply, a ratio of 2 means there is roughly twice as much ammo as
necessary to kill all monsters, assuming no infighting, barrels, etc.
The lower the ratio, the more careful the player will need to be with
ammo.

For reference, levels in Doom 2 usually have an Ammo/Monster Health
ratio of 2 - 5, and a Monster Hitpoint/Health ratio of 10 - 20, with
some levels higher.

The "-s" skill option enables you to calculate stats for a specific
skill level
1	I'm too young to die.
2	Hey, not too rough.Normal 	
3	Hurt me plenty.
4	Ultra-Violence.
5	Nightmare!

This way you can see the stats as if playing that particular skill
level.  By default, or if a skill level of "0" is given, it will
simply include all object in the level, regardless of which skill
levels they don't appear in AND also if they are deathmatch only.  So
the default will include deathmatch only weapons, ammo, etc.  You will
probably want to specify a skill level if you want to use the stats to
judge single player games.

This program also takes into account that the amount of ammo is
doubled for skill levels 1 and 5 for ammo and weapon pickups.

The "-d" option is to include "multiplayer only" items as well.  By
default, these are excluded.

Options.
-------

-h
Help/Usage

-l
Version and License information.

-t
Print Summary and Totals for the level.

-e
Exclude from weapon damage missing weapons.

-g
Print Grand totals for all levels combined.

-d
Include multiplayer only objects.

-s N
Analyse things assuming skill level N (1-5)

-m
Include weapons dropped by enemies in ammo stats.


Examples
--------
doomthingstat -s 4 -m -t xcalib11.wad

Print stats for xcalib11.wad, for Skill level 4, including totals and
ammo/weapons dropped by monsters.  If you specify more than one wad file,
the superfluous ones are just ignored.

Bugs
----
No known bugs.

