User:Xymph/DMMPST

As usual on my user pages, some rambling and (non-)thinking out loud can be expected. ;)

Historical discussions
An index of past discussions about map and thing data:
 * 2011: Strange amounts of vertices in DOOM map articles
 * 2012: Map Info
 * 2012: Once again with map data
 * 2013: Map data
 * 2014: Calculating item counts
 * 2014: Thing_Spawn
 * 2015: Not all monster-like thing types listed
 * 2015: Vertex counts (GL_VERT)
 * 2016: Map info (redux)
 * 2016: Map thing statistics
 * 2016: Things template Usage & styling

2016-07-30
After a lengthy, real-life induced hiatus since its initial discussion, my DMMPST (DooM MaP StaTistics) tool has taken shape in the past week, and can now fill out DoomWiki templates for mapdata and things sections as well as complete map skeletons, for all classic Doom variants and Heretic.

Some samples of the latter: Doom II's MAP06 (comparison), Heretic's E3M3 (comparison), Sunlust's MAP11 (comparison)

Obviously, some bits of info need further (manual) updating before committing such a skeleton to the public wiki – like the PWAD name for non-stock maps, and the episode name for (Ultimate) Doom and Heretic based maps – but that's to be expected.

While it's not its primary purpose, the tool can also display some basic stats about a level, e.g. that same MAP11:


 * 1) DOOM ][  Map statistics for level MAP11: Chasing Suns

MapDim:	 MaxX	  MinX	 SizeX	  MaxY	  MinY	 SizeY 2055	 -4864	 6919	  2309	 -2288	  4597

Struct:	Things	Vertxs	Before	LinDfs	TelePt	SidDfs	Sectrs	Secret 657	 10297	 7396	  8429	    13	 14258	  1068	     3

Secrets:  442	   647	   990

For the tool, the biggest remaining task is probably settling on the contents and layout of the Things table, as discussed here. To help this discussion along, I can hand out beta copies of DMMPST to a few DoomWiki regulars who are willing to test it AND participate in that topic, so that it will (hopefully) move along more quickly than the usual glacial pace here. ;) Participants can email me via my homepage.

Thing tables
Details to be hashed out in the Thing tables include:
 * Order of items within classes:
 * Enemies roughly by cast sequence / increasing hit points (Doom); or by alphabet (Heretic)?
 * Weapons by slot - no contest.
 * Ammo by weapon/slot - no contest.
 * Powerups by class (armor, health, artifact/item) or alphabet?
 * Keys by alphabet - no contest.
 * Decorations, player starts, and other miscellaneous things - skip them?


 * Multiplayer:
 * One column (classic maps), or multiple columns or a separate table (coop, deathmatch) for modern maps?
 * How does one determine the map type anyway?
 * Does classic multiplayer and deathmatch take skill levels into account?


 * Should multiple columns with identical values be combined using colspan?

2016-07-31
A small DMMPST update now produces Thing tables with the extra multiplayer column for classic maps, see e.g. Heretic E1M1 (comparison).

I found the description of the two extra Boom thing flags (bits 5 & 6) confusing at first: 'If you want a thing to be only available in Single play, you set both the "not in DM" and "not in COOP" flags.' This suggests backward incompatibility, as classic maps won't have those flags enabled for Things intended to show up in single-player only (nor the classic MP flag, bit 4).

After examining the source code, function P_SpawnMapThing in P_MOBJ.C, it turns out that description is indeed cutting some corners: // check for appropriate skill level if (!netgame && (mthing->options & 16)) //jff "not single" thing flag return;

//jff 3/30/98 implement "not deathmatch" thing flag if (netgame && deathmatch && (mthing->options & 32)) return;

//jff 3/30/98 implement "not cooperative" thing flag if (netgame && !deathmatch && (mthing->options & 64)) return;

if (gameskill == sk_baby) bit = 1; else if (gameskill == sk_nightmare) bit = 4; else bit = 1<<(gameskill-1);

if (!(mthing->options & bit)) return; In words: when in singleplayer mode, it's still just bit 4 (and the skill setting) that determines whether a Thing is shown; only in multiplayer mode do the Boom flags distinguish between deathmatch and/or coop Things.

Is there a Boom(-compatible) map in the wiki that already includes a multiplayer (DM/coop) Things table so I can see how that looks?

Multiplayer
I realized that yesterday's multiplayer-related details and questions originated from a lack of understanding of Doom's multiplayer features. As a mostly-SP focused player who dabbled only a few times in IDMAP01, I had completely forgotten that coop play also came with the classic game from the beginning. Somehow the idea had settled in my mind that coop was only added in source ports, together with those Boom flags. Reading up on that MP page as well as the P_SpawnMapThing code made me understand at last, and also cleared up some aspects of Gez's discussion for me.

