Skip to content

API Reference

Version: 1.8.2
Endpoints total count: 145

Builder Controller

The Builder Controller provides tools for programmatic construction and deconstruction. It allows for copying, pasting, and blueprinting areas of the map.


POST
/api/v1/builder/copy

Copies a specified area of the map, including buildings, items, and terrain. The copied data can be used with the paste endpoint.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/builder/copy \
--header 'content-type: application/json' \
--data '{
    "from": { "x": 100, "z": 100 },
    "to": { "x": 110, "z": 110 }
}'

Response:

{
    "map_id": 0,
    "point_a": {"x": 10, "y": 0, "z": 10},
    "point_b": {"x": 16, "y": 0, "z": 16}
}

Response:

{
    "success":true,
    "data": {
        "width":7,
        "height":7,
        "floors": [
            {"def_name":"Concrete","rel_x":1,"rel_z":1},
            {"def_name":"Concrete","rel_x":3,"rel_z":2}],
        "buildings": [
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":3,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":1,"rotation":0},
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:15:20.9851409Z"
}


POST
/api/v1/builder/paste

Pastes a previously copied area to a new location on the map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/builder/paste \
--header 'content-type: application/json' \
--data '{
    "at": { "x": 150, "z": 150 }
}'

Request:

{
    "map_id": 0,
    "position": {"x": 80, "y": 0, "z": 80},
    "blueprint": {
        "width":7,
        "height":7,
        "floors": [
            {"def_name":"Concrete","rel_x":1,"rel_z":1},
            {"def_name":"Concrete","rel_x":3,"rel_z":2}],
        "buildings": [
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":3,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":1,"rotation":0},
        ]
    },
    "clear_obstacles": true,
}

Response:

{
    "success":true,
    "errors":[],
    "warnings":[],
    "timestamp":"2025-12-31T12:18:40.2019606Z"
}


POST
/api/v1/builder/blueprint

Places blueprints for a copied area, allowing colonists to construct the buildings.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/builder/blueprint \
--header 'content-type: application/json' \
--data '{
    "at": { "x": 150, "z": 150 }
}'

Request:

{
    "map_id": 0,
    "position": {"x": 80, "y": 0, "z": 80},
    "blueprint": {
        "width":7,
        "height":7,
        "floors": [
            {"def_name":"Concrete","rel_x":1,"rel_z":1},
            {"def_name":"Concrete","rel_x":3,"rel_z":2}],
        "buildings": [
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":3,"rel_z":0,"rotation":0},
            {"def_name":"Wall","stuff_def_name":"WoodLog","rel_x":0,"rel_z":1,"rotation":0},
        ]
    },
}

Response:

{
    "success":true,
    "errors":[],
    "warnings":[],
    "timestamp":"2025-12-31T12:18:40.2019606Z"
}

Camera Controller

Provides endpoints for controlling the user's view in the game. Allows external tools to pan the camera to specific coordinates or adjust the zoom level programmatically.


POST
/api/v1/camera/change/zoom

UI Camera

Adjusts the in-game camera's zoom level to a specified value, instantly changing the field of view. This allows for precise control over how close or far the camera is on the game map.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/camera/change/zoom?zoom=15'

Response:

{
"success": true,
"errors": [],
"warnings": [],
"timestamp": "2025-12-09T19:16:06.4839322Z"
}


POST
/api/v1/camera/change/position

Instantly moves the in-game camera to the specified world coordinates on the current map.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/camera/change/position?x=50&y=50'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/stream/start

Starts a live video stream of the game's current camera view. This endpoint initiates a real-time broadcast of the rendered gameplay, capturing exactly what is visible in the player's main viewport.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/stream/start'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/stream/stop

Gracefully stops the active live video stream of the game's camera view.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/stream/stop'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/stream/setup

Configures the parameters and settings for the live video stream of the game's camera view before starting it.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/stream/setup?ip=127.0.0.1&port=5007&frame_width=1920&frame_height=1080&fps=15&quality=30'

Request:

