mcount.pl
A Perl script that dumps monster count / HP statistics for DOOM WAD files. Current version: 1.12. Copyright © 2004-2010 Schneelocke; licensed under the terms of the GNU GPL.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
Download | Screenshot | Help | Changes | TODO |
Download
- mcount.pl 1.12
- mcount.pl 1.11
- mcount.pl 1.10
- mcount.pl 1.09
- mcount.pl 1.08
- mcount.pl 1.07
- mcount.pl 1.06
- mcount.pl 1.05
- mcount.pl 1.04
- mcount.pl 1.03
- mcount.pl 1.02
- mcount.pl 1.01
- mcount.pl 1.00
- mcount.pl 0.99
- mcount.pl 0.98
- mcount.pl 0.97
- mcount.pl 0.96
- mcount.pl 0.95
- mcount.pl 0.90
Sample output (a.k.a. screenshots)
Basic usage
Regular DOOM level:
$ ./mcount.pl --map=map24 hr.wad Map / Monster S2 S3 S4 ------------------------------------------------------------------------------- Map: MAP24 Heavy Weapon Dude : 12 20 37 Imp : 143 143 143 Demon : 28 28 28 Cacodemon : 8 16 60 Hell Knight : 6 10 12 Baron of Hell : 7 11 41 Arachnotron : 3 6 16 Pain Elemental : 10 20 35 Revenant : 10 27 88 Mancubus : 12 22 52 Arch-vile : 17 27 49 Spider Mastermind : 2 2 4 Cyberdemon : 3 8 14 Total : 261 340 579 Total HP : 72420 125780 268270
Compact mode display of an entire megawad:
$ ./mcount.pl --compact ksutra.wad Map S2 S3 S4 ------------------------------------------------------------------------------- Map: MAP01 29 42 44 Map: MAP02 57 95 110 Map: MAP03 34 58 68 Map: MAP04 75 111 132 Map: MAP05 59 78 105 Map: MAP06 57 108 146 Map: MAP07 48 100 128 Map: MAP08 105 170 200 Map: MAP09 104 118 133 Map: MAP10 122 158 196 Map: MAP11 121 181 223 Map: MAP12 47 60 73 Map: MAP13 168 292 327 Map: MAP14 151 199 282 Map: MAP15 134 195 247 Map: MAP16 211 280 327 Map: MAP17 112 152 178 Map: MAP18 235 314 401 Map: MAP19 125 203 293 Map: MAP20 336 493 544 Map: MAP21 79 136 210 Map: MAP22 112 156 198 Map: MAP23 160 278 385 Map: MAP24 144 196 247 Map: MAP25 91 184 316 Map: MAP26 261 491 623 Map: MAP27 216 376 436 Map: MAP28 613 1106 1716 Map: MAP29 544 747 882 Map: MAP30 3 5 9 Map: MAP31 408 605 886 Map: MAP32 98 149 176 ------------------------------------------------------------------------------- Total 5059 7836 10241
DeHackEd monsters:
$ ./mcount.pl scythe2.wad --map 27 Map / Monster S2 S3 S4 ------------------------------------------------------------------------------- Map: MAP27 Heavy Weapon Dude : 8 11 15 Imp : 42 72 81 Demon : 7 7 20 Spectre : 11 16 21 Cacodemon : 20 40 50 Hell Knight : 14 17 23 Baron of Hell : 15 13 13 Arachnotron : 2 2 2 Pain Elemental : 2 4 6 Revenant : 48 74 102 Mancubus : 24 32 38 Arch-vile : 4 5 12 Cyberdemon : 3 4 6 [D] Commander Keen : 4 5 Total : 200 301 394 Total HP : 81180 119540 158260
Custom DECORATE monsters (ZDoom):
$ ./mcount.pl 1000screams.wad --map e2m6 Map / Monster S2 S3 S4 ------------------------------------------------------------------------------- Map: E2M6 Trooper : 13 15 18 Sergeant : 64 76 82 Imp : 436 531 629 Demon : 219 279 378 Spectre : 12 20 36 Lost Soul : 673 857 1179 Cacodemon : 197 290 412 Baron of Hell : 276 296 433 Baron of Hell (stealth) : 8 14 17 Spider Mastermind : 3 3 3 Cyberdemon : 3 4 6 [C] HellElemental : 92 131 192 [C] Cardinal : 28 40 77 [C] OverLord : 2 3 4 [C] Hellion : 11 21 33 [C] MetaCyberdemon : 5 7 10 Total : 2042 2587 3509 Total HP : 663660 831860 1202970
Fancier stuff
How many arch-viles are there in "Speed of Doom", all in all?
$ ./mcount.pl sodfinal.wad --map all --summary --no-levels --monsters=archie Map / Monster S2 S3 S4 ------------------------------------------------------------------------------- Summary Arch-vile : 199 240 307 Total HP : 139300 168000 214900
Which maps are present in Ultimate Doom?
$ ./mcount.pl --dump-levels doom.wad E1M1-9, E2M1-9, E3M1-9, E4M1-9
Help text
mcount.pl 1.12 Copyright (C) 2004-2010 Schneelocke, licensed under the terms of the GNU GPL v2 (or, at your option, any later version) Usage: mcount.pl [OPTION]... FILE Options: --game=... Select game (valid choices: doom, heretic, hexen; default: doom) --skill=... Select skill(s) (1-5, all for all; default: UV) --map=... Select map(s) (all for all; default: MAP01) --resource=... Use resource WAD(s) (for custom monsters) --format=... Force doom/hexen WAD format (valid choices: doom, hexen; default: autodetect) --deh=... Load DEH file(s) (for monster HP adjustment) --no-custom Disable recognition of custom ZDoom monsters --no-dehlump Disable loading of DEHACKED lumps --allthings Always report all THINGS entries DOOM-specific options: --no-lostsouls Ignore Lost Souls --powerups Output stats for powerups rather than monsters --sort=... Specify sort order (valid choices: default, wiki) --monsters=... Only process specified monsters --no-monsters=... Process all but the specified monsters Output control options: --total Enable combined (all skills) monster count --summary Enable monster summary (all levels) --compact Enable compact view (total monster counts only) --multi Enable multi-player stats --no-hp Disable hitpoint stats --no-single Disable singer-player stats Miscellaneous options: --verbose Verbose output --debug Debug output (implies --verbose) --dump-monsters Dump monsters (after loading WADs, if any) --dump-levels Dump level numbers after loading WAD --help Print this help screen Example: mcount.pl --skill=hmp --map=map01,5-7 --summary WADFILE.WAD This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Changes
1.12
- Make --skill a bit DWIMier.
- Add handling of #include statements in DECORATE lumps (used e.g. in 1000SCREAMS.WAD).
- Fixed a subtle bug that might be cause DEHACKED lumps to be ignored if they follow BEHAVIOR and DECORATE lumps.
- Implement rudimentary, hackish detection of DECORATE monsters' hitpoints. A warning is printed if DECORATE monsters with zero or unknown hitpoints are found.
- Add --debug option (implies --verbose).
- Make --monsters and --no-monsters work with DECORATE and DEHACKED monsters.
1.11
- Allow tids for --monsters and --no-monsters.
- Fix map name printing glitch (introduced in 1.10).
- Added all remaining DeHackEd thing number to doomednum (thing ID) mappings — at least those that appear in vanilla DOOM.
1.10
- Rename --dump option to --dump-monsters.
- Add --dump-levels option.
1.09
- Add --monsters and --no-monsters options for fine-grained control over which monsters (don't) get counted. (DOOM only.)
- Add --no-levels option to suppress stats output for individual maps (they still get counted, though). Useful in conjunction with --summary.
1.08
- Make it clear(er) that --summary displays a summary for all level that were shown, rather than all levels in the WAD.
1.07
- Add --sort option to specify sort order (DOOM only so far). Sort orders implemented are the default sort order and the DOOM wiki sort order.
- Allow --map specifications along the lines of "--map=e1m1-5", "--map=e3m4-m7" and so on.
- Fix a --map handling glitch.
1.06
- Added --powerups option to display powerups instead of monsters (DOOM only so far).
1.05
- Fix handling of non-standard map names (noticed in TNT01_GL.WAD).
- Add --allthings option.
1.04
- Disregard custom weapons etc. when scanning for custom monsters (noticed in ZENDYN_X.WAD).
1.03
- Implement automatic adding of new DEHACKED monsters (for known IDs).
- Add --dump option.
- Add new DEHACKED id mapping: 116 => 23 (Dead Lost Soul), used in PE4_DT3.WAD
- Add more --verbose output.
1.02
- Unbreak layout for DECORATE monsters.
1.01
- First stab at DEH file loading support (--deh). Works, but only for DOOM so far. DeHackEd 2.3/3.0 files for DOOM versions 14/17/19/20/21 in patch format 5 and 6 are accepted, but testing has been very limited; BEX files haven't been tried at all. DEH-modified monsters are marked with a "[D]" in the list.
- DEHACKED lump loading support; this is automatically on, and can be disabled with --no-dehlump.
- Verbose mode (--verbose).
1.00
- Explicitely label Skulltag monsters.
- Add Abbadon and Belphegor to Skulltag monsters.
- Correct thing numbers for Blood Demon, Dark Imp and Super Shotgunner (from DoomBuilder).
- Adjust sort order of monsters:
- Blood Demon appears after Spectre now
- Dark Imp appears after Imp and Stealth Imp now
0.99
- Fix hitpoint output in compact mode.
- Avoid spurious warnings from Getopt::Long.
- Add --no-lostsouls option to ignore Lost Souls.
- Ignore case for --game selection.
0.98
- Disable Strife support for now.
- Minor --map selection fixes.
- Add --no-single option to disable single-player stats.
- Add --compact output.
- Default to all skills instead of just UV if no skill is specified.
0.97
- Allow usage of resource WADs for custom monsters.
- Correctly detect single-player vs. multi-player monsters for Hexen format maps.
- Fix layout for custom monsters.
- Flag custom monsters with [C] instead of (custom) (to save screenspace).
0.96
- Print a warning when Strife is selected as the game.
- Allow map range specifications à la --map=map01-map03, --map=e1m1-e2m8, --map=e1 (for e1m1-e1m9), --map=5-7 and so on.
0.95
- Remove mkII monsters (I can't find references to them again, and I'm not sure where I got them from, anyway).
- Hitpoint statistics.
- Tighter output layout (more 80 column-friendly, at least as long as you don't request too much information at once).
- Ability to specify --map=all and/or --skill=all.
0.90
- Recognize custom ZDoom monsters in DECORATE lumps.
- Use Getopt::Long for option processing and implement real command line options.
- Allow specification of skill level(s) / map(s) to analyze.
- Allow toggling of total monster counts, all-level summary etc.
- Don't interpret spurious THINGS entries anymore.
Earlier versions
Earlier versions did not have version numbers; change history is not recorded.
TODO
Generic
- Different output modules (text, HTML, tables for DOOM wiki, XML (?), ...).
- Add PK3 file support (including recursive loading).
- Fix multiplayer stats for Hexen-format maps.
More robust handling of level-associated data.What did I even mean when I wrote this?- Write a man page.
- Refactor, remove hacks, kill FIXMEs, clean up, decruft, rewrite. x.x
DOOM
- Add aliases for Skulltag and stealth monsters.
- Add DeHackEd thing IDs added by ports, if any.
- Support mixed DOOM/Hexen format multi-level WADs.
- More robust DECORATE lump handling (i.e., actually parse the contents properly).
- Handle replacing of regular DOOM monsters in DECORATE lumps.
Heretic
- Verify Heretic monsters.
- Implement sort ordering for Heretic.
- Make --monsters, --no-monsters, --dump-monsters work for Heretic.
- Powerup stats for Heretic.
Hexen
- Verify Hexen monsters.
- Implement sort ordering for Hexen.
- Make --monsters, --no-monsters, --dump-monsters work for Hexen.
- Powerup stats for Hexen.
Strife
- Basic Strife support.
- Implement sort ordering for Strife.
- Make --monsters, --no-monsters, --dump-monsters work for Strife.
- Powerup stats for Strife.