Frostdev

KilnAPI reference Guide

localPlayer (instance registry)

Generated from schema/registry/localPlayer.json by tools/registrygen/registrygen.py: edit the schema, never this page.

This client's local player as the client sees it (kiln.client: the local player's entity and session, its crosshair trace) and the input Kiln sends through its own input path (building input). Client-owned (owner decision 12): it lives only in the game client's own Gate, a write or action applies there and is never sent; a server refuses it (gate:client_owned).

  • Key: world (one value per world); side: client; version 0.1.0, experimental (KILNX032)
  • Values are live: a write applies at the Gate's next turn (one-time, owned by the mod), a hold is re-applied at its cadence until released. Kiln.Gate: LocalPlayer.<Field>; refs: localPlayer[<key>].<field>.
Field Type Holds Cadence Saved Notes
entity int 0..4294967295 - - session read-only; The local player's entity in the client world (0: none).
session int 0..4294967295 - - session read-only; The client world's session (each joined or hosted game is one).
crosshair.hit bool - - session read-only; The game's crosshair trace hit something within its reach (a fresh sample).
crosshair.entity int 0..4294967295 - - session read-only; The hit entity (0: terrain or nothing).
crosshair.distance float m 0..100000 - - session read-only; Metres from the trace's start to the hit.
crosshair.x float m -10000000..10000000 - - session read-only; The hit point: x, world metres.
crosshair.y float m -10000000..10000000 - - session read-only; The hit point: y (up), world metres.
crosshair.z float m -10000000..10000000 - - session read-only; The hit point: z, world metres.
Action Arguments What it does
build action (enum: select/place/remove/undo/dismantle), item (int, optional, 1..4294967295), material (int, optional, 1..4294967295), slot (int, optional, 0..255), position (vec3, optional), rotation (json, optional), scale (vec3, optional), target (int, optional, 1..4294967295) One building action through the local player's own input (kiln.client building input); the server still checks it as the player's own input. Receipt: request (int).
input - Game input Kiln emits for a mod (kiln.client game input). Old calls are recorded here with their mod. Unproven: refused (performed through Kiln.Client's GameInput (its calls are recorded here with their mod); not a Gate action yet).

Enshrouded is a trademark of Keen Games GmbH. Kiln is unofficial.