{
    "port": 8080,
    "address": "127.0.0.1",
    "frame_width": 1280,
    "frame_height": 720,
    "target_fps": 30,
    "jpeg_quality": 85
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


GET
/api/v1/stream/status

Gracefully stops the active live video stream of the game's camera view.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/stream/status'

Response:

{
"success": true,
"data": {
    "is_streaming": false,
    "config": {
    "port": 5007,
    "address": "127.0.0.1",
    "frame_width": 1280,
    "frame_height": 720,
    "target_fps": 15,
    "jpeg_quality": 50
    }
},
"errors": [],
"warnings": [],
"timestamp": "2025-12-09T19:31:56.8297247Z"
}

DevTools Controller

This controller exposes RimWorld's internal Debug Actions and development tools. It provides "God Mode" functionality usually reserved for the game's developer console.

Use with Caution

Actions performed here bypass standard gameplay rules. Misuse can lead to: * Corrupted save states. * Game crashes. * Broken AI behavior.


GET
/api/v1/dev/materials-atlas

Retrieves the development-level materials atlas data, which contains the internal mapping of material definitions to their graphical textures, shaders, and rendering properties.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/dev/materials-atlas

Response:

{
    "success": true,
    "data": {
        "materials": [
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_RockFlecked_Atlas",
        "Custom/CutoutComplex_CompactedMachinery_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_Rock_Atlas",
        "Custom/Cutout_AncientFence_Atlas",
        "Custom/CutoutComplex_Fleshmass_Atlas",
        "Custom/Transparent_PowerConduit_Blueprint_Atlas",
        "Custom/Transparent_Sandbags_Blueprint_Atlas",
        "Custom/Transparent_Barricade_Blueprint_Atlas",
        "Custom/Transparent_Wall_Blueprint_Atlas",
        "Custom/Transparent_Fence_Atlas_Smooth",
        "Custom/Cutout_Wall_Atlas_Smooth",
        "Custom/Cutout_Wall_Atlas_Bricks",
        "Custom/Cutout_Wall_Atlas_Smooth",
        "Custom/Cutout_Wall_Atlas_Bricks",
        "Custom/Cutout_Wall_Atlas_Bricks"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:15:20.9851409Z"
}


POST
/api/v1/dev/console

A development and debugging endpoint that allows interaction with the game's internal logging system. This provides programmatic control over the developer console, allowing sending log messages, clearing console.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/dev/console'

Request:

{
"action": "message",
"message": "hello_world"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/dev/stuff/color

A development tool endpoint that modifies the visual color properties of a specific "stuff" material in-game. "Stuff" in RimWorld refers to the base materials that items and structures are made from (e.g., wood, steel, cloth, plasteel). This endpoint allows for real-time adjustment of a material's displayed color, primarily used for visual customization, debugging, or mod development testing.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/dev/stuff/color \
--header 'content-type: application/json' \
--data '{
    "name": "WoodLog",
    "hex": "aa00ff"
}'

Request:

{
    "name": "WoodLog",
    "hex": "aa00ff"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/dev/materials-atlas/clear

Clears the in‑memory materials atlas cache, forcing the game to reload material textures, shaders, and rendering properties from disk on‑demand.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/dev/materials-atlas/clear

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}

Documentation Controller

The Documentation Controller provides introspection capabilities for the API itself. It allows clients to dynamically discover available endpoints, schemas, and API versions without needing external references.

Feature Description
Discovery List all registered routes and their parameters.
Health Check the status of the API server.
Schema Retrieve JSON schemas for request/response bodies.

GET
/api/v1/core/docs/export

Generates and exports comprehensive documentation for all available API endpoints. Returning documentation in requested format both in response and as file in mod_path/docs/ directory.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/core/docs/export


GET
/api/v1/docs

Get documentation for all available API endpoints in requested format.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/docs


GET
/api/v1/docs/extensions/{extensionId}

Get documentation for all available API endpoints in requested format.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/docs/extensions/34


GET
/api/v1/docs/health

Get documentation for all available API endpoints in requested format.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/docs/health


GET
/api/v1/docs/export

Get documentation for all available API endpoints in requested format.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/docs/export

Faction Controller

The Faction Controller manages the geopolitical landscape of the world. It allows for the inspection and manipulation of relationships between the player's colony and other groups.

Key Functions:

  • 🤝 Diplomacy: Adjust goodwill and relation status (Hostile/Neutral/Ally).
  • 📜 Registry: List all generated factions and their leaders.
  • 👥 Interaction: Trigger faction-specific requests or gifts.

GET
/api/v1/factions

Retrieves a list of all factions currently known in the game world.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/factions

Response:

{
    "success": true,
    "data": [
        {
            "load_id": 0,
            "def_name": "OutlanderCivil",
            "name": "Western Haderia",
            "is_player": false,
            "relation": "Neutral",
            "goodwill": 0
        },
        {
            "load_id": 1,
            "def_name": "TribeCivil",
            "name": "Coalition of Tol",
            "is_player": false,
            "relation": "Neutral",
            "goodwill": 0
        },
        {
            "load_id": 2,
            "def_name": "Empire",
            "name": "Empire of Mophoos",
            "is_player": false,
            "relation": "Neutral",
            "goodwill": 0
        },
        {
            "load_id": 3,
            "def_name": "PlayerColony",
            "name": "New Arrivals",
            "is_player": true,
            "relation": "",
            "goodwill": 0
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:21:17.8272328Z"
}


GET
/api/v1/faction/relations

Retrieves the diplomatic relationship status between selected by id faction and all other factions.

curl --request GET \
--url http://localhost:8765/api/v1/faction/relations?id=2
{
    "label": "lowercase label",
    "message": "uppercase message",
    "letter_def": "NeutralEvent"
}
{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}

GET
/api/v1/faction/player

Returns detailed information about the player's own faction.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/faction/player

Response:

{
    "success": true,
    "data": {
        "load_id": 3,
        "def_name": "PlayerColony",
        "name": "New Arrivals",
        "is_player": true,
        "leader_title": "Spirit Speaker",
        "leader_id": 0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:22:33.5209596Z"
}


GET
/api/v1/faction

Retrieves detailed information about a specific faction identified by id.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/faction?id=2'

Response:

{
    "success": true,
    "data": {
        "load_id": 2,
        "def_name": "Empire",
        "name": "Empire of Mophoos",
        "is_player": false,
        "leader_title": "High Stellarch",
        "leader_id": 969
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:23:10.8428989Z"
}


GET
/api/v1/faction/relation-with

Gets the diplomatic relationship status between two specified factions.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/faction/relation-with?id=2&other_id=1'

Response:

{
    "success": true,
    "data": {
        "goodwill": 0,
        "relation_kind": "Neutral"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:25:02.2515491Z"
}


GET
/api/v1/faction/def

Fetches the raw definition data (Def) for a faction.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/faction/def?name=OutlanderCivil'

Response:

{
    "success": true,
    "data": {
        "def_name": "OutlanderCivil",
        "pawn_singular": "outlander",
        "pawns_plural": "outlanders",
        "leader_title": "prime councilor",
        "category_tag": "Outlander",
        "hostile_to_factionless_humanlikes": false,
        "starting_count_at_world_creation": "1",
        "permanent_enemy": false,
        "natural_enemy": false,
        "classic_ideo": true,
        "hidden_ideo": false,
        "can_siege": true,
        "can_stage_attacks": true,
        "can_use_avoid_grid": true,
        "can_psychic_ritual_siege": false,
        "earliest_raid_days": 0.0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:34:20.6487856Z"
}


POST
/api/v1/faction/change/goodwill

Manually change the goodwill value between two factions by a specified amount.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/faction/change/goodwill \
--header 'content-type: application/json' \
--data '{
    "id": 0,
    "other_id": 2,
    "value": -30,
    "send_message": false,
    "can_send_hostility_letter": false
}'

Request:

{
    "id": 0,
    "other_id": 2,
    "value": -30,
    "send_message": false,
    "can_send_hostility_letter": false
}

Response:

{
    "success": true,
    "data": {
        "goodwill": 0,
        "relation_kind": "Neutral"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:25:02.2515491Z"
}


GET
/api/v1/faction/icon

Retrieves the visual icon and primary color associated with a specific faction. The image is returned as a Base64 encoded string (PNG format), suitable for direct embedding in web frontends.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/faction/icon?id=12"

Response:

{
    "success": true,
    "data": {
        "image": {
            "result": "Success",
            "image_base_64": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AA..."
        },
        "color": "#9A2A2A"
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


POST
/api/v1/faction/goodwill

Sets the goodwill value between two factions.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/faction/goodwill \
--header 'content-type: application/json' \
--data '{
    "id": 0,
    "other_id": 2,
    "value": 50
}'

Request:

{
    "id": 0,
    "other_id": 2,
    "value": 50
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}

Game Controller

This controller handles the general game functions.


GET
/api/v1/game/state

Disable server caching for endpoint results.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/game/state

Response:

{
    "success": true,
    "data": {
        "game_tick": 120,
        "colony_wealth": 4.0,
        "colonist_count": 3,
        "storyteller": "Cassandra",
        "is_paused": true
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:39:28.6476222Z"
}


POST
/api/v1/game/speed

Sets the current game time speed.

Info

Speed Values:

`0`: Paused
`1`: Normal Speed
`2`: Fast Speed
`3`: Super Fast Speed
`4`: Ultra Fast (Dev Mode only)

Example:

curl --request POST \
--url "http://localhost:8765/api/v1/game/speed?speed=3"

Response:

{
    "success": true,
    "data": "Game speed set to 3",
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:10:05.123Z"
}


GET
/api/v1/game/settings/run-in-background

Retrieves the current state of the "Run in Background" setting.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/game/settings/run-in-background

Response:

{
    "success": true,
    "data": true,
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


POST
/api/v1/game/settings/toggle/run-in-background

Toggles or sets the "Run in Background" setting. The request body determines the desired state.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/game/settings/toggle/run-in-background \
--header 'Content-Type: application/json' \
--data 'true'

Response:

{
    "success": true,
    "data": true,
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/version

Retrieves version information for the game, the REST API mod, and the API itself. This endpoint provides essential identification metadata that can be used for compatibility checks, debugging, and system documentation.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/version

Response:

{
    "success": true,
    "data": {
        "rim_world_version": "1.5.4243",
        "mod_version": "1.2.0",
        "api_version": "v1"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T18:52:09.0916968Z"
}


GET
/api/v1/mods/info

Manually triggers a complete flush of the API's internal caching system.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/mods/info

Response:

{
    "success": true,
    "data": [
        {
        "name": "Core",
        "package_id": "ludeon.rimworld",
        "load_order": 0
        },
        {
        "name": "Royalty",
        "package_id": "ludeon.rimworld.royalty",
        "load_order": 1
        },
        {
        "name": "Ideology",
        "package_id": "ludeon.rimworld.ideology",
        "load_order": 2
        },
        {
        "name": "Biotech",
        "package_id": "ludeon.rimworld.biotech",
        "load_order": 3
        },
        {
        "name": "Anomaly",
        "package_id": "ludeon.rimworld.anomaly",
        "load_order": 4
        },
        {
        "name": "RIMAPI",
        "package_id": "redeyedev.rimapi",
        "load_order": 5
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T18:53:40.5041431Z"
}


POST
/api/v1/mods/configure

Configures the active mods list and their load order. Pass an array of package IDs in the exact order you want them loaded. Core (ludeon.rimworld) will be automatically prepended if missing. Set restart_game to true to immediately reboot RimWorld and apply the changes.

Example:

curl --request POST \
  --url http://localhost:8765/api/v1/mods/configure \
  --header 'content-type: application/json' \
  --data '{"package_ids":["brrainz.harmony","ludeon.rimworld","ludeon.rimworld.royalty","ludeon.rimworld.ideology","ludeon.rimworld.biotech","ludeon.rimworld.anomaly","ludeon.rimworld.odyssey","unlimitedhugs.hugslib","redeyedev.rimapi"],"restart_game":true}'

Request Body:

{
  "package_ids": [
    "brrainz.harmony",
    "ludeon.rimworld",
    "ludeon.rimworld.royalty",
    "ludeon.rimworld.ideology",
    "ludeon.rimworld.biotech",
    "ludeon.rimworld.anomaly",
    "ludeon.rimworld.odyssey",
    "unlimitedhugs.hugslib",
    "redeyedev.rimapi"
  ],
  "restart_game": true
}

Response:

{
    "success": true,
    "data": null,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-02-18T18:23:32.0000000Z"
}


POST
/api/v1/select

Selects a specific in-game object (pawn, building, item, etc.) based on its type and unique identifier.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/select?type=pawn&id=443'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/deselect

Clears the current in-game selection, removing any highlighted objects and returning the interface to a neutral state.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/deselect

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/open-tab

Opens a specific information panel (tab) for the currently selected pawn in the game's inspection pane. This endpoint allows external control to view detailed information about a pawn's health, equipment, needs, relationships, and other attributes—mirroring the tab interface available when manually inspecting a character in-game.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/open-tab?name=health'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


GET
/api/v1/def/all

Retrieves comprehensive information about all game definition entries (defs) from RimWorld's data system. Definitions are the core data structures that define nearly every element in the game, including items, buildings, creatures, terrain, research projects, and more.

Info
  • Things Defs
Example
{
    "def_name": "Beer",
    "label": "beer",
    "description": "The first beverage besides water ever consumed by mankind. Beer can taste good, but its main effect is intoxication. Excessive consumption can lead to alcohol blackouts and, over time, addiction.",
    "category": "Item",
    "thing_class": "ThingWithComps",
    "stat_base": {
    "max_hit_points": 50.0,
    "flammability": 0.5,
    "deterioration_rate": 0.5,
    "beauty": -4.0,
    "market_value": 12.0,
    "mass": 0.3,
    "nutrition": 0.08
    },
    "is_weapon": true,
    "is_apparel": false,
    "is_item": true,
    "is_pawn": false,
    "is_plant": false,
    "is_building": false,
    "is_medicine": false,
    "is_drug": true,
    "market_value": 12.0,
    "mass": 0.3,
    "max_hit_points": 50.0,
    "flammability": 0.5,
    "stack_limit": 25,
    "nutrition": 0.08,
    "work_to_make": 1.0,
    "work_to_build": 1.0,
    "beauty": -4.0,
    "max_health": 0.0,
    "armor_rating__sharp": 0.0,
    "armor_rating__blunt": 0.0,
    "armor_rating__heat": 0.0,
    "insulation__cold": 0.0,
    "insulation__heat": 0.0
}
  • Incidents Defs
Example
{
    "def_name": "BloodRain",
    "label": "Blood rain",
    "base_chance": 0.5,
    "base_chance_with_royalty": -1.0,
    "letter_def_name": "ThreatBig",
    "population_effect": "0",
    "min_population": 0,
    "min_threat_points": -3.40282347E+38,
    "max_threat_points": 3.40282347E+38,
    "category": "ThreatBig",
    "should_ignore_recent_weighting": false,
    "tags": [],
    "disallowed_biomes": [],
    "allowed_biomes": [],
    "require_colonists_present": false
},
  • Conditions Defs
  • PawnKind Defs
  • Trait Defs
  • Research Defs
  • Hediff Defs
Example
{
    "def_name": "GoJuiceHigh",
    "label": "High on go-juice",
    "description": "Go-juice in the bloodstream. It supercharges combat-related abilities, and instantly increases psyfocus when first injected.",
    "hediff_class": "Hediff_High",
    "is_addiction": false,
    "makes_sick_thought": false,
    "severity_per_day": 0.0,
    "max_severity": 1.0,
    "tendable": false,
    "is_bad": false,
    "stages": [
    {
        "min_severity": 0.0,
        "death_mtb_days": -1.0,
        "pain_factor": 0.1,
        "forget_memory_thought_mtb_days": -1.0,
        "vomit_mtb_days": -1.0,
        "mental_break_mtb_days": -1.0
    }
    ]
}
  • Skill Defs
  • WorkType Defs
  • Need Defs
  • Thought Defs
  • Stat Defs
  • WorldObject Defs
  • Biome Defs
  • Terrain Defs
  • Recipe Defs
  • Body Defs
  • BodyPart Defs
  • Faction Defs
  • Sound Defs
  • DesignationCategory Defs
  • JoyKind Defs
  • Meme Defs
  • Precept Defs
  • Ability Defs
  • Gene Defs
  • Weather Defs
  • RoomRole Defs
  • RoomStat Defs
  • MentalState Defs
  • DrugPolicy Defs
  • Plant Defs
  • Animal Defs
  • Storyteller Defs
Example
{
    "def_name": "Cassandra"
},
{
    "def_name": "Phoebe"
},
{
    "def_name": "Randy"
},
{
    "def_name": "Tutor"
}
  • Difficulty Defs
Example
{
    "def_name": "Peaceful"
},
{
    "def_name": "Easy"
},
{
    "def_name": "Medium"
},
{
    "def_name": "Rough"
},
{
    "def_name": "Hard"
},
{
    "def_name": "Extreme"
},
{
    "def_name": "Custom"
}

Example:

curl --request GET \
--url http://localhost:8765/api/v1/def/all

Response:

{
    "success": true,
    "data": {
        "things_defs": [
            {
                "def_name": "TextBook",
                "label": "textbook",
                "description": "A book which focuses on teaching skills.",
                "category": "Item",
                "thing_class": "Book",
                "stat_base": {
                "max_hit_points": 60.0,
                "deterioration_rate": 5.0,
                "mass": 0.5,
                "flammability": 1.0,
                "beauty": 1.0,
                "market_value": 160.0
                },
                "is_weapon": false,
                "is_apparel": false,
                "is_item": true,
                "is_pawn": false,
                "is_plant": false,
                "is_building": false,
                "is_medicine": false,
                "is_drug": false,
                "market_value": 160.0,
                "mass": 0.5,
                "max_hit_points": 60.0,
                "flammability": 1.0,
                "stack_limit": 1,
                "nutrition": 0.0,
                "work_to_make": 1.0,
                "work_to_build": 1.0,
                "beauty": 1.0,
                "max_health": 0.0,
                "armor_rating__sharp": 0.0,
                "armor_rating__blunt": 0.0,
                "armor_rating__heat": 0.0,
                "insulation__cold": 0.0,
                "insulation__heat": 0.0
            },
            {
                <...>
            }
        ],
        "incidents_defs": [],
        "conditions_defs": [],
        "pawn_kind_defs": [],
        "trait_defs": [],
        "research_defs": [],
        "hediff_defs": [],
        "skill_defs": [],
        "work_type_defs": [],
        "need_defs": [],
        "stat_defs": [],
        "world_object_defs": [],
        "biome_defs": [],
        "terrain_defs": [],
        "recipe_defs": [],
        "body_defs": [],
        "body_part_defs": [],
        "faction_defs": [],
        "sound_defs": [],
        "designation_category_defs": [],
        "joy_kind_defs": [],
        "meme_defs": [],
        "precept_defs": [],
        "ability_defs": [],
        "gene_defs": [],
        "weather_defs": [],
        "room_role_defs": [],
        "room_stat_defs": [],
        "mental_state_defs": [],
        "drug_policy_defs": [],
        "plant_defs": [],
        "animal_defs": []
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:09:46.047553Z"
}


GET
/api/v1/datetime

Retrieves the current in-game date and time according to the RimWorld world calendar.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/datetime

Response:

{
    "success": true,
    "data": {
        "datetime": "12th of Aprimay, 5500, 17h"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:05:35.3244951Z"
}


GET
/api/v1/datetime/tile

Retrieves the current in-game date and time according to the RimWorld world calendar.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/datetime

Response:

{
    "success": true,
    "data": {
        "datetime": "12th of Aprimay, 5500, 17h"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:05:35.3244951Z"
}


POST
/api/v1/game/select-area

Simulates a drag-select action in the game world (UI). Selects all selectable objects (colonists, items, etc.) within the rectangle defined by PositionA and PositionB.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/game/select-area \
--header 'Content-Type: application/json' \
--data '{
    "position_a": { "x": 10, "y": 0, "z": 10 },
    "position_b": { "x": 20, "y": 0, "z": 20 }
}'

Request Body:

{
    "position_a": { "x": 10, "y": 0, "z": 10 },
    "position_b": { "x": 20, "y": 0, "z": 20 }
}

Response:

{
    "success": true,
    "data": "Area selected from (10, 0, 10) to (20, 0, 20). 5 objects selected.",
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:18:10.000Z"
}


POST
/api/v1/game/send/letter

Manually triggers an in-game notification letter (message) with custom title, text, and type (e.g., neutral, negative, positive, threat).

Example:

curl --request POST \
--url http://localhost:8765/api/v1/game/send/letter

Request:

{
    "label": "New Message Label",
    "message": "Hello RimWorld!",
    "letter_def": "NeutralEvent"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/game/save

Saves the current game state to a file with the specified name.

Example:

curl --request POST \
--url "http://localhost:8765/api/v1/game/save?name=MyApiSave"

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-20T10:00:00.000Z"
}


POST
/api/v1/game/load

Try to loads a game state from a save file with the specified name.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/game/load?name=MyApiSave"

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-20T10:01:00.000Z"
}


POST
/api/v1/game/start/devquick

Starts a new game immediately using the developer 'quick start' configuration, bypassing character selection and landing site choice. This is useful for rapid testing.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/game/start/devquick

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-20T10:02:00.000Z"
}


POST
/api/v1/game/start

This endpoint starts a new RimWorld game with the specified configuration parameters. It initializes a new game world with the given storyteller, difficulty, map settings, and planet generation parameters.

Getting Available Options

Storyteller names, difficulty levels, and other definition values can be retrieved from the /api/v1/def/all endpoint. This endpoint provides comprehensive information about all game definitions, including:

  • Storyteller definitions
  • Difficulty settings

Example usage:

curl --request GET \
--url http://localhost:8765/api/v1/def/all

The response is a large json structure from the game, it contains categorized definitions that can be used to populate the parameters for this game start request.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/game/start \
--header 'Content-Type: application/json' \
--data '{
    "storyteller_name": "Randy",
    "difficulty_name": "Peaceful",
    "map_size": 120,
    "permadeath": false,
    "planet_coverage": 0.1,
    "world_seed": "rickroll",
    "starting_tile": "7298",
    "starting_season": "2",
    "overall_rainfall": 2,
    "overall_temperature": 2,
    "overall_population": 2,
    "landmark_density": 2
}'

Request:

{
    "storyteller_name": "Randy",
    "difficulty_name": "Peaceful",
    "map_size": 120,
    "permadeath": false,
    "planet_coverage": 0.1,
    "world_seed": "rickroll",
    "starting_tile": "7298",
    "starting_season": "2",
    "overall_rainfall": 2,
    "overall_temperature": 2,
    "overall_population": 2,
    "landmark_density": 2
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-20T10:03:00.000Z"
}


GET
/api/v1/game/settings

Retrieves the current game configuration settings. This endpoint provides access to various gameplay, audio, video, and interface preferences.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/game/settings

Response:

{
    "success": true,
    "data": {
        "language": "English",
        "run_in_background": true,
        "development_mode": true,
        "log_verbose": false,
        "temperature_mode": "Celsius",
        "autosave_interval": true,
        "resolution": "1024x768",
        "fullscreen": false,
        "user_interface_scale": 1.0,
        "custom_cursor_enabled": true,
        "hats_only_on_map": false,
        "plant_wind_sway": true,
        "max_number_of_player_settlements": 1,
        "volume_master": 0.6375921,
        "volume_game": 0.7051597,
        "volume_music": 0.0,
        "volume_ambient": 0.6007371,
        "pause_on_load": false,
        "pause_on_urgent_letter": "MajorThreat",
        "automatic_pause_on_letter": false,
        "edge_screen_scroll": true,
        "map_drag_sensitivity": 1.3,
        "zoom_to_mouse": false,
        "show_realtime_clock": true,
        "resource_readout_categorized": false,
        "show_animal_names": false,
        "reset_mods_config_on_crash": false,
        "texture_compression": 0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-20T12:30:35.4174593Z"
}

Game Events Controller

The Game Events Controller allows external systems to act as the "Storyteller," forcing specific incidents to occur immediately.

Narrative Control

This is useful for Twitch integrations or scenario managers that want to trigger raids, weather changes, or drop pods on demand.

Supported Event Types:

  1. Threats: Raids, Manhunters, Infestations.
  2. Weather: Rain, Fog, Eclipses, Solar Flares.
  3. Misc: Trader arrivals, Quest triggers.

GET
/api/v1/quests

Retrieves a list of all active and historical quests.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/quests?map_id=0

Response:

{
    "success": true,
    "data": {
        "active_quests": [
        {
            "id": 1,
            "quest_def": "OpportunitySite_ItemStash",
            "name": "Choma's Shack of Valuables",
            "description": "<color=#D09B61FF>Choma</color>, Great Chief of <color=#00BFFFFF>Coalition of Tol</color>, has informed us of a collection of valuable items worth $535 not far from us. The collection consists of:\n\n  - The Archaic Psychoid Chronicle (excellent)\r\n  - Voro-Harbinger (good)\n\n<color=#D09B61FF>Choma</color> says that there may be an <color=#D46F68FF>unknown threat</color>.",
            "state": "Ongoing",
            "expiry_hours": -0.000400000019,
            "reward": [
            "Reward_Items(value $535)\n  -Voro-Harbinger (good) $310\n  -The Archaic Psychoid Chronicle (excellent) $225"
            ]
        }
        ],
        "historical_quests": [
        {
            "id": 0,
            "quest_def": "Beggars",
            "name": "Drifter Hopes for Resources",
            "description": "A poor traveler named <color=#D09B61FF>Ace</color> is approaching looking for help. <color=#D09B61FF>Ace</color> is begging for x700 silver. <color=#D09B61FF>Ace</color> wants the silver to pay off a debt to a gang of pirates who are hunting her.\n\nYou can give items to <color=#D09B61FF>Ace</color> by selecting a colonist and right-clicking on her.\n\n<color=#D09B61FF>Ace</color> will move on after <color=#87F6F6FF>1 day</color>.\n\nThis traveler is not part of any faction. If you wish, you can choose to kill, arrest, sell, or harvest her, without diplomatic consequences.",
            "state": "EndedSuccess",
            "expiry_hours": -0.000400000019,
            "reward": []
        }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:43:32.2659508Z"
}


GET
/api/v1/incidents

Description

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/incidents?map_id=0'

Response:

{
    "success": true,
    "data": {
        "incidents": [
            {
                "incident_def": "VisitorGroup",
                "label": "visitor group",
                "category": "None",
                "incident_hour": 60.0,
                "days_since_occurred": 0.1068
            },
            {
                "incident_def": "GiveQuest_Beggars",
                "label": "beggars arrive",
                "category": "GiveQuest",
                "incident_hour": 8.8,
                "days_since_occurred": 2.24013329
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:24:31.91622Z"
}


GET
/api/v1/lords

Retrieves detailed information about all active "Lord" processes on a specified map. In RimWorld, a Lord represents a high-level AI manager that coordinates groups of pawns toward a common objective—such as raiding, visiting or trading.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/lords?map_id=0'

Response:

{
    "success": true,
    "data": [
        {
            "load_id": 2,
            "faction_name": "Nation of Iralaguaro",
            "faction_def_name": "TribeCivil",
            "lord_job_type": "LordJob_VisitColony",
            "current_toil_name": "LordToil_DefendPoint",
            "ticks_in_toil": 2231,
            "num_pawns_lost_violently": 0,
            "num_pawns_ever_gained": 1,
            "owned_pawn_ids": [
                "Human8834"
            ],
            "owned_building_ids": [],
            "any_active_pawn": true
        },
        {
            "load_id": 3,
            "faction_name": "Cancer Unit",
            "faction_def_name": "PirateWaster",
            "lord_job_type": "LordJob_StageThenAttack",
            "current_toil_name": "LordToil_Stage",
            "ticks_in_toil": 0,
            "num_pawns_lost_violently": 0,
            "num_pawns_ever_gained": 1,
            "owned_pawn_ids": [
                "Human8861"
            ],
            "owned_building_ids": [],
            "any_active_pawn": true
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:26:22.0370532Z"
}


GET
/api/v1/incidents/top

Returns a list of incidents with the highest current weight (probability) of occurring, based on the current Storyteller settings and game state. Accepts an optional limit parameter.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/incidents/top?limit=3"

Response:

{
    "success": true,
    "data": [
        {
            "def_name": "RaidEnemy",
            "label": "enemy raid",
            "category": "ThreatBig",
            "current_weight": 1.2
        },
        {
            "def_name": "TraderCaravan",
            "label": "trader caravan",
            "category": "Misc",
            "current_weight": 0.85
        },
        {
            "def_name": "TravelerGroup",
            "label": "travelers",
            "category": "Misc",
            "current_weight": 0.5
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/incident/chance

Calculates the specific probability weight for a single incident definition.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/incident/chance?incident_def_name=RaidEnemy"

Request Body (or Query Params):

{
    "incident_def_name": "RaidEnemy"
}

Response:

{
    "success": true,
    "data": {
        "value": 1.2
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


POST
/api/v1/incident/trigger

Manually triggers a specific in-game incident (event) immediately.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/incident/trigger \
--header 'content-type: application/json' \
--data '{
    "name": "RaidEnemy",
    "map_id": "0",
    "incident_parms": {
        "points": 300.0,
        "forced": true,
        "faction": "Pirate",
        "send_letter": true,
        "custom_letter_label": "API Raid Test",
        "custom_letter_text": "Test raid triggered via API"
    }
}'

Request:

{
    "name": "RaidEnemy",
    "map_id": "0",
    "incident_parms": {
        "points": 300.0,
        "forced": true,
        "faction": "Pirate",
        "send_letter": true,
        "custom_letter_label": "API Raid Test",
        "custom_letter_text": "Test raid triggered via API"
    }
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}

General Controller

The General Controller serves as the entry point for miscellaneous utility functions that don't fit into specific entity categories. It handles the "meta" layer of the game client.

Primary Capabilities

  • Camera Control: Pan, zoom, and focus the player's view.
  • UI Management: Toggle interface visibility or open specific menus.
  • Time Control: Adjust game speed multiplier.

Global Map Controller

Operates on the Planetary scale. This controller interacts with objects that exist on the world map rather than the local colony map.

  • Caravans: Track movement, ETA, and inventory of traveling groups.
  • Settlements: locate other faction bases and quest sites.
  • Tiles: Query biome, temperature, and terrain data for specific world hexes.

GET
/api/v1/world/caravans

Retrieves a list of all active caravans currently on the world map. This includes the player's caravans and visible non-player caravans. Returns details about location, destination, and contents (pawns/items).

Example:

curl --request GET \
--url http://localhost:8765/api/v1/world/caravans

Response:

{
    "success": true,
    "data": [
        {
        "id": 11,
        "name": "Rosa's caravan",
        "is_player_controlled": true,
        "position": {
            "x": 1,
            "y": 65,
            "z": -75
        },
        "tile": 232,
        "pawns": [
            {
            "id": 74,
            "name": "Rosa"
            }
        ],
        "items": [
            {
            "thing_id": 74,
            "def_name": "Human",
            "label": "Rosa<color=#999999FF>, Explorer</color>",
            "categories": [],
            "position": {
                "x": 143,
                "y": 0,
                "z": 62
            },
            "stack_count": 1,
            "market_value": 840.0,
            "is_forbidden": false,
            "quality": -1,
            "hit_points": 0,
            "max_hit_points": 0
            }
        ],
        "mass_usage": 0.75,
        "mass_capacity": 28.0,
        "forageability": "Forageable",
        "visibility": "0.16"
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-13T11:01:59.5952054Z"
}


GET
/api/v1/world/settlements

Retrieves a list of all permanent settlements (bases) on the world map. This includes the player's colonies and other faction bases. Useful for finding trade partners or raid targets.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/world/settlements

Response:

{
    "success": true,
    "data": [
        {
            "id": 0,
            "name": "Planeton",
            "tile": 2241,
            "faction": {
                "load_id": 0,
                "def_name": "OutlanderCivil",
                "name": "Dinium",
                "is_player": false,
                "leader_title": "Spiritual Bodhisattva",
                "leader_id": 10
            }
        },
        {
            "id": 1,
            "name": "Borne",
            "tile": 1031,
            "faction": {
                "load_id": 1,
                "def_name": "TribeCivil",
                "name": "Union of Cheñoalo",
                "is_player": false,
                "leader_title": "Anima Chief",
                "leader_id": 19
            }
        },
        {
            "id": 2,
            "name": "Carsium",
            "tile": 387,
            "faction": {
                "load_id": 2,
                "def_name": "Empire",
                "name": "Imperium of God",
                "is_player": false,
                "leader_title": "High Stellarch",
                "leader_id": 25
            }
        },
            {
            "id": 3,
            "name": "Colony",
            "tile": 232,
            "faction": {
                "load_id": 14,
                "def_name": "PlayerColony",
                "name": "New Arrivals",
                "is_player": true,
                "leader_title": "Spirit Curate",
                "leader_id": 0
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-13T11:02:36.2212158Z"
}


GET
/api/v1/world/sites

Retrieves a list of temporary world sites. This includes quest locations, bandit camps, item stashes, ambushes, and other event-generated locations.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/world/sites

Response:

{
    "success": true,
    "data": [
        {
            "id": 12,
            "name": "outpost",
            "tile": 712,
            "faction": {
                "load_id": 7,
                "def_name": "PirateWaster",
                "name": "Gas Crew",
                "is_player": false,
                "leader_title": "Moral Thug",
                "leader_id": 59
            }
        },
        {
            "id": 13,
            "name": "bandit camp",
            "tile": 2720,
            "faction": {
                "load_id": 7,
                "def_name": "PirateWaster",
                "name": "Gas Crew",
                "is_player": false,
                "leader_title": "Moral Thug",
                "leader_id": 59
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-13T11:04:31.8428299Z"
}


GET
/api/v1/world/tile

Retrieves detailed ecological and geographical information about a specific world hex (tile) based on its ID. Returns biome, temperature, elevation, and road/river data.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/world/tile?id=12345"

Response:

{
    "success": true,
    "data": {
        "id": 232,
        "biome": "Tundra",
        "elevation": 1592.0,
        "temperature": -4.1,
        "rainfall": 269.0,
        "hilliness": "SmallHills",
        "roads": [
            "DirtRoad",
            "DirtRoad"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-13T11:05:29.488063Z"
}


GET
/api/v1/world/caravan/path

Retrieves the current movement status and planned path for a specific world caravan.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/world/caravan/path?caravan_id=12"

Response:

{
    "success": true,
    "data": {
        "id": 12,
        "moving": true,
        "current_tile": 150,
        "next_tile": 151,
        "progress": 0.45,
        "destination_tile": 180,
        "path": [
            151,
            152,
            160,
            180
        ]
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/world/player/settlements

Retrieves a list of all settlements belonging to the player's faction.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/world/player/settlements

Response:

{
    "success": true,
    "data": [
        {
            "id": 123,
            "name": "Player's Hope",
            "tile": 5678,
            "faction": {
                "load_id": 3,
                "def_name": "PlayerColony",
                "name": "New Arrivals",
                "is_player": true
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2026-01-04T12:00:00.000Z"
}


GET
/api/v1/world/grid/area

Retrieves a list of world tiles within a specified radius of a center tile.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/world/grid/area?tile_id=12345&radius=5'

Response:

{
    "success": true,
    "data": [
        {
            "id": 12345,
            "biome": "Tundra",
            "elevation": 100.0,
            "temperature": -10.0,
            "rainfall": 200.0,
            "hilliness": "SmallHills",
            "roads": [],
            "rivers": [],
            "lat": 60.0,
            "lon": -30.0,
            "is_polluted": false,
            "pollution": 0.0
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2026-01-04T12:00:00.000Z"
}


GET
/api/v1/world/tile/coordinates

Retrieves the latitude and longitude for a specific tile ID.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/world/tile/coordinates?id=12345'

Response:

{
    "success": true,
    "data": {
        "lat": 60.0,
        "lon": -30.0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2026-01-04T12:00:00.000Z"
}


GET
/api/v1/world/tile/details

Retrieves detailed information about a specific tile.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/world/tile/details?id=12345'

Response:

{
    "success": true,
    "data": {
        "id": 12345,
        "biome": "Tundra",
        "elevation": 100.0,
        "temperature": -10.0,
        "rainfall": 200.0,
        "hilliness": "SmallHills",
        "roads": [
            "279644:StoneRoad",
            "279641:StoneRoad"
        ],
        "rivers": [
            "279640:Creek",
            "279686:Creek"
        ],
        "lat": 60.0,
        "lon": -30.0,
        "is_polluted": false,
        "pollution": 0.0,
        "time_zone": "2",
        "forageability": 0.5,
        "growing_period": "Year-round",
        "movement_difficulty": 1.0,
        "stone_types": [
            "Sandstone",
            "Granite"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2026-01-04T12:00:00.000Z"
}


GET
/api/v1/world/grid

Retrieves the entire world grid, returning a list of all tiles with their basic information.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/world/grid

Response:

{
    "success": true,
    "data": [
        {
            "id": 0,
            "biome": "Ocean",
            "elevation": -100.0,
            "temperature": 10.0,
            "rainfall": 500.0,
            "hilliness": "Flat",
            "roads": [
                "279644:StoneRoad",
                "279641:StoneRoad"
            ],
            "rivers": [
                "279640:Creek",
                "279686:Creek"
            ],
            "lat": -90.0,
            "lon": 0.0,
            "is_polluted": false,
            "pollution": 0.0
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2026-01-04T12:00:00.000Z"
}

Image Controller

Provides endpoints for extracting visual assets and textures from the game. This is essential for external tools that need to render game maps or items visually by retrieving the actual textures used by RimWorld.


GET
/api/v1/terrain/image

Retrieves the texture image for a specific terrain definition in Base64 format. The name parameter corresponds to the defName of the terrain (e.g., Soil, WaterDeep, Sand).

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/terrain/image?name=Soil"

Response:

{
    "success": true,
    "data": {
        "name": "Soil",
        "image_base64": "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0..."
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:15:30.000Z"
}


GET
/api/v1/item/image

Retrieves a base64-encoded image of a specific in-game item.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/item/image?name=ComponentIndustrial'

Response:

{
    "success": true,
    "data": {
        "result": "success",
        "image_base64": "..."
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:31:48.7480326Z"
}


POST
/api/v1/item/change/image

Uploads and applies a new custom texture to a specific in-game item or thing. Accepts base64-encoded image data along with various rendering properties like scale, directional facing, and masking.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/item/change/image \
--header 'content-type: application/json' \
--data '{
    "Name": "WoodLog",
    "Image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
    "Direction": "South",
    "Offset": "0,0,0",
    "Scale": "1.0",
    "ThingType": "Item",
    "IsStackable": "true",
    "MaskImage": "",
    "UpdateItemIndex": 0
}'

Request:

{
    "Name": "WoodLog",
    "Image": "<base64_encoded_string>",
    "Direction": "South",
    "Offset": "0,0,0",
    "Scale": "1.0",
    "ThingType": "Item",
    "IsStackable": "true",
    "MaskImage": "<optional_base64_mask>",
    "UpdateItemIndex": 0
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-02-21T20:15:30.000Z"
}

Lord Controller

The Lord Controller is responsible for managing AI Lords, which are high-level AI constructs that command groups of pawns.


POST
/api/v1/lords/create

Creates a new AI Lord with a specified job.

Request:

{
    "faction": "AncientsHostile",
    "pawn_ids": [39395],
    "job_type": "AssaultThings",
    "target_ids": [39387]
}

Response:

{
    "success":true,
    "data":
    {
        "lord_id":0,
        "member_count":1
    },
    "errors":[],
    "warnings":[],
    "timestamp":"2025-12-31T11:39:54.3651293Z"
}

Map Controller

Focuses on the Local map selected by map_id. This handles the physical terrain and conditions of the colony's immediate area.

Scope

This controller deals with the environment, not the entities within it. For Pawns or Items, see their respective controllers.

Capabilities:

  • Change local weather.
  • Query map size and boundaries.
  • Modify terrain (set floors, clear debris).

GET
/api/v1/map/things

Returns a comprehensive list of all objects (things) present on the current map.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/map/things?map_id=0

Response:

{
    "success": true,
    "data": [
        {
            "thing_id": 2328,
            "def_name": "ChunkGranite",
            "label": "granite chunk",
            "categories": [
                "StoneChunks"
            ],
            "position": {
                "x": 41,
                "y": 0,
                "z": 1
            },
            "stack_count": 1,
            "market_value": 0.0,
            "is_forbidden": false,
            "quality": -1,
            "hit_points": 300,
            "max_hit_points": 300
        },
        {
            "thing_id": 4895,
            "def_name": "MealSurvivalPack",
            "label": "packaged survival meal",
            "categories": [
                "FoodMeals"
            ],
            "position": {
                "x": 13,
                "y": 0,
                "z": 62
            },
            "stack_count": 1,
            "market_value": 24.0,
            "is_forbidden": true,
            "quality": -1,
            "hit_points": 50,
            "max_hit_points": 50
        },
        <...>
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/maps

Retrieves a list of all currently loaded maps in the game session.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/maps

Response:

{
    "success": true,
    "data": [
        {
        "id": 0,
        "index": 0,
        "seed": 16622162,
        "faction_id": "14",
        "is_player_home": true,
        "is_pocket_map": false,
        "is_temp_incident_map": false,
        "size": "(150, 1, 150)"
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:38:45.9289233Z"
}


GET
/api/v1/map/pawns

Gets a list of all colonists/pawns present on the specified map. Returns key status information like health, mood, and position for each.

curl --request GET \
--url 'http://localhost:8765/api/v1/map/pawns?mapId=0'

Response:

{
    "success": true,
    "data": [
        {
            "id": 148,
            "name": "Val",
            "gender": "Female",
            "age": 25,
            "health": 1.0,
            "mood": 0.85,
            "hunger": 0.2,
            "position": {
                "x": 102,
                "y": 0,
                "z": 115
            }
        },
        {
            "id": 149,
            "name": "Stumpy",
            "gender": "Male",
            "age": 42,
            "health": 0.65,
            "mood": 0.4,
            "hunger": 0.8,
            "position": {
                "x": 105,
                "y": 0,
                "z": 112
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:30:00.0000000Z"
}


GET
/api/v1/map/terrain

Returns the full terrain and floor grid data for the specified map.

Note on Data Format: To optimize bandwidth, this endpoint uses Run-Length Encoding (RLE) and Palette Mapping.

  • palette: A list of unique terrain definitions (e.g., "Soil", "WaterDeep").
  • grid: A compressed list of integers representing the map cells. Format is pairs of [count, palette_index].

Example decoding: A grid [10, 0, 5, 2] means "10 cells of palette[0], followed by 5 cells of palette[2]".

Example:

curl --request GET \
--url http://localhost:8765/api/v1/map/terrain?map_id=0

Response:

{
    "success": true,
    "data": {
        "width": 250,
        "height": 250,
        "palette": [
            "Soil",
            "Gravel",
            "SoilRich",
            "WaterDeep"
        ],
        "grid": [
            22,
            0,
            5,
            1,
            500,
            0,
            10,
            3
        ],
        "floor_palette": [
            "WoodPlankFloor",
            "TileSandstone"
        ],
        "floor_grid": [
            62400,
            0,
            50,
            1,
            50,
            2
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T13:12:28.8217513Z"
}


GET
/api/v1/map/things-at

Returns a list of things located at a specific single cell coordinate.

Note: Unlike standard GET requests, this endpoint requires a JSON body containing the coordinates.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/map/things-at \
--header 'Content-Type: application/json' \
--data '{
    "map_id": 0,
    "position": { "x": 15, "y": 0, "z": 25 }
}'

Request Body:

{
    "map_id": 0,
    "position": {
        "x": 15,
        "y": 0,
        "z": 25
    }
}

Response:

{
    "success": true,
    "data": [
        {
            "thing_id": 4895,
            "def_name": "MealSurvivalPack",
            "label": "packaged survival meal",
            "position": { "x": 15, "y": 0, "z": 25 },
            "stack_count": 10
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T13:40:00.000Z"
}


GET
/api/v1/map/things/radius

Returns a list of all things found within a specified radius around a center point. Useful for finding nearby resources or enemies.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/map/things/radius?map_id=0&x=120&z=120&radius=10"

Response:

{
    "success": true,
    "data": [
        {
            "thing_id": 2328,
            "def_name": "ChunkGranite",
            "label": "granite chunk",
            "position": { "x": 121, "y": 0, "z": 119 },
            "stack_count": 1
        },
        {
            "thing_id": 5012,
            "def_name": "Steel",
            "label": "steel",
            "position": { "x": 118, "y": 0, "z": 122 },
            "stack_count": 35
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T13:42:00.000Z"
}


GET
/api/v1/map/ore

Returns a compressed dictionary of all ore deposits on the map.

Structure: * Keys are the ore definition names (e.g., "MineableSteel"). * cells contains the flattened map indices of the ore. * hp contains the current health of the ore block at the corresponding index (parallel arrays).

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/map/ore?map_id=0"

Response:

{
    "success": true,
    "data": {
        "map_width": 250,
        "ores": {
            "MineableSteel": {
                "max_hp": 1500,
                "cells": [
                    12500,
                    12501,
                    12502
                ],
                "hp": [
                    1500,
                    1500,
                    850
                ]
            },
            "MineableGold": {
                "max_hp": 500,
                "cells": [
                    3005
                ],
                "hp": [
                    500
                ]
            }
        }
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/map/fog-grid

Retrieves the visibility (fog of war) grid for the current map.

The fog_data is a flat string representation of the grid where Index = (z * Width) + x.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/map/fog-grid?map_id=0"

Response:

{
    "success": true,
    "data": {
        "map_id": 0,
        "width": 250,
        "height": 250,
        "fog_data": "AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+fw=="
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/map/plants

Returns a list of all plants located on the specified map. This includes wild plants (trees, bushes, grass) and sown crops.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/map/plants?map_id=0"

Response:

{
    "success": true,
    "data": [
        {
            "thing_id": 1024,
            "def_name": "Plant_TreeOak",
            "label": "oak tree",
            "position": { "x": 45, "y": 0, "z": 88 },
            "growth": 0.85
        },
        {
            "thing_id": 1025,
            "def_name": "Plant_Potato",
            "label": "potato plant",
            "position": { "x": 50, "y": 0, "z": 50 },
            "growth": 0.45
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:12:00.000Z"
}


GET
/api/v1/map/weather

Retrieves the current weather conditions and temperature for the currently active map (the map the player is viewing).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/map/weather?map_id=0'

Response:

{
    "success": true,
    "data": {
        "weather": "Rain",
        "temperature": 19.7876511
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:39:54.5380426Z"
}


GET
/api/v1/map/animals

Retrieves a list of all animals currently present on the active map. This includes both wild animals and tamed/owned animals (pets, livestock, caravan animals).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/map/animals?map_id=0'

Response:

{
    "success": true,
    "data": [
        {
        "id": 3633,
        "name": "Colin",
        "def": "Yak",
        "faction": "PlayerColony",
        "position": {
            "x": 67,
            "y": 119,
            "z": 0
        },
        "pregnant": false
        },
        {
        "id": 8547,
        "name": "Hare",
        "def": "Hare",
        "position": {
            "x": 50,
            "y": 40,
            "z": 0
        },
        "pregnant": false
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:41:34.3358819Z"
}


GET
/api/v1/map/zones

Retrieves a list of all defined zones and areas on the active map. Zones are player-designated and areas are specific purposes layouts, such as roof build, clear pollution, etc.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/map/zones?map_id=0'

Response:

{
    "success": true,
    "data": {
        "zones": [],
        "areas": [
            {
                "id": 0,
                "cells_count": 0,
                "label": "Home",
                "base_label": "Home",
                "type": "Area_Home"
            },
            {
                "id": 1,
                "cells_count": 0,
                "label": "Build roof",
                "base_label": "Build roof",
                "type": "Area_BuildRoof"
            },
            {
                "id": 2,
                "cells_count": 0,
                "label": "No roof",
                "base_label": "No roof",
                "type": "Area_NoRoof"
            },
            {
                "id": 3,
                "cells_count": 0,
                "label": "Snow clear",
                "base_label": "Snow clear",
                "type": "Area_SnowClear"
            },
            {
                "id": 4,
                "cells_count": 0,
                "label": "Pollution clear",
                "base_label": "Pollution clear",
                "type": "Area_PollutionClear"
            },
            {
                "id": 5,
                "cells_count": 0,
                "label": "Area 1",
                "base_label": "Area 1",
                "type": "Area_Allowed"
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:42:50.3515476Z"
}


GET
/api/v1/map/building/info

Retrieves detailed information about a specific building on the active map, given its unique identifier.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/building/info?id=51058'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/map/weather/change

Manually changes the current weather conditions on the active map.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/map/weather/change?map_id=0&name=Clear'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


GET
/api/v1/map/power/info

Provides detailed information about the power grid on the current map, including generators, batteries, consumers, network balance, and power flow status.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/map/power/info?map_id=0

Response:

{
    "success": true,
    "data": {
        "produce_power_buildings": [],
        "consume_power_buildings": [],
        "store_power_buildings": [],
        "current_power": 0,
        "total_possible_power": 0,
        "currently_stored_power": 0,
        "total_power_storage": 0,
        "total_consumption": 0,
        "consumption_power_on": 0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:48:05.7377482Z"
}


GET
/api/v1/map/creatures/summary

Returns a summarized count and classification of all creatures (pawns) on the current map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/creatures/summary?map_id=0

Response:

{
    "success": true,
    "data": {
        "colonists_count": 3,
        "prisoners_count": 0,
        "enemies_count": 0,
        "animals_count": 5,
        "insectoids_count": 0,
        "mechanoids_count": 0
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:49:21.2287056Z"
}


GET
/api/v1/map/farm/summary

Retrieves a summary of all farming activities on the current map, including planted crops, growth stages, soil fertility, and expected yield.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/farm/summary?map_id=0

Response:

{
    "success": true,
    "data": {
        "total_growing_zones": 0,
        "total_plants": 0,
        "total_expected_yield": 0,
        "total_infected_plants": 0,
        "growth_progress_average": 0.0,
        "crop_types": []
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:52:41.9403791Z"
}


GET
/api/v1/map/zone/growing

Returns detailed information about all growing zones on the map, including their plant types, growth progress, and zone settings.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/zone/growing?map_id=0

Response:

{
    "success": true,
    "data": {
        "zone": {
        "id": 0,
        "cells_count": 24,
        "label": "Growing zone 1",
        "base_label": "Growing zone"
        },
        "plant_def_name": "Plant_Potato",
        "plant_count": 2,
        "def_expected_yield": 0,
        "expected_yield": 0,
        "infected_count": 0,
        "growth_progress": 0.5825427,
        "is_sowing": true,
        "soil_type": "Soil",
        "fertility": 1.0,
        "has_dying": false,
        "has_dying_from_pollution": false,
        "has_dying_from_no_pollution": false
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:53:31.8379705Z"
}


GET
/api/v1/map/rooms

Retrieves a list of all colonists in the player's faction, including their skills, traits, health, mood, and current activities.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/rooms?map_id=0

Response:

{
    "success": true,
    "data": {
        "rooms": [
        {
            "id": 5,
            "role_label": "none",
            "temperature": 4.217273,
            "cells_count": 0,
            "touches_map_edge": false,
            "is_prison_cell": false,
            "is_doorway": false,
            "open_roof_count": 0,
            "contained_beds_ids": []
        },
        {
            "id": 61,
            "role_label": "bedroom",
            "temperature": 4.217273,
            "cells_count": 6,
            "touches_map_edge": false,
            "is_prison_cell": false,
            "is_doorway": false,
            "open_roof_count": 6,
            "contained_beds_ids": [
            8408
            ]
        }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T19:57:48.1578638Z"
}


GET
/api/v1/map/buildings

Retrieves a comprehensive list of all buildings and structures present on the active map.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/map/buildings?map_id=0'

Response:

{
    "success": true,
    "data": [
        {
            "id": 8880,
            "def": "Turret_MiniTurret",
            "label": "steel mini-turret",
            "position": {
                "x": 60,
                "y": 0,
                "z": 86
            },
            "type": "Building_TurretGun"
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:46:33.2115192Z"
}


POST
/api/v1/map/destroy/corpses

Destroys all corpses on the map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/destroy/corpses


POST
/api/v1/map/destroy/forbidden

Destroys all forbidden items on the map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/destroy/forbidden


POST
/api/v1/map/destroy/rect

Destroys all things within a specified rectangle on the map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/destroy/rect \
--header 'content-type: application/json' \
--data '{
    "map_id": 0,
    "point_a": {"x": 7, "y": 0, "z": 7},
    "point_b": {"x": 32, "y": 0, "z": 32}
}'

Request:

{
    "map_id": 0,
    "point_a": {"x": 7, "y": 0, "z": 7},
    "point_b": {"x": 32, "y": 0, "z": 32}
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T11:04:27.9729153Z"
}


POST
/api/v1/map/repair/positions

Repairs items placed on provided list of positions.


POST
/api/v1/map/repair/rect

Repairs all repairable items within a specified rectangle on the map.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/map/repair/rect \
--header 'content-type: application/json' \
--data '{
    "map_id": 0,
    "point_a": {"x": 7, "y": 0, "z": 7},
    "point_b": {"x": 32, "y": 0, "z": 32}
}'

Request:

{
    "map_id": 0,
    "point_a": {"x": 7, "y": 0, "z": 7},
    "point_b": {"x": 32, "y": 0, "z": 32}
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T11:04:27.9729153Z"
}


POST
/api/v1/map/droppod

Spawns a drop pod at a specified position with given contents.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/map/droppod' \
--header 'content-type: application/json' \
--data '{
    "map_id": 0,
    "position": {"x": 15, "y": 0, "z": 15},
    "items": [{"def_name": "ComponentIndustrial", "quality": 3, "count": 1}],
    "open_delay": true
}'

Request:

{
    "map_id": 0,
    "position": {"x": 15, "y": 0, "z": 15},
    "items": [{"def_name": "ComponentIndustrial", "quality": 3, "count": 1}],
    "open_delay": true
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T11:04:27.9729153Z"
}

Order Controller

The Order Controller is for issuing commands to pawns.


POST
/api/v1/order/designate/area

Send command

Currently supported commands:

  • remove-all: removes all commands
  • mine
  • deconstruct
  • harvest
  • hunt

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/order/designate/area'

Request:

{
    "map_id": 0,
    "type": "Mine",
    "point_a": {"x": 0, "y": 0, "z": 0},
    "point_b": {"x": 250, "y": 0, "z": 250}
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T11:04:27.9729153Z"
}

Overlay Controller

The Overlay Controller is for drawing overlays on the screen.


POST
/api/v1/ui/announce

Pawn Controller

The Pawn Controller is a Read-Only interface for retrieving detailed statistics about colonists, prisoners, animals, and enemies.

It provides a deep dive into:

  • Needs: Hunger, Rest, Recreation.
  • Bio: Age, Traits, Backstory.
  • Work: Current job, priorities, and schedules.

GET
/api/v2/colonists/detailed

Retrieves a comprehensive list of all colonists with detailed statistics, including needs (sleep, joy, beauty), work priorities, and medical status.

Cache Policy

This endpoint is cached server-side for 1800 game ticks (~30 seconds) to reduce performance impact on the game loop.

Example:

curl --request GET \
--url http://localhost:8765/api/v2/colonists/detailed

Response:

{
    "success": true,
    "data": [
        {
            "pawn": {
                "id": 101,
                "name": "Lumi",
                "gender": "Female",
                "age": 25,
                "health": 1.0,
                "mood": 0.85,
                "hunger": 0.2,
                "position": {
                    "x": 10,
                    "y": 0,
                    "z": 15
                }
            },
            "detailes": {
                "body_size": 1.0,
                "sleep": 0.9,
                "comfort": 0.8,
                "beauty": 0.5,
                "joy": 0.75,
                "energy": 0.8,
                "drugs_desire": 0.0,
                "surrounding_beauty": 1.2,
                "fresh_air": 1.0,
                "work_info": {
                    "job": "Harvesting",
                    "work_speed": 1.1
                },
                "policies_info": {
                    "food": "Lavish",
                    "clothing": "Anything"
                },
                "medical_info": {
                    "in_pain": false,
                    "bleeding_rate": 0.0
                },
                "social_info": {
                    "marital_status": "Single"
                }
            }
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v2/colonist/detailed

Retrieves detailed statistics for a single colonist identified by their ID. Unlike the bulk endpoint, this request fetches real-time data without caching.

Example:

curl --request GET \
--url "http://localhost:8765/api/v2/colonist/detailed?id=101"

Response:

{
    "success": true,
    "data": {
        "pawn": {
            "id": 101,
            "name": "Lumi",
            "gender": "Female",
            "age": 25,
            "health": 1.0,
            "mood": 0.85,
            "hunger": 0.2,
            "position": {
                "x": 10,
                "y": 0,
                "z": 15
            }
        },
        "detailes": {
            "body_size": 1.0,
            "sleep": 0.9,
            "comfort": 0.8,
            "beauty": 0.5,
            "joy": 0.75,
            "energy": 0.8,
            "drugs_desire": 0.0,
            "surrounding_beauty": 1.2,
            "fresh_air": 1.0,
            "work_info": {
                "job": "Harvesting",
                "work_speed": 1.1
            },
            "policies_info": {
                "food": "Lavish",
                "clothing": "Anything"
            },
            "medical_info": {
                "in_pain": false,
                "bleeding_rate": 0.0
            },
            "social_info": {
                "marital_status": "Single"
            }
        }
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonists

Retrieves a list of all colonists in the player's faction, including their skills, traits, health, mood, and current activities.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonists'

Response:

{
    "success": true,
    "data": [
        {
            "id": 1011,
            "name": "Walters",
            "gender": "Male",
            "age": 13,
            "health": 1.0,
            "mood": 0.7448001,
            "hunger": 0.663999736,
            "position": {
                "x": 71,
                "y": 0,
                "z": 94
            }
        },
        {
            "id": 1014,
            "name": "Nordi",
            "gender": "Male",
            "age": 61,
            "health": 1.0,
            "mood": 0.559999764,
            "hunger": 0.663999736,
            "position": {
                "x": 74,
                "y": 0,
                "z": 91
            }
        },
        {
            "id": 1017,
            "name": "Casey",
            "gender": "Male",
            "age": 41,
            "health": 1.0,
            "mood": 0.55,
            "hunger": 0.667999744,
            "position": {
                "x": 68,
                "y": 0,
                "z": 95
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T20:00:34.2760128Z"
}


GET
/api/v1/colonist

Retrieves a info about single colonist in the player's faction.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist?id=1020'

Response:

{
    "success": true,
    "data": {
        "id": 1040,
        "name": "Blake",
        "gender": "Male",
        "age": 31,
        "health": 1.0,
        "mood": 0.5072,
        "hunger": 0.796,
        "position": {
        "x": 63,
        "y": 0,
        "z": 88
        }
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T20:09:41.7078214Z"
}


GET
/api/v1/colonists/detailed

Retrieves a detailed list of all colonists in the player's faction, including their skills, traits, health, mood, and current activities.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/colonists/detailed

Response:

{
    "success": true,
    "data": [
        {
            "colonist": {
                "id": 1020,
                "name": "Lumi",
                "gender": "Female",
                "age": 25,
                "health": 1.0,
                "mood": 0.85,
                "hunger": 0.2,
                "position": { "x": 10, "y": 0, "z": 15 }
            },
            "body_size": 1.0,
            "sleep": 0.9,
            "comfort": 0.8,
            "beauty": 0.5,
            "joy": 0.75,
            "energy": 0.8,
            "drugs_desire": 0.0,
            "surrounding_beauty": 1.2,
            "fresh_air": 1.0,
            "colonist_work_info": {
                "job": "Harvesting",
                "work_speed": 1.1
            },
            "policies_info": {
                "food": "Lavish",
                "clothing": "Anything"
            },
            "colonist_medical_info": {
                "in_pain": false,
                "bleeding_rate": 0.0
            },
            "social_info": {
                "marital_status": "Single"
            }
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonist/detailed

Retrieves detailed info about a single colonist in the player's faction by ID.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/colonist/detailed?id=1020"

Response:

{
    "success": true,
    "data": {
        "colonist": {
            "id": 1020,
            "name": "Lumi",
            "gender": "Female",
            "age": 25,
            "health": 1.0,
            "mood": 0.85,
            "hunger": 0.2,
            "position": { "x": 10, "y": 0, "z": 15 }
        },
        "body_size": 1.0,
        "sleep": 0.9,
        "comfort": 0.8,
        "beauty": 0.5,
        "joy": 0.75,
        "energy": 0.8,
        "drugs_desire": 0.0,
        "surrounding_beauty": 1.2,
        "fresh_air": 1.0,
        "colonist_work_info": {
            "job": "Harvesting",
            "work_speed": 1.1
        },
        "policies_info": {
            "food": "Lavish",
            "clothing": "Anything"
        },
        "colonist_medical_info": {
            "in_pain": false,
            "bleeding_rate": 0.0
        },
        "social_info": {
            "marital_status": "Single"
        }
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonist/opinion-about

Retrieves the opinion of one colonist about another specified colonist. This endpoint provides insight into interpersonal relationships within the colony, returning two integer values: Opinion (the opinion of the colonist identified by id about the colonist identified by other_id) and OpinionAboutMe (the opinion of the colonist identified by other_id about the colonist identified by id).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/opinion-about?id=1020&other_id=964'

Response:

{
    "success": true,
    "data": {
        "opinion": 75,
        "opinion_about_me": 50
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


POST
/api/v1/colonist/time-assignment

Sets or modifies the time assignment (schedule) for one or more colonists. Time assignments in RimWorld define the daily schedule for each colonist, determining when they sleep, work, have recreation, or anything else.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonist/time-assignment \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 99,
    "hour": 14,
    "assignment": "Joy"
}'

Request:

{
    "pawn_id": 99,
    "hour": 14,
    "assignment": "Joy"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


GET
/api/v1/colonists/positions

Retrieves the real-time coordinates of all colonists across all maps.

Performance Note: This endpoint is heavily cached (100ms TTL) and optimized for high-frequency polling. It returns a lightweight DTO containing only essential location data, making it ideal for updating minimaps or live trackers.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/colonists/positions

Response:

{
    "success": true,
    "data": [
        {
            "id": 5612,
            "map_id": 0,
            "x": 125,
            "z": 110
        },
        {
            "id": 5613,
            "map_id": 0,
            "x": 128,
            "z": 112
        },
        {
            "id": 8901,
            "map_id": 1,
            "x": 45,
            "z": 200
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:22:15.500Z"
}


GET
/api/v1/colonist/inventory

Retrieves a detailed list of all items, apparel, and equipment currently in a colonist's inventory. This includes items carried, worn apparel, and equipped weapons/tools.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/inventory?id=1020'

Response:

{
    "success": true,
    "data": {
        "Items": [
            {
                "thing_id": 4895,
                "def_name": "MealSurvivalPack",
                "label": "packaged survival meal",
                "categories": ["FoodMeals"],
                "position": { "x": 13, "y": 0, "z": 62 },
                "stack_count": 5,
                "market_value": 24.0,
                "is_forbidden": false,
                "quality": -1,
                "hit_points": 50,
                "max_hit_points": 50
            }
        ],
        "Apparels": [
            {
                "thing_id": 1234,
                "def_name": "Apparel_Pants",
                "label": "pants",
                "categories": ["Apparel"],
                "position": { "x": 0, "y": 0, "z": 0 },
                "stack_count": 1,
                "market_value": 50.0,
                "is_forbidden": false,
                "quality": 3,
                "hit_points": 75,
                "max_hit_points": 100
            }
        ],
        "Equipment": [
            {
                "thing_id": 5678,
                "def_name": "Weapon_AssaultRifle",
                "label": "assault rifle",
                "categories": ["Weapons"],
                "position": { "x": 0, "y": 0, "z": 0 },
                "stack_count": 1,
                "market_value": 700.0,
                "is_forbidden": false,
                "quality": 4,
                "hit_points": 120,
                "max_hit_points": 150
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/colonist/body/image

Retrieves base64-encoded images and color information for a colonist's body and head. This endpoint is useful for rendering or analyzing colonist appearance.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/body/image?id=1020'

Response:

{
    "success": true,
    "data": {
        "body_image": "base64_encoded_body_image_string",
        "body_color": "RGBA(1.000, 1.000, 1.000, 1.000)",
        "head_image": "base64_encoded_head_image_string",
        "head_color": "RGBA(1.000, 1.000, 1.000, 1.000)"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


POST
/api/v1/colonist/work-priority

Sets or adjusts the work-type priorities for one or more colonists. Work priorities determine which tasks a colonist will perform during their work hours, with each work type (e.g., Firefighting, Construction, Growing, Crafting) assigned a priority level from 1 (highest) to 4 (lowest) or disabled (0).

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonist/work-priority \
--header 'content-type: application/json' \
--data '{
    "id": 99,
    "work": "Cooking",
    "priority": 1
}'

Request:

{
    "id": 99,
    "work": "Cooking",
    "priority": 1
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/colonists/work-priority

Sets or adjusts work-type priorities for multiple colonists in a single request.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonists/work-priority \
--header 'content-type: application/json' \
--data '[
    { "id": 37586, "work": "Patient", "priority": 5 },
    { "id": 67969, "work": "Hauling", "priority": 1 }
]'

Request:

[
    { "id": 37586, "work": "Patient", "priority": 5 },
    { "id": 67969, "work": "Hauling", "priority": 1 }
]

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/jobs/make/equip

Creates a job for a colonist to equip a specific item from available inventory or the surrounding area. This endpoint queues an immediate "equip" task, instructing the colonist to pick up and wear/wield the designated apparel or weapon.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/jobs/make/equip?map_id=0&pawn_id=1011&item_id=4849' \
--header 'content-type: application/json'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


GET
/api/v1/pawn/portrait/image

Retrieves a base64-encoded portrait image of a specific pawn. This endpoint allows specifying the desired width, height, and viewing direction for the portrait.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawn/portrait/image?pawn_id=1020&width=128&height=128&direction=South'

Response:

{
    "success": true,
    "data": {
        "result": "success",
        "image_base64": "base64_encoded_portrait_image_string"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/trait-def

Retrieves detailed information about a specific trait definition. Traits define a pawn's inherent characteristics and can influence their skills, mood, and interactions.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/trait-def?name=Ascetic'

Response:

{
    "success": true,
    "data": {
        "def_name": "Ascetic",
        "label": "ascetic",
        "description": "",
        "degree_datas": [
            {
                "label": "ascetic",
                "description": "{PAWN_nameDef} has forsaken physical comforts and enjoyments in favor of a simple, pure lifestyle. {PAWN_pronoun} will become unhappy if {PAWN_pronoun} has a bedroom that's too impressive. {PAWN_pronoun} also dislikes fancy food and prefers to eat raw. {PAWN_pronoun} never judges others by their appearance.",
                "degree": 0,
                "skill_gains": {},
                "stat_offsets": [],
                "stat_factors": [
                    {
                        "stat_def_name": "CertaintyLossFactor",
                        "value": 0.5
                    }
                ]
            }
        ],
        "conflicting_traits": [
            "Greedy",
            "Jealous",
            "Gourmand"
        ],
        "disabled_work_types": [],
        "disabled_work_tags": "None"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/time-assignments

Retrieves a list of all available time assignments that can be set for colonists. These assignments define daily schedules like 'Sleep', 'Work', 'Joy', etc.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/time-assignments'

Response:

{
    "success": true,
    "data": [
        { "name": "Anything" },
        { "name": "Work" },
        { "name": "Joy" },
        { "name": "Sleep" },
        { "name": "Meditate" }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/outfits

Retrieves a list of all defined outfits in the game, including their labels and associated item filters. Outfits dictate which apparel colonists will wear based on criteria like type, quality, and hit points.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/outfits'

Response:

{
    "success": true,
    "data": [
        {
            "Id": 1,
            "Label": "Worker",
            "Filter": {
                "allowed_thing_def_names": [
                    "Apparel_CowboyHat",
                    "Apparel_BowlerHat",
                    "Apparel_TribalHeaddress",
                    "Apparel_Tuque",
                ],
                "disallowed_special_filter_def_names": ["AllowBurned"],
                "allowed_hit_points_min": 0.5,
                "allowed_hit_points_max": 1.0,
                "allowed_quality_min": "poor",
                "allowed_quality_max": "masterwork",
                "allowed_hit_points_configurable": true,
                "allowed_qualities_configurable": true
            }
        },
        {
            "id": 2,
            "label": "soldier",
            "filter": {
                "allowed_thing_def_names": [],
                "disallowed_special_filter_def_names": ["AllowSmeltable"],
                "allowed_hit_points_min": 0.8,
                "allowed_hit_points_max": 1.0,
                "allowed_quality_min": "good",
                "allowed_quality_max": "legendary",
                "allowed_hit_points_configurable": true,
                "allowed_qualities_configurable": true
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/work-list

Retrieves a comprehensive list of all defined work types in the game. Work types categorize tasks that colonists can perform, such as 'Hauling', 'Cooking', 'Mining', 'PlantCutting', etc.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/work-list'

Response:

{
    "success": true,
    "data": {
        "work": [
            "Firefighter",
            "Patient",
            "Doctor",
            "PatientBedRest",
            "BasicWorker",
            "Warden",
            "Handling",
            "Cooking",
            "Hunting",
            "Construction",
            "Growing",
            "Mining",
            "PlantCutting",
            "Smithing",
            "Tailoring",
            "Art",
            "Crafting",
            "Hauling",
            "Cleaning",
            "Research",
            "Childcare",
            "DarkStudy"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}

Pawn Edit Controller

The Pawn Edit Controller allows for direct Mutation of entity data. Unlike the standard Pawn controller, this allows you to rewrite the fundamental properties of a character.

Experimental Feature

This API controller is experimental.

Common Uses:

  • Resurrection / Heal
  • Set Skill Level
  • Add/Remove Traits
  • Teleport

POST
/api/v1/pawn/edit/basic

Edits the basic information of a pawn, such as name, gender, and age.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/basic \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "nick_name": "Ace",
    "gender": "Male",
    "biological_age": 25
}'

Request:

{
    "pawn_id": 148,
    "name": "Ace",
    "first_name": "John",
    "last_name": "Doe",
    "nick_name": "Ace",
    "gender": "Male",
    "biological_age": 25,
    "chronological_age": 150
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/health

Edits the health of a pawn, allowing to heal injuries or cure diseases.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/health \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "heal_all_injuries": true,
    "restore_body_parts": true,
    "remove_all_diseases": true
}'

Request:

{
    "pawn_id": 148,
    "heal_all_injuries": true,
    "restore_body_parts": true,
    "remove_all_diseases": true
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/needs

Edits the needs of a pawn, such as hunger, rest, and mood. Values range from 0.0 to 1.0.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/needs \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "food": 1.0,
    "rest": 1.0,
    "mood": 1.0
}'

Request:

{
    "pawn_id": 148,
    "food": 1.0,
    "rest": 1.0,
    "mood": 1.0
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/skills

Edits the skills of a pawn, setting the level for specified skills.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/skills \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 2356,
    "skills": [
        { "skill_name": "Shooting", "level": 20, "passion": 3 }
    ]
}'

Request:

{
    "pawn_id": 2356,
    "skills": [
        {
            "skill_name": "Shooting",
            "level": 20,
            "passion": 3
        },
        {
            "skill_name": "Medicine",
            "level": 15,
            "passion": 2
        },
        {
            "skill_name": "Melee",
            "level": 0,
            "passion": 1
        }
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T12:36:12.432366Z"
}


POST
/api/v1/pawn/edit/traits

Edits the traits of a pawn, allowing to add or remove traits.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/traits \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "add_traits": [{ "trait_name": "Cannibal", "degree": 0 }],
    "remove_traits": ["Wimp"]
}'

Request:

{
    "pawn_id": 148,
    "add_traits": [
        {
            "trait_name": "Cannibal",
            "degree": 0
        },
        {
            "trait_name": "Industrious",
            "degree": 0
        }
    ],
    "remove_traits": [
        "Wimp",
        "Pyromaniac"
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/inventory

Edits the inventory of a pawn, allowing to add or remove items.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/inventory \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "clear_inventory": true,
    "add_items": [{ "def_name": "MealSimple", "count": 10 }]
}'

Request:

{
    "pawn_id": 148,
    "drop_inventory": false,
    "clear_inventory": true,
    "add_items": [
        {
            "def_name": "MealSimple",
            "count": 10
        },
        {
            "def_name": "MedicineHerbal",
            "count": 5
        }
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/apparel

Edits the apparel of a pawn. Useful for stripping prisoners or disarming enemies.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/apparel \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "drop_apparel": true,
    "drop_weapons": true
}'

Request:

{
    "pawn_id": 148,
    "drop_apparel": true,
    "drop_weapons": true
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/status

Edits the status of a pawn, such as drafting, killing or resurrecting.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/status \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "is_drafted": true
}'

Request:

{
    "pawn_id": 148,
    "is_drafted": true,
    "kill": false,
    "resurrect": false
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/position

Edits the position of a pawn, teleporting it to a new location.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/position \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "position": { "x": 100, "z": 100 }
}'

Request:

{
    "pawn_id": 148,
    "map_id": "0",
    "position": {
        "x": 100,
        "y": 0,
        "z": 100
    }
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/faction

Edits the faction of a pawn, for example making a prisoner a colonist.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/faction \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "make_colonist": true
}'

Request:

{
    "pawn_id": 148,
    "set_faction": "PlayerColony",
    "make_colonist": true,
    "make_prisoner": false,
    "release_prisoner": false
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}

Pawn Info Controller

The Pawn Info Controller provides detailed information about pawns.


GET
/api/v1/pawns/details

Gets detailed information about a pawn.


GET
/api/v1/pawns/inventory

Gets the inventory of a pawn.

Pawn Spawn Controller

The Pawn Spawn Controller is used to create and spawn new pawns in the game world.


POST
/api/v1/pawn/spawn

Spawns a new pawn.

Request:

{
    "pawn_kind": "Mercenary_Gunner",
    "faction": "OutlanderCivil",
    "position": {"x": 11, "y": 0, "z": 11},
    "biological_age": 25
}

Response:

{
    "success":true,
    "data": {
        "pawn_id":39473,
        "name":"Nitro"
    },
    "errors":[],"warnings":[],
    "timestamp":"2025-12-31T12:32:16.5760065Z"
}

Research Controller

Manages the scientific progress of the colony. This controller allows for viewing the current tech tree status and instantly unlocking technologies.


GET
/api/v1/research/progress

Retrieves information about the currently active research project, including its progress, required research points, and status.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/research/progress'

Response:

{
    "success": true,
    "data": {
        "name": "Microelectronics",
        "label": "Microelectronics",
        "progress": 500,
        "research_points": 3000,
        "description": "Build advanced components and electronics.",
        "is_finished": false,
        "can_start_now": true,
        "player_has_any_appropriate_research_bench": true,
        "required_analyzed_thing_count": 0,
        "analyzed_things_completed": 0,
        "tech_level": "Industrial",
        "prerequisites": ["Electricity"],
        "hidden_prerequisites": [],
        "required_by_this": ["Fabrication", "AdvancedMachining"],
        "progress_percent": 0.16666667
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/research/finished

Retrieves a list of all research projects that have been successfully completed by the player.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/research/finished'

Response:

{
    "success": true,
    "data": {
        "finished_projects": [
            "electricity",
            "basic_research",
            "stonecutting"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/research/tree

Retrieves the entire research tree, providing a list of all research projects and their details, including prerequisites and tech levels. This can be used to visualize or analyze research progression.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/research/tree'

Response:

{
    "success": true,
    "data": {
        "projects": [
            {
                "name": "basic_research",
                "label": "basic research",
                "progress": 0,
                "research_points": 500,
                "description": "unlocks basic research capabilities.",
                "is_finished": true,
                "can_start_now": false,
                "player_has_any_appropriate_research_bench": true,
                "required_analyzed_thing_count": 0,
                "analyzed_things_completed": 0,
                "tech_level": "neolithic",
                "prerequisites": [],
                "hidden_prerequisites": [],
                "required_by_this": ["electricity", "stonecutting"],
                "progress_percent": 1.0
            },
            {
                "name": "electricity",
                "label": "electricity",
                "progress": 0,
                "research_points": 1000,
                "description": "unlocks electrical power generation and basic electrical devices.",
                "is_finished": false,
                "can_start_now": true,
                "player_has_any_appropriate_research_bench": true,
                "required_analyzed_thing_count": 0,
                "analyzed_things_completed": 0,
                "tech_level": "industrial",
                "prerequisites": ["basic_research"],
                "hidden_prerequisites": [],
                "required_by_this": ["microelectronics"],
                "progress_percent": 0.0
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/research/project

Retrieves detailed information about a specific research project by its name. This includes its progress, prerequisites, tech level, and description.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/research/project?name=Microelectronics'

Response:

{
    "success": true,
    "data": {
        "name": "Microelectronics",
        "label": "Microelectronics",
        "progress": 500,
        "research_points": 3000,
        "description": "build advanced components and electronics.",
        "is_finished": false,
        "can_start_now": true,
        "player_has_any_appropriate_research_bench": true,
        "required_analyzed_thing_count": 0,
        "analyzed_things_completed": 0,
        "tech_level": "Industrial",
        "prerequisites": ["Electricity"],
        "hidden_prerequisites": [],
        "required_by_this": ["Fabrication", "AdvancedMachining"],
        "progress_percent": 0.16666667
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12t10:00:00.0000000z"
}


GET
/api/v1/research/summary

Provides a high-level summary of the player's research status, including counts of finished, total, and available projects, and categorization by tech level and research tab.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/research/summary'

Response:

{
    "success": true,
    "data": {
        "finished_projects_count": 3,
        "total_projects_count": 50,
        "available_projects_count": 15,
        "by_tech_level": {
            "neolithic": {
                "finished": 1,
                "total": 5,
                "percent_complete": 20.0,
                "projects": ["BasicResearch"]
            },
            "industrial": {
                "finished": 2,
                "total": 10,
                "percent_complete": 20.0,
                "projects": ["Electricity", "Stonecutting"]
            }
        },
        "by_tab": {
            "basic": {
                "finished": 2,
                "total": 10,
                "percent_complete": 20.0,
                "projects": ["BasicResearch", "Stonecutting"]
            },
            "power": {
                "finished": 1,
                "total": 5,
                "percent_complete": 20.0,
                "projects": ["electricity"]
            }
        }
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}

Server Cache Controller

Endpoints for managing the API's internal caching mechanism. Use these routes to toggle caching, monitor performance statistics (hit/miss ratios), and manually flush the cache to free memory or force data updates.


POST
/api/v1/cache/enable

Enable server caching for endpoint results. When enabled, valid GET requests will be stored in memory to reduce server load and improve response times.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/cache/enable

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


POST
/api/v1/cache/disable

Disable server caching. This forces the server to re-process every request. Useful for debugging or ensuring real-time data accuracy during development.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/cache/disable

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-08T19:13:29.997162Z"
}


GET
/api/v1/cache/status

Retrieves the current status and performance statistics of the API's internal caching system. This endpoint provides visibility into cache utilization, effectiveness, and memory footprint, useful for monitoring and debugging API performance and optimization.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/cache/status

Response:

{
    "enabled": true,
    "statistics": {
        "total_entries": 0,
        "hits": 0,
        "misses": 0,
        "memory_usage_bytes": 0,
        "last_cleanup": "2025-12-10T18:43:21.4353167Z",
        "hit_ratio": 0.0,
        "compiled_delegate_count": 0,
        "compiled_delegate_hits": 0,
        "compiled_delegate_misses": 0
    }
}


POST
/api/v1/cache/clear

Manually triggers a complete flush of the caching system. This removes all stored entries and resets runtime statistics.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/cache/clear

Response:

{
    "enabled": true,
    "statistics": {
        "total_entries": 0,
        "hits": 0,
        "misses": 0,
        "memory_usage_bytes": 0,
        "last_cleanup": "2025-12-10T18:43:21.4353167Z",
        "hit_ratio": 0.0,
        "compiled_delegate_count": 0,
        "compiled_delegate_hits": 0,
        "compiled_delegate_misses": 0
    }
}

Thing Controller

The Thing Controller handles physical objects in the game world that are not humanoids (Pawns). In RimWorld code, almost everything is a "Thing."

Includes:

  • Items: Weapons, Resources, Apparel.
  • Buildings: Walls, Furniture, Workbenches.
  • Plants: Crops, Trees.

GET
/api/v1/item/recipes

Retrieves crafting recipes associated with a specific item. This includes details on ingredients, work amount, required skills, and production stations.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/item/recipes?def_name=MealSimple"

Response:

{
    "success": true,
    "data": {
        "item_def_name": "MealSimple",
        "item_label": "simple meal",
        "recipes": [
            {
                "recipe_def_name": "CookMealSimple",
                "label": "cook simple meal",
                "job_string": "Cooking simple meal.",
                "work_amount": 300.0,
                "work_time_seconds": 5.0,
                "ingredients": [
                    {
                        "summary": "Raw food",
                        "count": 0.5,
                        "is_fixed_item": false,
                        "allowed_def_names": [
                            "RawPotatoes",
                            "RawRice",
                            "Meat_Chicken"
                        ]
                    }
                ],
                "produced_at": [
                    {
                        "def_name": "ElectricStove",
                        "label": "electric stove"
                    },
                    {
                        "def_name": "FueledStove",
                        "label": "fueled stove"
                    },
                    {
                        "def_name": "Campfire",
                        "label": "campfire"
                    }
                ],
                "skill_requirements": [
                    {
                        "skill": "Cooking",
                        "min_level": 0
                    }
                ],
                "research_prerequisite": null
            }
        ]
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/item/sources

Identifies the various methods by which a specific item can be obtained in the game. This includes flags for broad categories (Mining, Trading, Crafting) and specific details like the names of the ores or plants that produce the item.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/item/sources?def_name=Steel"

Response:

{
    "success": true,
    "data": {
        "def_name": "Steel",
        "label": "steel",
        "thing_categories": [
            "ResourcesRaw",
            "Resources"
        ],
        "can_craft": true,
        "can_trade": true,
        "can_harvest": false,
        "can_mine": true,
        "can_butcher": false,
        "crafting_recipes": [
            "SmeltWeapon",
            "SmeltApparel",
            "ExtractMetalFromSlag"
        ],
        "harvested_from": [],
        "mined_from": [
            "MineableSteel"
        ],
        "trade_tags": [
            "BulkGoods",
            "ExoticMisc"
        ]
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/resources/summary

Retrieves a comprehensive summary of all resources present on a specified map, including total item count, total market value, and categorized breakdowns of resources. It also highlights critical resources like food, medicine, and weapons.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/resources/summary?map_id=0'

Response:

{
    "success": true,
    "data": {
        "total_items": 1234,
        "total_market_value": 5678.90,
        "last_updated": "2025-12-12t10:00:00.0000000z",
        "categories": [
            { "category": "foods", "count": 500, "market_value": 1200.00 },
            { "category": "manufactured", "count": 200, "market_value": 2500.00 }
        ],
        "critical_resources": {
            "food_summary": {
                "food_total": 450,
                "total_nutrition": 1500.0,
                "meals_count": 300,
                "raw_food_count": 150,
                "rot_status_info": {
                    "nutrition_rotating_soon": 100.0,
                    "nutrition_not_rotating": 1400.0,
                    "percentage_rotating_soon": 6.67,
                    "soon_rotting_items": [
                        {
                            "thing_id": 1001,
                            "def_name": "MealSimple",
                            "label": "simple meal",
                            "stack_count": 5,
                            "nutrition": 4.5,
                            "days_until_rot": 0.5,
                            "hours_until_rot": 12.0
                        }
                    ],
                    "total_soon_rotting_items": 1,
                    "total_soon_rotting_stacks": 1
                }
            },
            "medicine_total": 20,
            "weapon_count": 5,
            "weapon_value": 1000.00
        }
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/resources/stored

Retrieves a detailed list of all items currently stored on a specified map. Optionally, results can be filtered by resource category. This endpoint provides granular information about each stored item, including its ID, definition name, label, and stack count.

Example:

# Get all stored resources
curl --request GET \
--url 'http://localhost:8765/api/v1/resources/stored?map_id=0'

# Get stored resources by category
curl --request GET \
--url 'http://localhost:8765/api/v1/resources/stored?map_id=0&category=Foods'

Response:

{
    "success": true,
    "data": {
        "Foods": [
            {
                "thing_id": 4895,
                "def_name": "MealSurvivalPack",
                "label": "packaged survival meal x10",
                "categories": ["FoodMeals"],
                "position": { "x": 13, "y": 0, "z": 62 },
                "stack_count": 10,
                "market_value": 24.0,
                "is_forbidden": false,
                "quality": -1,
                "hit_points": 50,
                "max_hit_points": 50
            },
            {
                "thing_id": 4896,
                "def_name": "Pemmican",
                "label": "pemmican x2",
                "categories": ["FoodMeals"],
                "position": { "x": 14, "y": 0, "z": 62 },
                "stack_count": 50,
                "market_value": 1.5,
                "is_forbidden": false,
                "quality": -1,
                "hit_points": 50,
                "max_hit_points": 50
            }
        ],
        "resources_raw": [
            {
                "thing_id": 2328,
                "def_name": "ChunkGranite",
                "label": "granite chunk",
                "categories": ["StoneChunks"],
                "position": { "x": 41, "y": 0, "z": 1 },
                "stack_count": 1,
                "market_value": 0.0,
                "is_forbidden": false,
                "quality": -1,
                "hit_points": 300,
                "max_hit_points": 300
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/resources/storages/summary

Provides a summary of all storage areas (stockpiles and dumping grounds) on a specified map, including the total number of stockpiles, total cells, used cells, and utilization percentage.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/resources/storages/summary?map_id=0'

Response:

{
    "success": true,
    "data": {
        "total_stockpiles": 5,
        "total_cells": 200,
        "used_cells": 120,
        "utilization_percent": 60
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


POST
/api/v1/item/spawn

Spawn an item on the map at selected position.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/item/spawn \
--header 'content-type: application/json' \
--data '{
    "def_name": "BilliardsTable",
    "stuff_def_name": "WoodLog",
    "quality": "Legendary",
    "amount": 1,
    "x": 120,
    "z": 106
}'

Request:

{
    "def_name": "BilliardsTable",
    "stuff_def_name": "WoodLog",
    "quality": "Legendary",
    "amount": 1,
    "x": 120,
    "z": 106
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}

Trade Controller

Provides access to the game's economy and trading systems. This controller handles the definitions for various trader types (Orbital, Caravan, Visitor), allowing you to analyze their stock generation rules, item commonality, and buy/sell behaviors.

Capabilities:

  • List all global Trader Kinds (Defs).
  • Inspect stock generation logic (specific items, categories, or tags).
  • Determine if a trader type is orbital or land-based.

GET
/api/v1/traders/defs

Returns a list of all trader definitions (TraderKindDefs). This includes orbital traders, caravans, and visitors, detailing their stock generation rules, commonality, and whether they buy specific categories of items.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/traders/defs

Response:

{
    "success": true,
    "data": [
        {
            "def_name": "Orbital_BulkGoods",
            "label": "bulk goods trader",
            "orbital": true,
            "visitor": false,
            "commonality": 1.0,
            "items": [
                {
                    "name": "Steel",
                    "count": "500~800",
                    "price": "Normal"
                },
                {
                    "name": "ComponentIndustrial",
                    "count": "20~40"
                }
            ],
            "categories": [
                {
                    "name": "Textiles",
                    "count": "300~600"
                },
                {
                    "name": "FoodRaw",
                    "count": "200~400"
                }
            ],
            "tags": [
                {
                    "name": "Artifact",
                    "buys": false
                }
            ]
        },
        {
            "def_name": "Caravan_Outlander_CombatSupplier",
            "label": "combat supplier",
            "orbital": false,
            "visitor": true,
            "commonality": 1.0,
            "items": [
                {
                    "name": "MedicineIndustrial",
                    "count": "5~15"
                }
            ],
            "categories": [
                {
                    "name": "WeaponsMelee",
                    "count": "3~6"
                }
            ]
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}

Window Controller

The Window Controller manages in-game windows and dialogs.


POST
/api/v1/ui/message

Displays a short message on the screen, similar to in-game notifications.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/ui/message \
--header 'content-type: application/json' \
--data '{
    "text": "You find a wounded refugee asking for help. They are being chased by pirates."
}'

Request:

{
    "text": "You find a wounded refugee asking for help. They are being chased by pirates.",
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/ui/dialog

Displays a dialog window with a specified message and title.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/ui/dialog \
--header 'content-type: application/json' \
--data '{
    "text": "You find a wounded refugee asking for help. They are being chased by pirates.",
    "options": [
        {
            "label": "Offer Safety (Triggers Raid)",
            "action_id": "accept_refugee",
            "resolve_tree": true
        },
        {
            "label": "Turn them away",
            "action_id": "reject_refugee",
            "resolve_tree": true
        },
        {
            "label": "Capture them (Prisoner)",
            "action_id": "capture_refugee",
            "resolve_tree": true
        }
    ]
}'

Request:

{
    "text": "You find a wounded refugee asking for help. They are being chased by pirates.",
    "options": [
        {
            "label": "Offer Safety (Triggers Raid)",
            "action_id": "accept_refugee",
            "resolve_tree": true
        },
        {
            "label": "Turn them away",
            "action_id": "reject_refugee",
            "resolve_tree": true
        },
        {
            "label": "Capture them (Prisoner)",
            "action_id": "capture_refugee",
            "resolve_tree": true
        }
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}