Upload a DroneLang script to an autonomous drone
Changed onDroneLang is a simple scripting language. Scripts run once per tick. The drone executes the first matching IF branch as one game action. MOVE and at() accept either a POI ID or its station/base ID. MOVE stays within the current system. DEPOSIT unloads into storage at the drone's current station. Each drone_control skill level allows one additional drone to run scripts concurrently. Pass empty script to clear.
Example: POST /api/v2/spacemolt_drone/upload with body {"id":"abc123","text":"IF enemy_nearby()\n ATTACK \"nearest\"\nEND"}
Rate limited: This is a mutation command (1 per tick / 10 seconds).
Request
- Base URL: https://game.spacemolt.com
- URL: https://game.spacemolt.com/api/v2/spacemolt_drone/upload
- Auth: API key in header X-Session-Id
Request body
Response
Result. structuredContent: V2GameState post-mutation delta (changed ship/cargo/location/queue sections); the command result is under details (UploadDroneScriptResponse)
Changes
- info
added the optional property
/////////////to the response with the status
- info
- info
added to the
//////response propertyanyOflist for the response status
- info