Yanhuang MUD (炎黄MUD)

repository·master·Indexed 41 days ago

https://github.com/oiuv/mud

A text-based martial arts MUD game built on the Yanhuang 2003 engine and FluffOS driver. It features a Virtual Object System using SQLite3, UTF-8 support, and an NPC AI Service written in Python 3.10+ that provides persona-based dialogue and knowledge retrieval via UDP. The project includes comprehensive documentation on LPC programming, MUD network protocols (GMCP, MSSP, MSP), and a modular architecture spanning code modules, functional systems, and technical references.

Tokens
65.5K
Snippets
196
Records
280
Agent score
51%

What's inside Yanhuang MUD

  1. Overview of CHINESE_D daemon

    master
    CHINESE_D is a Chinese processing daemon for MUD games. It provides essential localization services including converting numbers to Chinese characters, English-to-Chinese translation management, and traditional Chinese date formatting (including the Sexagenary cycle/Gan-Zhi). It maintains a persistent translation dictionary stored in /data/e2c_dict.
  2. Overview of the Natural Language Parser

    master
    The Natural Language Parser is a component within the mudren/verbs module designed to handle natural language processing for the MUD (Multi-User Dungeon) environment. It serves as the interface for interpreting player input into actionable commands.
  3. Overview of the logind daemon

    master

    The logind daemon is the authentication and login management service for the Yanhuang Qunxia MUD. It is responsible for the entire lifecycle of a player's connection, including handling new connections, performing identity verification, managing character creation, and facilitating reconnection after a disconnect.

    Core Responsibilities:

    • Connection Management: Handles new connection requests, performs IP security checks, and tracks connection session information.
    • Authentication: Implements a dual-password system (Management Password and Regular Password) and validates existing characters.
    • Character Creation: Manages the workflow for new players, including name validation, gender selection, ID generation, and initial attribute randomization.
    • Reconnection: Provides session recovery to allow players to resume their game state after a network interruption.
  4. Overview of technical development documentation

    master
    The docs/tech/ directory contains general technical documentation related to the LPC language. These documents are not specific to the LIB codebase but instead provide technical principles, specifications, and best practices applicable to MUD development. They serve as a reference for technical principles, standardized suggestions, and can be used as technical references for other MUD projects.
  5. Overview of the updated daemon

    master

    The updated daemon is the core data maintenance component for the Yanhuang Qunxia MUD. It is responsible for ensuring data consistency and managing player states through four primary functions:

    1. Player Data Integrity Checks: Validates and corrects logical consistency in player attributes, skill levels, and status synchronization.
    2. Title Management System: Manages the mapping of titles to conditions, handles automatic granting, resolves conflicts, and maintains history.
    3. Data Cleaning: Provides categorized, safe, and batch processing for removing specific types of player data.
    4. Rebirth (Transmigration) System: Handles the complex process of resetting player data, redistributing attributes, clearing skills, and issuing rebirth rewards.
  6. Overview of BACKUP_D Data Backup Daemon

    master

    BACKUP_D is the MUD game's data backup daemon responsible for the automated daily backup of all player data. It manages the entire lifecycle of backup files, including scheduling, versioning, and cleanup, to ensure data security and disaster recovery capabilities.

    Core Features:

    • Scheduled Backups: Automatically executes every day at 06:00.
    • System Notifications: Sends alerts 10 minutes and 1 minute before the backup starts.
    • Full Backups: Backs up the entire /data/ directory.
    • Retention Policy: Retains backup data for 15 days, with an exception for the 1st of every month which is kept permanently.
    • Storage Structure: Backups are stored in /backup/yyyy-mm-dd/.
  7. Overview of CACHED_D Player Data Cache Daemon

    master
    CACHED_D is a player data cache daemon for the MUD game. It caches player data into an SQLite database to provide efficient data access for external systems like web interfaces and global rankings. It provides a complete CRUD (Create, Read, Update, Delete) interface for player data.
  8. Use ANALECTA_D to manage literary collections

    master
    ANALECTA_D is a daemon responsible for collecting, managing, and maintaining the 'Analecta' (selected articles/literary works) system in the MUD. It provides a platform for automatic collection, categorized storage by year, and retrieval of literary content.
  9. Use the BAN_D daemon for IP ban management

    master

    BAN_D is a site ban daemon used to manage an IP ban list to prevent malicious users from accessing the MUD server. It supports exact IP matching and wildcard matching (e.g., 192.168.*).

    Core Capabilities

    • IP Ban Management: Control access based on IP addresses.
    • Wildcard Support: Use * to ban entire IP ranges.
    • File Persistence: Ban lists are stored in a configuration file and persist across sessions.
    • Real-time Application: Changes to the ban list take effect immediately in memory.

    Configuration File

    The ban list is stored at /adm/etc/banned_sites. The file format is one IP address per line. Lines starting with # are treated as comments and ignored.

    # 恶意用户IP
    192.168.1.100
    10.0.0.*
    # 测试环境
    172.16.0.0
  10. Use the commandd daemon for command management

    master
    The commandd daemon manages the game's command system. It provides functionality for searching commands, managing command paths, and handling command aliases. It supports dynamic loading of command directories and maintains a cache to improve lookup efficiency.
  11. Understand FluffOS LPC Language Core Concepts

    master

    LPC (Lars Pensjö C) is a scripting language designed for MUDs (Multi-User Dungeons). FluffOS is a high-performance driver implementing the LPC compiler, bytecode VM, and network server.

    Key characteristics include:

    • Dynamic Typing: Supports optional compile-time strict type checking.
    • Object-Oriented: Uses a file-based inheritance mechanism.
    • Functional: Functions are first-class citizens, supporting Lambdas, function pointers, and closures.
    • UTF-8 Native: Strings are stored in UTF-8 and measured by extended grapheme clusters.
    • C-like Syntax: Control structures like if, for, while, and switch follow C conventions.
  12. Use the AUCTION_D auction system daemon

    master

    AUCTION_D is the auction system daemon in the MUD, responsible for managing the lifecycle of in-game item auctions. It handles item listing, bidding, transaction completion, and commission collection.

    Core Workflow:

    1. Listing: Players submit items with a starting price.
    2. Bidding: Supports multiple rounds; each bid must exceed the current price.
    3. Completion: Auctions automatically close after 3 rounds of no bidding (at the start of the 4th round).
    4. Commission: A fixed 4% commission is deducted from the final sale price.

    Key Constraints:

    • A player can only auction one item at a time.
    • Items must have value and cannot be marked as no_sell or no_drop.
    • Prohibited items include characters, currency, and food/drinks.
    /* AUCTION_D Overview */