100 ROM resources for MUD players
The ROM (Rivers of MUD) 2.4 codebase, derived from Merc and Diku, remains a cornerstone of text-based RPG development. This resource provides technical guidance for administrators and developers looking to modernize, maintain, and expand a ROM-based MUD in a contemporary hosting environment while preserving its classic gameplay feel.

Modernizing the Build Environment
- 1
Glibc Crypt Library Linking
beginnerhighModern Linux distributions no longer include the crypt functions in glibc by default. Add '-lcrypt' to the 'L_FLAGS' line in your Makefile to resolve 'undefined reference to crypt' errors during linking.
- 2
GCC 10+ Multiple Definition Fix
beginnerstandardModern GCC versions use '-fno-common' by default, causing 'multiple definition' errors for global variables in ROM. Add '-fcommon' to your CFLAGS in the Makefile to maintain compatibility with legacy variable declarations.
- 3
64-bit Pointer to Integer Casting
advancedhighROM often casts pointers to 'int', which causes crashes on 64-bit systems where pointers are 8 bytes. Audit 'recycle.c' and 'save.c' to use 'long' or 'intptr_t' for pointer storage and retrieval.
- 4
Replacing sys_siglist
intermediatestandardThe 'sys_siglist' array is deprecated. Update 'comm.c' to use 'strsignal(sig)' to handle signal logging for crashes and reboots properly.
- 5
MAX_STRING_LENGTH Overflow Protection
beginnermediumStock ROM uses a 4096-byte buffer for most strings. Increase 'MAX_STRING_LENGTH' in 'merc.h' to 8192 or 16384 to prevent truncation in modern, high-detail area descriptions.
- 6
Valgrind Memory Leak Detection
advancedhighRun the MUD binary through Valgrind in a local environment. Focus on 'recycle.c' and 'db.c' to identify leaks in the descriptor and character allocation loops that cause long-term instability.
- 7
Makefile Portability
beginnerstandardStandardize the Makefile by using '$(CC)' and '$(CFLAGS)' variables rather than hardcoded 'gcc' calls to allow for easier cross-compilation on different architectures.
- 8
Git Version Control Initialization
beginnerhighInitialize a Git repository in the 'src' directory. Commit the stock ROM 2.4b6 code first to allow for 'git diff' tracking of all future customizations and patches.
- 9
Standardizing Time Functions
intermediatemediumReplace legacy 'gettimeofday' calls with 'clock_gettime(CLOCK_MONOTONIC, ...)' in 'comm.c' to ensure consistent game pulse timing regardless of system clock adjustments.
- 10
Automated Startup Script
beginnerstandardModify the 'startup' shell script to use 'nohup' and redirect 'stderr' to a dedicated 'log/stderr.log' to capture segmentation fault details that don't make it to the standard log files.
Gameplay and Mechanics Customization
- 1
Class Table Expansion
intermediatemediumTo add a new class, update 'class_table' in 'const.c', define the class index in 'merc.h', and ensure 'skill_table' includes level requirements for the new class.
- 2
Implementing ANSI Color Parsing
intermediatehighIntegrate a color parser in 'comm.c' that converts tags like '{R' to ANSI escape sequences. Ensure the 'send_to_char' function calls the parser before sending data to the descriptor.
- 3
Integrating Ivan's OLC
advancedhighInstall the On-Line Creation (OLC) patch to allow builders to modify rooms, mobs, and objects in-game. This eliminates the need for frequent reboots and manual .are file editing.
- 4
Dynamic Buffer System
advancedhighReplace static 'char buf[MAX_STRING_LENGTH]' declarations with a dynamic 'BUFFER' type (found in many ROM snippets) to prevent buffer overflows during high-volume output.
- 5
Customizing the Leveling Curve
intermediatemediumAdjust the 'exp_per_level' function in 'magic.c' or 'fight.c'. Stock ROM uses a linear progression; modifying the multiplier can create a more exponential difficulty curve.
- 6
MobProgram Integration
advancedhighAdd the MobProgram (MP) engine to allow NPCs to react to player actions, enter/exit triggers, and combat events via script files stored in the 'area' directory.
- 7
Race Ability Differentiation
intermediatemediumModify 'pc_race_table' in 'const.c' to include unique skill modifiers or innate spells (like 'infravision' or 'fly') to make racial choice impactful beyond stat bonuses.
- 8
Automated Auction System
intermediatestandardImplement a global 'auction' command that utilizes a timer and a global pointer to a 'struct obj_data' to manage player-to-player item sales without a physical location.
- 9
Sub-class/Specialization Logic
advancedmediumExtend the player structure in 'merc.h' to include a 'specialization' field, allowing players to choose a branch of their class at level 30 that unlocks specific 'skill_table' entries.
- 10
Combat Damage Capping
intermediatestandardImplement a 'cap' in the 'damage' function within 'fight.c' to prevent 'one-shotting' mobs or players when using highly customized equipment with high 'damroll' stats.
Data Management and Persistence
- 1
Pfile Flat-file Optimization
beginnerstandardROM's player files (pfiles) are text-based. Organize the 'player' directory into subdirectories (a/, b/, c/) based on the first letter of the name to avoid filesystem slowdowns with large player bases.
- 2
Area File Versioning
intermediatestandardEnsure all area files use the '#AREA' header with versioning. This allows the loader in 'db.c' to handle legacy area formats from older Merc versions during the migration process.
- 3
Automated Cron Backups
beginnerhighSet up a crontab to run a shell script every 6 hours that creates a compressed tarball of the 'area', 'player', and 'gods' directories, storing them off-site via SSH or S3.
- 4
SQL Integration for Stats
advancedmediumLink the MUD to a MySQL/PostgreSQL database using the 'libmysqlclient' library. Push player statistics (level, kills, deaths) to the DB on 'do_save' for web-based leaderboards.
- 5
Note System Categories
intermediatestandardExpand 'save.c' and 'note.c' to support multiple note boards (Changes, Ideas, Penalties, News) to keep administrative communication organized.
- 6
Hotboot/Copyover Implementation
advancedhighImplement a 'copyover' command that saves all descriptors, executes the new binary, and re-attaches the descriptors, allowing for code updates without kicking players offline.
- 7
CIDR-based IP Banning
intermediatemediumUpgrade the 'ban.c' system to support CIDR notation (e.g., 1.2.3.0/24). This is essential for blocking modern VPN ranges and botnets that target open MUD ports.
- 8
Object Extra Description Cleanup
beginnerstandardAudit stock area files to remove redundant 'extra descriptions' that consume memory. Use a script to identify objects with descriptions that match the short name exactly.
- 9
Player File Corrupton Recovery
intermediatehighImplement a 'backup' flag in 'save.c' that creates a '.bak' copy of a player file before overwriting it during a save, providing a fallback if the MUD crashes mid-save.
- 10
Limbo.are Maintenance
beginnerstandardNever delete 'limbo.are'. It contains hardcoded VNUMs for essential items (like the 'dummy' object and 'mushrooms') that the engine expects to exist at boot time.