Skip to content

Core Concepts

Understanding the fundamental building blocks of Lands.io mods.

Overview

The Mod SDK is built around these core concepts:

Concept Purpose
Mod Class Main entry point with lifecycle hooks
Configuration Override game mechanics
Actions Player abilities and AI behaviors
Executions Game state mutations
State Management In-game and persistent data
UI Components Custom buttons and interfaces
Scheduler Jobs Background tasks

Architecture

graph TD
    A[Mod Class] --> B[Lifecycle Hooks]
    A --> C[Action Registration]
    A --> D[Intent Handlers]

    B --> E[onGameInit]
    B --> F[onPlayerAdded]
    B --> G[onGameEnd]

    C --> H[Custom Actions]
    H --> I[Executions]

    D --> J[UI Buttons]
    J --> I

    I --> K[Game State]

    A --> L[ModState]
    A --> M[PersistentStorage]

Data Flow

  1. Player Input → UI Button or built-in action
  2. Intent Created → Sent to server
  3. Intent Handler → Validates and creates Execution
  4. Execution → Mutates game state
  5. State Sync → Changes broadcast to all clients