Examples
Quick Connection Test
Section titled “Quick Connection Test”Verify the game is running and the debug server is reachable:
kinswardctl pingOr test directly with netcat:
echo '{"cmd":"Ping"}' | nc -q1 127.0.0.1 9999Exploration
Section titled “Exploration”Check Your Position
Section titled “Check Your Position”kinswardctl stateReturns player position (x, y, z), current block, inventory contents, and hotbar state.
Survey the Area
Section titled “Survey the Area”# Top-down view of z-level 1, 11x11 area around originkinswardctl layer -z 1 -x -5:5 -y -5:5
# Side view (cross-section) along y=0kinswardctl cross-section -y 0 -x -10:10 -z -2:3
# Find items nearbykinswardctl nearby 10
# Check visibilitykinswardctl fov 15Check Movement Options
Section titled “Check Movement Options”# See all blocked directions at oncekinswardctl blocked
# Check a specific directionkinswardctl can-move northBuilding
Section titled “Building”Place Blocks Manually
Section titled “Place Blocks Manually”# Select a block item in the hotbarkinswardctl select-hotbar 0
# Place it at a specific positionkinswardctl place-block 5 5 1 100Automate with Zone Commands
Section titled “Automate with Zone Commands”Build a 10x10 stone wall floor at z=1:
# First, list your unitskinswardctl units
# Issue zone build to all Colony unitskinswardctl zone-build --units 4294967305,4294967306 -x 0:10 -y 0:10 -z 1 --item 100Clear a rectangular area:
kinswardctl zone-demolish --units 4294967305 -x -5:5 -y -5:5 -z 1Direct World Editing
Section titled “Direct World Editing”For testing or debugging, modify blocks directly (bypasses inventory):
# Set a block typekinswardctl set-block 5 5 1 40 # Stone wall
# Fill an areakinswardctl fill -x -5:5 -y -5:5 -z 0 20 # Grass floor
# Rebuild surface index after manual editskinswardctl rebuild-surfacesUnit Management
Section titled “Unit Management”Multi-Waypoint Patrol
Section titled “Multi-Waypoint Patrol”Send a unit on a patrol route through multiple waypoints:
kinswardctl unit-plan 4294967305 5,0,1 5,5,1 0,5,1 0,0,1Task Queue Workflow
Section titled “Task Queue Workflow”Create tasks and let idle units pick them up:
# Add build taskskinswardctl task-add build 10 5 1 --item 100kinswardctl task-add build 11 5 1 --item 100kinswardctl task-add build 12 5 1 --item 100
# Check task statuskinswardctl tasks --status pending
# Cancel if neededkinswardctl task-cancel-zone -x 10:12 -y 5:5 -z 1Companion Management
Section titled “Companion Management”# See who's following youkinswardctl companion-list
# Call everyone to followkinswardctl companion-call-all
# Send everyone to station (stay put)kinswardctl companion-dismiss-all
# Set individual behaviorkinswardctl companion-behavior 4294967305 stationMap Export
Section titled “Map Export”Export world data for analysis or visualization:
# Elevation as PNGkinswardctl region-map elevation --format png --path elevation.png --size 1024
# River network as ASCII artkinswardctl region-map rivers --format ascii
# Biome statisticskinswardctl region-map biome --format stats
# Temperature distributionkinswardctl region-map temperature --format png --path temp.pngScripting with JSON Mode
Section titled “Scripting with JSON Mode”Use --json for machine-readable output, perfect for scripting:
# Get player state as JSONkinswardctl --json state
# Pipe through jq for specific fieldskinswardctl --json state | jq '.data.position'
# Script a sequence of movesfor dir in north north east east; do kinswardctl --json move $dir sleep 0.5doneSpawning & Testing
Section titled “Spawning & Testing”Set up a test scenario quickly:
# Spawn units for testingkinswardctl spawn dwarf 5 5 1 --name "Builder" --faction colony --controlledkinswardctl spawn dwarf 10 5 1 --name "Scout" --faction colony
# Possess a unit to control directlykinswardctl possess 4294967305
# Release controlkinswardctl possess
# Look up block/item infokinswardctl lookup blocks stonekinswardctl lookup items wallkinswardctl registry items