Create entity with optional components
curl --request POST \
--url http://localhost:3917/spawn \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": 1,
"ai_patrol": [
[
123
]
],
"building_type": "<string>",
"collider": {
"hx": 123,
"hy": 123,
"hz": 123,
"shape": "Aabb"
},
"color": "<string>",
"combat": true,
"combat_cooldown": 123,
"combat_damage": 123,
"combat_range": 123,
"combat_speed": 123,
"combat_style": "<string>",
"gold": 123,
"gold_bounty": 123,
"health": 123,
"lane": "<string>",
"mesh": "<string>",
"physics_body": "<string>",
"player": true,
"position": [
123
],
"role": "<string>",
"scale": [
123
],
"spawn_point": 1,
"team": 1,
"velocity": {
"linear": [
123
],
"angular": [
123
]
},
"xp_bounty": 1
}
'import requests
url = "http://localhost:3917/spawn"
payload = {
"agent_id": 1,
"ai_patrol": [[123]],
"building_type": "<string>",
"collider": {
"hx": 123,
"hy": 123,
"hz": 123,
"shape": "Aabb"
},
"color": "<string>",
"combat": True,
"combat_cooldown": 123,
"combat_damage": 123,
"combat_range": 123,
"combat_speed": 123,
"combat_style": "<string>",
"gold": 123,
"gold_bounty": 123,
"health": 123,
"lane": "<string>",
"mesh": "<string>",
"physics_body": "<string>",
"player": True,
"position": [123],
"role": "<string>",
"scale": [123],
"spawn_point": 1,
"team": 1,
"velocity": {
"linear": [123],
"angular": [123]
},
"xp_bounty": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 1,
ai_patrol: [[123]],
building_type: '<string>',
collider: {hx: 123, hy: 123, hz: 123, shape: 'Aabb'},
color: '<string>',
combat: true,
combat_cooldown: 123,
combat_damage: 123,
combat_range: 123,
combat_speed: 123,
combat_style: '<string>',
gold: 123,
gold_bounty: 123,
health: 123,
lane: '<string>',
mesh: '<string>',
physics_body: '<string>',
player: true,
position: [123],
role: '<string>',
scale: [123],
spawn_point: 1,
team: 1,
velocity: {linear: [123], angular: [123]},
xp_bounty: 1
})
};
fetch('http://localhost:3917/spawn', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3917",
CURLOPT_URL => "http://localhost:3917/spawn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 1,
'ai_patrol' => [
[
123
]
],
'building_type' => '<string>',
'collider' => [
'hx' => 123,
'hy' => 123,
'hz' => 123,
'shape' => 'Aabb'
],
'color' => '<string>',
'combat' => true,
'combat_cooldown' => 123,
'combat_damage' => 123,
'combat_range' => 123,
'combat_speed' => 123,
'combat_style' => '<string>',
'gold' => 123,
'gold_bounty' => 123,
'health' => 123,
'lane' => '<string>',
'mesh' => '<string>',
'physics_body' => '<string>',
'player' => true,
'position' => [
123
],
'role' => '<string>',
'scale' => [
123
],
'spawn_point' => 1,
'team' => 1,
'velocity' => [
'linear' => [
123
],
'angular' => [
123
]
],
'xp_bounty' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3917/spawn"
payload := strings.NewReader("{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3917/spawn")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3917/spawn")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}"
response = http.request(request)
puts response.read_body{
"entity_generation": 0,
"entity_id": 1
}World
Create entity with optional components
POST
/
spawn
Create entity with optional components
curl --request POST \
--url http://localhost:3917/spawn \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": 1,
"ai_patrol": [
[
123
]
],
"building_type": "<string>",
"collider": {
"hx": 123,
"hy": 123,
"hz": 123,
"shape": "Aabb"
},
"color": "<string>",
"combat": true,
"combat_cooldown": 123,
"combat_damage": 123,
"combat_range": 123,
"combat_speed": 123,
"combat_style": "<string>",
"gold": 123,
"gold_bounty": 123,
"health": 123,
"lane": "<string>",
"mesh": "<string>",
"physics_body": "<string>",
"player": true,
"position": [
123
],
"role": "<string>",
"scale": [
123
],
"spawn_point": 1,
"team": 1,
"velocity": {
"linear": [
123
],
"angular": [
123
]
},
"xp_bounty": 1
}
'import requests
url = "http://localhost:3917/spawn"
payload = {
"agent_id": 1,
"ai_patrol": [[123]],
"building_type": "<string>",
"collider": {
"hx": 123,
"hy": 123,
"hz": 123,
"shape": "Aabb"
},
"color": "<string>",
"combat": True,
"combat_cooldown": 123,
"combat_damage": 123,
"combat_range": 123,
"combat_speed": 123,
"combat_style": "<string>",
"gold": 123,
"gold_bounty": 123,
"health": 123,
"lane": "<string>",
"mesh": "<string>",
"physics_body": "<string>",
"player": True,
"position": [123],
"role": "<string>",
"scale": [123],
"spawn_point": 1,
"team": 1,
"velocity": {
"linear": [123],
"angular": [123]
},
"xp_bounty": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: 1,
ai_patrol: [[123]],
building_type: '<string>',
collider: {hx: 123, hy: 123, hz: 123, shape: 'Aabb'},
color: '<string>',
combat: true,
combat_cooldown: 123,
combat_damage: 123,
combat_range: 123,
combat_speed: 123,
combat_style: '<string>',
gold: 123,
gold_bounty: 123,
health: 123,
lane: '<string>',
mesh: '<string>',
physics_body: '<string>',
player: true,
position: [123],
role: '<string>',
scale: [123],
spawn_point: 1,
team: 1,
velocity: {linear: [123], angular: [123]},
xp_bounty: 1
})
};
fetch('http://localhost:3917/spawn', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3917",
CURLOPT_URL => "http://localhost:3917/spawn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => 1,
'ai_patrol' => [
[
123
]
],
'building_type' => '<string>',
'collider' => [
'hx' => 123,
'hy' => 123,
'hz' => 123,
'shape' => 'Aabb'
],
'color' => '<string>',
'combat' => true,
'combat_cooldown' => 123,
'combat_damage' => 123,
'combat_range' => 123,
'combat_speed' => 123,
'combat_style' => '<string>',
'gold' => 123,
'gold_bounty' => 123,
'health' => 123,
'lane' => '<string>',
'mesh' => '<string>',
'physics_body' => '<string>',
'player' => true,
'position' => [
123
],
'role' => '<string>',
'scale' => [
123
],
'spawn_point' => 1,
'team' => 1,
'velocity' => [
'linear' => [
123
],
'angular' => [
123
]
],
'xp_bounty' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3917/spawn"
payload := strings.NewReader("{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3917/spawn")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3917/spawn")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": 1,\n \"ai_patrol\": [\n [\n 123\n ]\n ],\n \"building_type\": \"<string>\",\n \"collider\": {\n \"hx\": 123,\n \"hy\": 123,\n \"hz\": 123,\n \"shape\": \"Aabb\"\n },\n \"color\": \"<string>\",\n \"combat\": true,\n \"combat_cooldown\": 123,\n \"combat_damage\": 123,\n \"combat_range\": 123,\n \"combat_speed\": 123,\n \"combat_style\": \"<string>\",\n \"gold\": 123,\n \"gold_bounty\": 123,\n \"health\": 123,\n \"lane\": \"<string>\",\n \"mesh\": \"<string>\",\n \"physics_body\": \"<string>\",\n \"player\": true,\n \"position\": [\n 123\n ],\n \"role\": \"<string>\",\n \"scale\": [\n 123\n ],\n \"spawn_point\": 1,\n \"team\": 1,\n \"velocity\": {\n \"linear\": [\n 123\n ],\n \"angular\": [\n 123\n ]\n },\n \"xp_bounty\": 1\n}"
response = http.request(request)
puts response.read_body{
"entity_generation": 0,
"entity_id": 1
}Body
application/json
Required range:
x >= 0AI patrol waypoints as colon-separated "x,y,z:x,y,z"
Building type (e.g. "tier1_tower", "melee_barracks", "ancient"). When set, attaches BuildingStats, BackdoorProtection, and TowerAggro.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
"melee" (default) or "stationary" (towers)
Starting gold
Gold bounty awarded to killer
Lane assignment for buildings: "top", "mid", or "bot".
Mark this entity as the player-controlled hero
Entity role: hero, minion, tower, structure
Spawn point for team (marks this entity as a respawn location)
Required range:
x >= 0Required range:
x >= 0Show child attributes
Show child attributes
XP bounty awarded to killer
Required range:
x >= 0⌘I