Modules

What is a Module?

A module is a Python script + TOML config bundle that manages a specific game server's lifecycle. The Core Daemon loads modules dynamically — adding a new game never requires recompiling the core.


Supported Games

GameModuleProtocolInteractionInstall MethodDefault Port
PalworldpalworldREST APIcommandsSteamCMD (App 2394010)8211
MinecraftminecraftRCON + stdinconsoleOfficial download25565
Project ZomboidzomboidRCON + stdinconsoleSteamCMD (App 380870)16261

Community and custom modules can be installed to support additional games.


Module Management

Install from Remote Manifest

:module manifest              # List available modules
:module install-manifest <id> # Download and install

In the GUI: Modules tab → Manifest button.

Refresh / Remove

:module refresh    # Reload after manual changes
:module remove <name>

Module Structure

mygame/
├── module.toml          # Required — metadata and settings schema
├── lifecycle.py         # Required — lifecycle management script
├── icon.png             # Recommended — GUI icon
└── locales/             # Recommended — translations
    ├── en.json
    ├── ko.json
    └── ...

module.toml Sections

SectionPurpose
[module]Metadata — name, version, description, game_name, display_name, entry, icon
[update]Auto-update — github_repo
[protocols]Communication — supported, default, interaction_mode
[credential_map]Credential sync — daemon key ↔ game key mapping
[config]Default runtime settings — executable_path, process_name, default_port, stop_command
[install]Server installation — method (steamcmd/download/manual), app_id, download_url
[docker]Docker container settings — image, ports, volumes, environment
[detection]Auto-detection — process_patterns, cmd_patterns, common_paths
[settings]GUI/CLI settings field definitions
[commands]Server command definitions
[errors]Error messages
[aliases]Module/command aliases
[syntax_highlight]Console syntax highlighting

lifecycle.py Functions

FunctionRequiredDescription
get_launch_command(config)Return server launch command
get_status(config)Query server status
stop_server(config)Stop the server
execute_command(config)Execute a server command
get_available_versions(config)List available versions
install_server(config)Install the server
read_settings(config)Read server properties file
write_settings(config)Write server properties file
diagnose(config)Diagnose server issues

Configuration Flow

  1. Daemon reads module.toml to discover metadata and settings schema.
  2. User settings are merged with defaults and passed to Python via stdin JSON.
  3. Environment variables (DAEMON_API_URL, PYTHONPATH, etc.) are inherited from the daemon.

Creating Custom Modules

See the Module Development Guide for a complete tutorial covering:

  • 5-minute quickstart for a minimal module
  • Full module.toml reference (13 sections)
  • Complete lifecycle.py API reference
  • i18n support
  • Daemon API integration
  • Protocol-specific implementation patterns (RCON, REST, stdin)
  • Error diagnosis system
  • Testing and debugging guide

Key Rules

  • Modules must be independent — no direct dependency on daemon internals
  • All paths come from the daemon via config or environment variables — no hardcoded paths
  • Data is stored only in %APPDATA%/saba-chan
  • Errors must be printed to stdout/stderr for the daemon to collect