Skip to content

Instantly share code, notes, and snippets.

@Xymph
Xymph / texpackstats.py
Last active February 26, 2022 16:22
Omgifol (https://doomwiki.org/wiki/Omgifol) script to collect stats of a Doom texture pack .WAD file, for DoomWiki.org - see https://doomwiki.org/wiki/User_talk:Redneckerz#Texture.2Fpalette_automation.3F for discussion and example results
#!/usr/bin/python
# texture pack statistics, by Frans P. de Vries (Xymph)
# discussion: https://doomwiki.org/wiki/User_talk:Redneckerz#Texture.2Fpalette_automation.3F
import sys, getopt, pprint
from omg import *
from omg.txdef import *
pp = pprint.PrettyPrinter(indent=2)
class SwitchDef(WADStruct):
@Xymph
Xymph / textmapExtra.php
Last active February 16, 2022 22:22
Process an extracted TEXTMAP lump (from a Doom UDMF map) with regular expressions and some code to collect monster and equipment counts for single-player and cooperative modes, and lists those where the counts differ, for DoomWiki.org
#!/usr/bin/php
<?php
// TEXTMAP extra monsters & equipment script for DoomWiki.org, by Frans P. de Vries (Xymph)
$usage = "Usage: {$argv[0]} TEXTMAP-file\n";
// check input parameter
if ($argc != 2) {
echo $usage;
exit(1);
}
@Xymph
Xymph / textmapStats.php
Last active May 22, 2021 14:39
Process an extracted TEXTMAP lump (from a Doom UDMF map) with regular expressions and a little code to generate statistics in Template:Mapdata format, along with formatted lists of secret sector numbers and deathmatch spawn points (if any), for DoomWiki.org
#!/usr/bin/php
<?php
// TEXTMAP stats script for DoomWiki.org, by Frans P. de Vries (Xymph)
$usage = "Usage: {$argv[0]} TEXTMAP-file\n";
// check input parameter
if ($argc != 2) {
echo $usage;
exit(1);