Thus I now also understand that the skill levels are indeed relevant in all MP modes too, and a single column such as in the Heretic tables does simplify the Thing tables somewhat (perhaps a choice made there for space reasons).

2016-08-02
The DMMPST beta (testers still invited) can now output Things tables for vanilla multiplayer and Boom-compatible cooperative / deathmatch. A sample of the first is Doom E1M1 (comparison), clearly showing the extra weapons, ammo and berserk pack in MP.

A brief search of the idgames archive turned up Boom-compatible map 102.WAD with these things. In coop there are two extra arch-viles and an extra cyberdemon, deathmatch has additional weapons & ammo and an extra megasphere. I manually verified the cyberdemons, chaingun and megaspheres in SLADE3, so the tables are probably correct (but more testing is welcome).

Ordering
I have yet to locate a Heretic PWAD page in the wiki (anyone?). Pages for stock Heretic maps order items per these classes: Monsters, Weapons, Ammo, Items/Powerups, Keys. The Doom Things template instead uses: Monsters, Items/Powerups, Weapons, Ammo, Keys. The Heretic order seems more logical to me, as monsters are fought with weapons, and keys are a kind of item too. Therefore DMMPST uses that same class order for the above E1M1 tables.

The Backpack is categorized a powerup in Doom tables, while the Bag of Holding is considered a collection of ammo in Heretic tables. I have a mild preference for the latter approach.

Should a class header be included even if it contains no items, e.g. a level without keys such as Doom II MAP07? Perhaps this shows more clearly that the class was not accidentally forgotten but really contains no items, but I'm not set on it.

Doom tables sort monsters roughly by cast sequence / increasing hit points, Heretic by alphabetical name. A comparison of both approaches:

Here I like the Doom order more. Shall we adopt this for Heretic too?

For weapons and ammo, the Doom & Heretic ordering by slot is fine, but hasn't been applied consistently in the past. See e.g. the aforementioned MAP07 where the super shotgun is last, and ammo is seemingly randomized. And for example in Plutonia MAP28, there's no apparent method to the ordering madness in almost all classes – with DMMPST that looks like this.

For items/powerups, the order in the Doom template is a bit odd: armors at increasing percentages (1%, 100%, 200%), armor/health 200% (megasphere), health decreasing (100%, 25%, 10%, 1%), berserk (100% health but predominantly a powerup), backpack, and then the remaining powerups in alphabetical order. More logical to me would be to order health by increasing percentage too, followed by the megasphere, like this:

This is the order I used in DMMPST so far, but moving backpack to the ammo class (as already proposed above) would put the megasphere adjacent to the alphabetical powerup list, which makes more sense to me in this regard as well.

2016-08-04
I've added the Hazards class to DMMPST's Thing tables, see Doom II MAP23 (comparison) – obviously :) – and Heretic E1M8 (comparison).

2016-08-11
After addressing some integer overflow issues ;), DMMPST can now process really large PWADs such as Vrack2BiggestEver (from the download section of the DeePsea homepage).

The Things tables are also placed closer together by defining "width=33%" for the first, singleplayer table. This is done only when there are two or three tables, SP/MP or SP/Coop/DM (where it has no effect, as the columns already take up 33% each).

More importantly, DMMPST now supports Hexen and Strife, for example Hexen MAP23 (= Hub 4: Gibbet) and Strife MAP20 (comparison).

While the basics are in place, there are still plenty details to resolve in the ordering, formatting and linking departments:
 * What should the order of entries within each class be for each game?
 * Five tables side-by-side for Hexen is perhaps a bit much, so maybe something should be made collapsible, or the multiplayer tables should be below the singleplayer ones?
 * Strife tables don't aggregate generic minor characters such as Peasants into single totals. Also, shop props are included in the counts. Probably not going to bother with either.
 * Wikilinks for classes and entries should probably be made only once per Things section, for readability and SEO aspects?

For Heretic and Strife, I'm not planning to replace the Things tables so carefully hand-crafted by Jartapran, but aim to double-check and perhaps adjust some bits here and there.

For the Doom I intend to eventually replace the Statistics section for all IWADs' map pages, to ensure they are consistent in content and style for both Map Data and Things.

And of course, one major goal of this project is to finally provide Things tables for all Hexen map pages, and updated Map Data tables too (as those are still missing the vertexbefore value).

2016-08-14
DMMPST now wikilinks each Thing class and entry name only once. To demonstrate, most previous example pages have been regenerated:


 * 102.WAD
 * Plutonia MAP28
 * Doom II MAP23
 * Heretic E1M8
 * Vrack2BiggestEver
 * Hexen MAP23
 * Strife MAP20

Also, for all games monsters/enemies are now (mostly) sorted by hit points.