daemon-creation

Automate Oxidus daemon creation with STD_DAEMON lifecycle and persistence hooks.

8|3|Updated Sep 29, 2021
One-click install
npx skills add https://github.com/gesslar/oxidus-mudlib --skill daemon-creation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: daemon-creation
Source: https://github.com/gesslar/oxidus-mudlib/tree/main/.claude/skills/daemon-creation
Command: npx skills add https://github.com/gesslar/oxidus-mudlib --skill daemon-creation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a structured blueprint for building and maintaining Oxidus daemons, including inheritance patterns (STD_DAEMON), the setup chain, persistence, preloading, SWAP_D for reload-safe data, logging integration with EXT_LOG, and a clear teardown sequence.

Core Features & Use Cases

  • Inherits STD_DAEMON and optionally EXT_LOG for robust logging
  • Implements a standardized daemon setup chain (mudlib_setup, base_setup, pre_setup_0..pre_setup_4, setup, post_setup_0..post_setup_4)
  • Supports persistence via setPersistent, saveData, restore_data, and post_restore
  • Provides SWAP_D for reload-safe, nosave data across destruct/reload
  • Guidance for preloading daemons via /adm/etc/preload and proper ordering

Quick Start

Create your daemon by inheriting STD_DAEMON, implement setup(), enable persistence if needed, and consult preloading and SWAP_D usage when appropriate.

Frequently Asked Questions about daemon-creation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a persistent LPC daemon that survives MUD reboots?

To create a persistent LPC daemon, inherit STD_DAEMON, enable persistence via setPersistent, and implement saveData and restore_data hooks to retain daemon state across reboots.

What is the STD_DAEMON setup chain and how does it work?

The STD_DAEMON setup chain executes a standardized lifecycle sequence: mudlib_setup, base_setup, pre_setup_0 through pre_setup_4, setup, and post_setup_0 through post_setup_4 for initializing core system services.

How do I preserve nosave daemon data across destruct and reload cycles?

Use SWAP_D to preserve reload-safe, nosave data across destruct and reload cycles. SWAP_D stores data externally so daemons can retrieve it during reconstruction without losing state.

How do I add logging to an LPC daemon using EXT_LOG?

To add logging to an LPC daemon, inherit EXT_LOG alongside STD_DAEMON. This integrates robust logging capabilities directly into the daemon lifecycle for debugging and monitoring.

How do I preload daemons via /adm/etc/preload and manage startup ordering?

Register daemons in /adm/etc/preload to load them at startup. Proper ordering ensures dependencies are initialized before dependent daemons run their setup chain.

Why does my daemon lose its configuration after a destruct and reload?

A daemon loses configuration after reload if persistence hooks are missing. Implement setPersistent, saveData, and restore_data, or use SWAP_D for nosave data that needs to survive the cycle.