Resources

100 CircleMUD resources for MUD players

A technical roadmap for deploying, maintaining, and extending CircleMUD in a modern development environment. This guide focuses on solving common compilation hurdles on contemporary Linux kernels, mastering the Diku-based zone reset system, and leveraging On-line Creation (OLC) for rapid world building.

100 CircleMUD resources for MUD players illustration
Placeholder illustration shown while custom artwork is being produced.

Modern Linux Compilation and Environment Setup

  1. 1

    Fixing sysdep.h for Modern GCC

    intermediatehigh

    Remove or comment out redundant declarations of standard C library functions like crypt(), malloc(), and free() in sysdep.h to avoid 'conflicting types' errors with GCC 10+.

  2. 2

    Linker Flag -lcrypt

    beginnerstandard

    Ensure the Makefile includes -lcrypt in the LIBS variable, as modern glibc no longer includes the crypt function by default, requiring the libcrypt-dev package.

  3. 3

    C99 Standard Compliance

    intermediatemedium

    Add -fcommon to your CFLAGS in the Makefile to allow multiple definitions of global variables, a common practice in legacy CircleMUD code that modern compilers reject.

  4. 4

    Valgrind Memory Auditing

    advancedhigh

    Run the circle binary through Valgrind to identify memory leaks in custom spec_procs or modified act.comm.c logic that can crash the MUD after long uptimes.

  5. 5

    Autorun Script Updates

    beginnerstandard

    Modify the stock 'autorun' shell script to use modern paths and ensure it properly handles the 'reboot' signal versus a hard 'shutdown'.

  6. 6

    Config.c Tuning

    beginnerstandard

    Adjust the 'max_playing' and 'port' variables in config.c before compilation to set the default listener and player capacity without command line flags.

  7. 7

    Log File Management

    beginnermedium

    Implement a cron job to rotate the 'syslog' file in the /log directory, as CircleMUD writes verbose debug info that can fill small VPS disks quickly.

  8. 8

    Handling 64-bit Pointers

    advancedhigh

    Audit any code casting pointers to 'int' in comm.c; use 'intptr_t' or 'long' to prevent segmentation faults on 64-bit architecture.

  9. 9

    Binary Pathing in Lib Directory

    beginnerstandard

    Verify that the 'bin' symlink inside the 'lib' directory points correctly to the compiled 'circle' binary to allow the MUD to find its world files.

  10. 10

    Removing Crypt Passwords

    intermediatemedium

    For local development, modify interpreter.c to bypass the crypt() check or use plaintext if the local environment lacks the necessary DES/MD5 libraries.

Zone Management and Reset Logic

  1. 1

    Reset Command 'M' (Mobile Load)

    beginnerstandard

    Usage: M <if_flag> <mob_vnum> <max_existing> <room_vnum>. Controls the population density of specific mobs within a zone.

  2. 2

    Reset Command 'G' (Give Object)

    beginnerstandard

    Usage: G <if_flag> <obj_vnum> <max_existing>. Used immediately after an 'M' command to populate a mobile's inventory.

  3. 3

    Reset Command 'E' (Equip Object)

    beginnerstandard

    Usage: E <if_flag> <obj_vnum> <max_existing> <wear_location>. Places items directly into the equipment slots of the last loaded mobile.

  4. 4

    Zone Lifespan and Age

    intermediatemedium

    Set the 'lifespan' in the .zon file to determine how many minutes pass before the 'reset_mode' logic is triggered.

  5. 5

    Reset Mode 2 (Always Reset)

    intermediatemedium

    Configure the zone reset mode to 2 to ensure the area repopulates even if players are currently present in the zone.

  6. 6

    VNUM vs RNUM Distinction

    advancedhigh

    Understand that code uses Real Numbers (RNUM) for internal arrays while .wld and .zon files use Virtual Numbers (VNUM). Use real_room() for conversions.

  7. 7

    Door Reset Command 'D'

    beginnerstandard

    Usage: D <if_flag> <room_vnum> <exit_num> <state>. Essential for automatically closing and locking doors during a zone pulse.

  8. 8

    The 'if_flag' Dependency

    intermediatestandard

    Use if_flag 1 to ensure an object or mob only loads if the previous command in the zone file succeeded (e.g., don't give a sword to a mob that didn't load).

  9. 9

    World File (.wld) Sector Types

    beginnermedium

    Assign SECT_WATER_NOSWIM or SECT_FLYING to rooms to enforce movement restrictions based on character class or equipment.

  10. 10

    Zone Command 'P' (Put in Object)

    intermediatestandard

    Usage: P <if_flag> <obj_vnum> <max_existing> <container_vnum>. Used for stocking chests, bags, or other containers found in rooms.

Extending Gameplay via C and OLC

  1. 1

    Oasis OLC Integration

    beginnerhigh

    Ensure Oasis OLC is enabled to allow builders to use 'medit', 'oedit', and 'redit' in-game, bypassing manual text file editing.

  2. 2

    Special Procedures (spec_procs)

    advancedhigh

    Assign C functions to mobs in spec_assign.c to create complex behaviors like shopkeepers, healers, or aggressive guards.

  3. 3

    Adding New Command Verbs

    intermediatemedium

    Register new player commands in interpreter.c by mapping a string to a function name and setting the minimum position and level.

  4. 4

    Defining New Affect Flags

    advancedmedium

    Add custom bits to the AFF_ constants in structs.h and update spell_parser.c to create unique magical effects or racial traits.

  5. 5

    Shop File (.shp) Configuration

    intermediatestandard

    Define buy/sell markups and item type restrictions in shop files to create a balanced economy and specialized vendors.

  6. 6

    Socials.olc Editing

    beginnerstandard

    Use the built-in social editor to add flavor text for player interactions without needing to recompile the binary.

  7. 7

    Modifying the Score Command

    intermediatemedium

    Edit act.informative.c to display custom variables like 'rebuilds', 'alignment rank', or 'bounty' to the player.

  8. 8

    Implementing DG Scripts

    advancedhigh

    Port the DG Scripts trigger system into the Circle base to allow builders to write complex mob/room logic using a high-level scripting language.

  9. 9

    Customizing the Login Sequence

    beginnerstandard

    Edit interpreter.c and the /text/ directory files (motd, greetings) to brand the MUD and provide essential player instructions.

  10. 10

    Adding Material Types to Objects

    advancedmedium

    Extend the obj_data struct in structs.h to include a 'material' field, then update oedit.c to allow builders to select it.