Checklists

Mudlet checklist for MUDs

This checklist provides a technical framework for validating Mudlet script packages, ensuring code stability, performance optimization, and cross-platform compatibility for MUD players.

Mudlet checklist for MUDs hero illustration
Progress0 / 30 complete (0%)

Namespacing and Script Organization

0/5
  • Encapsulate in Global Tables

    critical

    Ensure all variables and functions are stored within a single unique table (e.g., MyProjectName = MyProjectName or {}) to prevent overwriting other scripts.

  • Folder Hierarchy Consolidation

    critical

    Verify all triggers, aliases, scripts, and timers are nested under one parent folder named after the package.

  • Localize Loop Variables

    recommended

    Scan all scripts for 'for' and 'while' loops to ensure iterators are explicitly declared as 'local' to avoid global scope pollution.

  • Event Handler Registration

    recommended

    Use registerAnonymousEventHandler for script-side event binding rather than relying solely on the UI event box to ensure portability.

  • Modular Script Loading

    optional

    Check that large codebases are split into logical script objects within the Mudlet editor rather than one giant file.

Trigger and Regex Optimization

0/5
  • Regex Pattern Anchoring

    recommended

    Use '^' and '$' anchors in Perl Regex triggers where possible to prevent unnecessary mid-line scanning.

  • Substring Match Usage

    recommended

    Convert static text triggers from 'perl regex' to 'substring' or 'begin of line' to reduce CPU overhead.

  • Trigger State Management

    critical

    Implement disableTrigger() and enableTrigger() for combat-specific patterns so they only run when relevant.

  • Avoid Color-Trigger Dependency

    recommended

    Ensure triggers do not rely on specific ANSI colors unless necessary, as user themes or MUD settings may change them.

  • Multiline Trigger Gates

    recommended

    Use the 'multiline' trigger type with a line delta of 0 or 1 for complex patterns to ensure they only fire on specific sequence blocks.

GMCP and Data Handling

0/5
  • GMCP Availability Check

    critical

    Verify the script checks for the existence of the 'gmcp' table before attempting to access nested data like 'gmcp.Char.Vitals'.

  • Shallow Copy for Updates

    recommended

    Ensure UI updates only trigger when GMCP values actually change, rather than on every incoming GMCP packet.

  • Fallback Mechanism

    optional

    Provide basic prompt-parsing triggers for users playing on MUDs that do not support GMCP or MSDP.

  • JSON Parsing Safety

    critical

    Wrap custom yajl.to_value calls in pcall() to prevent script crashes if the server sends malformed JSON.

  • Coordinate Mapping Integration

    recommended

    Verify gmcp.Room.Info data correctly updates the Mudlet mapper ID via centerview() or setPlayerLocation().

User Interface and Geyser Layouts

0/5
  • Geyser Framework Usage

    critical

    Confirm all UI elements (labels, gauges, consoles) use the Geyser or Vyzor libraries for automatic resolution scaling.

  • Container Nesting

    recommended

    Check that all UI elements are attached to a Geyser.Container to allow for easy bulk hiding/showing.

  • Font Scaling Verification

    recommended

    Test UI readability at different font sizes (e.g., 10pt vs 16pt) to ensure text does not clip out of labels.

  • Main Console Buffer Margin

    critical

    Ensure the script calls setBorderRight() or setBorderBottom() so UI elements do not overlap the main game text.

  • Color Theme Compatibility

    optional

    Test UI visibility against both the default Mudlet dark theme and a high-contrast light theme.

Performance and Resource Management

0/5
  • Timer ID Tracking

    critical

    Store IDs returned by tempTimer() in a table and kill them before starting new ones to prevent timer accumulation.

  • Garbage Collection Awareness

    recommended

    Avoid creating large temporary tables inside high-frequency triggers (like the prompt).

  • Stopwatch Profiling

    optional

    Use createStopwatch() and getStopwatchTime() to measure execution time of heavy functions during testing.

  • File I/O Pathing

    critical

    Use getMudletHomeDir() for all file operations to ensure paths work across Windows, Linux, and macOS.

  • Image Asset Validation

    critical

    Confirm all images used in labels are included in the .mpackage and referenced via relative paths.

Distribution and User Support

0/5
  • Clean Profile Install Test

    critical

    Install the package on a completely fresh Mudlet profile to identify missing dependencies or variables.

  • Version Variable Declaration

    recommended

    Include a MyPackage.version string to allow for easy troubleshooting and update checks.

  • Help Alias Implementation

    recommended

    Create a 'help' alias (e.g., 'pkg help') that displays a list of commands and current configuration status.

  • Conflict Check

    critical

    Ensure no aliases use extremely common short names (e.g., 's', 'k', 'c') without a toggle or specific prefix.

  • Uninstallation Script

    optional

    Provide a function or script that cleans up UI elements and global tables when the package is uninstalled.