For now, we're only caring about the slaved mode, as it's a lot more work to implement dedicated mode and might not be necessary until we get a lot more players. Dedicated mode might not be ever realized.
All commands that are currenty defined are for the slaved mode of operation, there is nothing in place for dedicated one.
Communication from players goes directly to the autohost.
- Lightens the load on the Tachyon server and makes scaling easier
- Improved latency for players as messages don't need to be sent through a middleman server
- Players in existing battles can keep playing games there even if the Tachyon server goes down
- Tachyon server becomes unaware of activity taking place in battles directly, meaning any additional desired functionality such as telemetry or message logging would need to be implemented separately
The Tachyon server acts as a middleman to broker messages between players and the autohost.
- The Tachyon server effectively has full control over the autohost, making it possible to interject communications which could be useful for various reasons
- The autohost's implementation has the potential to be much simpler, as the Tachyon server could handle all the pre-game communications and only interface with the autohost when launching the game and putting it in touch with the players
- The Tachyon server has to do more heavy lifting for custom games, where lots of comms can take place before the game begins
- Increased Tachyon server load/bandwidth
- If the Tachyon server goes down, all the existing lobbies (pre-game battles) will also go down
Autohosts used for matchmaking should use the slaved mode as no pregame communication between players and the autohost is required. The Tachyon server can dictate the battle's settings, start new game on autohost with those parameters and send connetion details to players.
Autohosts used for custom games should use the dedicated mode as lots of pregame communication can take place.
- addPlayer
- installEngine
- kickPlayer
- kill
- mutePlayer
- sendCommand
- sendMessage
- specPlayers
- start
- status
- subscribeUpdates
- update
Request to add a new player to the battle.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostAddPlayerRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/addPlayer" },
"data": {
"title": "AutohostAddPlayerRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"userId": { "$ref": "../../definitions/userId.json" },
"name": { "type": "string" },
"password": { "type": "string" }
},
"required": ["battleId", "userId", "name", "password"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "do labore velit",
"commandId": "autohost/addPlayer",
"data": {
"battleId": "66b4294f-6a36-98b4-80ab-ba20c5a9b023",
"userId": "351",
"name": "ad",
"password": "in dolore qui reprehenderit occaecat"
}
}
export type UserId = string;
export interface AutohostAddPlayerRequest {
type: "request";
messageId: string;
commandId: "autohost/addPlayer";
data: AutohostAddPlayerRequestData;
}
export interface AutohostAddPlayerRequestData {
battleId: string;
userId: UserId;
name: string;
password: string;
}
JSONSchema
{
"title": "AutohostAddPlayerResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostAddPlayerOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/addPlayer" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostAddPlayerFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/addPlayer" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "eiusmod cupidatat id in exercitation",
"commandId": "autohost/addPlayer",
"status": "success"
}
export interface AutohostAddPlayerOkResponse {
type: "response";
messageId: string;
commandId: "autohost/addPlayer";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Ask the autohost to install specified engine version.
Return success instantly and autohost triggers the installation of the engine in background. It's fine to call this method repeatedly and autohost must deduplicate requests internally. When new engine is installed autohost send a status
event with the new available engine versions.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostInstallEngineRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/installEngine" },
"data": {
"title": "AutohostInstallEngineRequestData",
"type": "object",
"properties": {
"version": {
"description": "Version of the engine to install",
"type": "string"
}
},
"required": ["version"],
"examples": [{ "version": "2025.01.5" }]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "sunt anim elit fugiat esse",
"commandId": "autohost/installEngine",
"data": {
"version": "2025.01.5"
}
}
export interface AutohostInstallEngineRequest {
type: "request";
messageId: string;
commandId: "autohost/installEngine";
data: AutohostInstallEngineRequestData;
}
export interface AutohostInstallEngineRequestData {
version: string;
}
JSONSchema
{
"title": "AutohostInstallEngineResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostInstallEngineOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/installEngine" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostInstallEngineFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/installEngine" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "nostrud sit nisi voluptate",
"commandId": "autohost/installEngine",
"status": "success"
}
export interface AutohostInstallEngineOkResponse {
type: "response";
messageId: string;
commandId: "autohost/installEngine";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Kick a player from a battle.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostKickPlayerRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kickPlayer" },
"data": {
"title": "AutohostKickPlayerRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"userId": { "$ref": "../../definitions/userId.json" }
},
"required": ["battleId", "userId"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "Ut pariatur",
"commandId": "autohost/kickPlayer",
"data": {
"battleId": "853c948a-5bbb-4c62-508a-3dfd7d9e6547",
"userId": "351"
}
}
export type UserId = string;
export interface AutohostKickPlayerRequest {
type: "request";
messageId: string;
commandId: "autohost/kickPlayer";
data: AutohostKickPlayerRequestData;
}
export interface AutohostKickPlayerRequestData {
battleId: string;
userId: UserId;
}
JSONSchema
{
"title": "AutohostKickPlayerResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostKickPlayerOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kickPlayer" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostKickPlayerFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kickPlayer" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "fugiat ullamco occaecat Duis incididunt",
"commandId": "autohost/kickPlayer",
"status": "success"
}
export interface AutohostKickPlayerOkResponse {
type: "response";
messageId: string;
commandId: "autohost/kickPlayer";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Request to kill a battle.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostKillRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kill" },
"data": {
"title": "AutohostKillRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" }
},
"required": ["battleId"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "anim minim pariatur",
"commandId": "autohost/kill",
"data": {
"battleId": "68723178-2619-268c-de89-096ee25b0864"
}
}
export interface AutohostKillRequest {
type: "request";
messageId: string;
commandId: "autohost/kill";
data: AutohostKillRequestData;
}
export interface AutohostKillRequestData {
battleId: string;
}
JSONSchema
{
"title": "AutohostKillResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostKillOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kill" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostKillFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/kill" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "sunt ad aute qui",
"commandId": "autohost/kill",
"status": "success"
}
export interface AutohostKillOkResponse {
type: "response";
messageId: string;
commandId: "autohost/kill";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Mute a player in a battle.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostMutePlayerRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/mutePlayer" },
"data": {
"title": "AutohostMutePlayerRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"userId": { "$ref": "../../definitions/userId.json" },
"chat": { "type": "boolean" },
"draw": { "type": "boolean" }
},
"required": ["battleId", "userId", "chat", "draw"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "anim veniam esse",
"commandId": "autohost/mutePlayer",
"data": {
"battleId": "e9590648-b5c8-38f2-f397-9c90e64e46d2",
"userId": "351",
"chat": true,
"draw": false
}
}
export type UserId = string;
export interface AutohostMutePlayerRequest {
type: "request";
messageId: string;
commandId: "autohost/mutePlayer";
data: AutohostMutePlayerRequestData;
}
export interface AutohostMutePlayerRequestData {
battleId: string;
userId: UserId;
chat: boolean;
draw: boolean;
}
JSONSchema
{
"title": "AutohostMutePlayerResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostMutePlayerOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/mutePlayer" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostMutePlayerFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/mutePlayer" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "velit eu enim fugiat incididunt",
"commandId": "autohost/mutePlayer",
"status": "success"
}
export interface AutohostMutePlayerOkResponse {
type: "response";
messageId: string;
commandId: "autohost/mutePlayer";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Send a custom command for the autohost to execute.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostSendCommandRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendCommand" },
"data": {
"title": "AutohostSendCommandRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"command": { "type": "string" },
"arguments": { "type": "array", "items": { "type": "string" } }
},
"required": ["battleId", "command"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "laborum",
"commandId": "autohost/sendCommand",
"data": {
"battleId": "4052d53f-ba69-5da2-1e06-4b945a61e4e4",
"command": "in mollit",
"arguments": [
"tempor amet proident",
"officia ad nisi culpa"
]
}
}
export interface AutohostSendCommandRequest {
type: "request";
messageId: string;
commandId: "autohost/sendCommand";
data: AutohostSendCommandRequestData;
}
export interface AutohostSendCommandRequestData {
battleId: string;
command: string;
arguments?: string[];
}
JSONSchema
{
"title": "AutohostSendCommandResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostSendCommandOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendCommand" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostSendCommandFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendCommand" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "est dolor",
"commandId": "autohost/sendCommand",
"status": "success"
}
export interface AutohostSendCommandOkResponse {
type: "response";
messageId: string;
commandId: "autohost/sendCommand";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Send a message for the autohost to display to players.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostSendMessageRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendMessage" },
"data": {
"title": "AutohostSendMessageRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"message": { "type": "string", "maxLength": 127 }
},
"required": ["battleId", "message"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "reprehenderit sed",
"commandId": "autohost/sendMessage",
"data": {
"battleId": "4a26eb99-158d-cea3-c275-f8d512dfbc5d",
"message": "occaecat dolore"
}
}
export interface AutohostSendMessageRequest {
type: "request";
messageId: string;
commandId: "autohost/sendMessage";
data: AutohostSendMessageRequestData;
}
export interface AutohostSendMessageRequestData {
battleId: string;
message: string;
}
JSONSchema
{
"title": "AutohostSendMessageResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostSendMessageOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendMessage" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostSendMessageFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/sendMessage" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "aute",
"commandId": "autohost/sendMessage",
"status": "success"
}
export interface AutohostSendMessageOkResponse {
type: "response";
messageId: string;
commandId: "autohost/sendMessage";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Force players to become spectators in a battle.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostSpecPlayersRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/specPlayers" },
"data": {
"title": "AutohostSpecPlayersRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"userIds": {
"type": "array",
"items": { "$ref": "../../definitions/userId.json" }
}
},
"required": ["battleId", "userIds"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "sed",
"commandId": "autohost/specPlayers",
"data": {
"battleId": "99a1a151-6db0-fc47-7473-2a67cd624a94",
"userIds": [
"351",
"351",
"351",
"351"
]
}
}
export type UserId = string;
export interface AutohostSpecPlayersRequest {
type: "request";
messageId: string;
commandId: "autohost/specPlayers";
data: AutohostSpecPlayersRequestData;
}
export interface AutohostSpecPlayersRequestData {
battleId: string;
userIds: UserId[];
}
JSONSchema
{
"title": "AutohostSpecPlayersResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostSpecPlayersOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/specPlayers" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostSpecPlayersFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/specPlayers" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "Lorem labore enim deserunt",
"commandId": "autohost/specPlayers",
"status": "success"
}
export interface AutohostSpecPlayersOkResponse {
type: "response";
messageId: string;
commandId: "autohost/specPlayers";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Tell the autohost client to launch the game server (spring-dedicated.exe or spring-headless.exe) with the given script data.
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostStartRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/start" },
"data": {
"title": "AutohostStartRequestData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"engineVersion": {
"type": "string",
"pattern": "^[0-9a-zA-Z .+-]+$"
},
"gameName": { "type": "string" },
"mapName": { "type": "string" },
"gameArchiveHash": {
"type": "string",
"pattern": "^[a-fA-F0-9]{128}$"
},
"mapArchiveHash": {
"type": "string",
"pattern": "^[a-fA-F0-9]{128}$"
},
"startDelay": { "type": "integer" },
"startPosType": {
"$ref": "../../definitions/startPosType.json"
},
"allyTeams": {
"type": "array",
"items": { "$ref": "../../definitions/allyTeam.json" },
"minItems": 1
},
"spectators": {
"type": "array",
"items": { "$ref": "../../definitions/player.json" }
},
"mapOptions": {
"type": "object",
"patternProperties": { "^(.*)$": { "type": "string" } }
},
"gameOptions": {
"type": "object",
"patternProperties": { "^(.*)$": { "type": "string" } }
},
"restrictions": {
"description": "Mapping from unitDefId to the maximum number of units of that type that can be built.",
"type": "object",
"patternProperties": {
"^(.*)$": { "type": "integer", "minimum": 0 }
}
},
"luamsgRegexp": {
"description": "When set, battle will generate updates for luamsgs matching this regexp. No updates will be generated if this is not set.",
"type": "string",
"format": "regex"
}
},
"required": [
"battleId",
"engineVersion",
"gameName",
"mapName",
"startPosType",
"allyTeams"
]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "sint ex non",
"commandId": "autohost/start",
"data": {
"battleId": "4c9e363d-e213-f8ec-b003-30375e86dcd7",
"engineVersion": "C730C",
"gameName": "cupidatat esse veniam",
"mapName": "aliquip est in",
"startDelay": -36461103,
"startPosType": "ingame",
"allyTeams": [
{
"teams": [
{
"players": [
{
"userId": "351",
"name": "reprehenderit minim",
"password": "dolore irure et esse",
"customProperties": {
"4": "reprehenderit fugiat",
"n": "voluptate",
"Z": "cupidatat",
"N": "elit Duis Ut officia ut",
"t": "Lorem aliquip",
"U": "sit eiusmod ullamco"
}
},
{
"userId": "351",
"name": "magna irure",
"password": "veniam dolore",
"rank": -67761314,
"countryCode": "ut in do culpa nulla",
"customProperties": {
"Y": "laborum Excepteur Lorem"
}
},
{
"userId": "351",
"name": "id sint",
"password": "ut esse ad cillum",
"rank": -19214559,
"countryCode": "qui do",
"customProperties": {
"_": "minim ipsum Duis",
"n": "ea laborum"
}
}
],
"bots": [
{
"hostUserId": "cupidatat eiusmod",
"name": "exercitation labore eu",
"aiShortName": "voluptate dolor in",
"aiVersion": "ex",
"aiOptions": {
"/ohW(_{w:": "sunt fugiat Lorem voluptate culpa",
"`z@36~": "commodo eiusmod in aute",
"VIx7-v": "laboris do pariatur cillum incididunt"
}
},
{
"hostUserId": "aute ad",
"name": "enim dolore eu fugiat",
"aiShortName": "eiusmod voluptate do dolore",
"aiVersion": "Excepteur laboris Duis est culpa",
"aiOptions": {
"+ kk?SRD": "et occaecat anim",
"KUx<": "amet reprehenderit occaecat esse aliquip",
"3<s4": "et"
}
},
{
"hostUserId": "fugiat amet",
"name": "in do",
"aiShortName": "nisi esse culpa dolor eiusmod",
"aiVersion": "dolore",
"aiOptions": {
"bp;&@-@": "anim laboris sed dolor Ut",
"nss": "est laborum irure"
}
}
],
"advantage": 39557664.98204821,
"incomeMultiplier": 18846505.880355835,
"faction": "enim cupidatat eiusmod esse dolor",
"color": {
"r": 0.1857980489730835,
"g": 0.9600865244865417,
"b": 0.15730077028274536
},
"startPos": {
"x": -38528812,
"y": -80078137
},
"customProperties": {
"0": "laboris aliquip",
"f": "dolor ex sint nostrud",
"E": "proident et in",
"h": "sunt deserunt"
}
},
{
"id_2_": "veniam proident et ut sunt",
"quisac6": 31801831.72225952,
"cupidatat16": -73619164,
"adipisicing_f": -37121511,
"nisi_0a": 21601104.736328125,
"sint58": false,
"nulla_b_5": "consectetur exercitation consequat veniam elit",
"color": {
"r": 0.8618061542510986,
"g": 0.48149800300598145,
"b": 0.6771940588951111
}
},
{
"ut7": "Ut eu anim aute",
"nulla_f": 53509163,
"laboris_d_": "occaecat",
"dolorb": -32809628,
"pariatur_8c": 95217943.19152832,
"players": [
{
"userId": "351",
"name": "consectetur eu ullamco",
"password": "nisi est veniam mollit enim",
"rank": -30312812,
"countryCode": "minim in anim",
"customProperties": {
"9": "officia sint in ut aliqua",
"g": "ut anim Lorem nisi"
}
},
{
"userId": "351",
"name": "dolore",
"password": "tempor",
"rank": 82050717,
"countryCode": "aliquip Ut",
"customProperties": {
"x": "Ut",
"b": "cillum sit"
}
},
{
"userId": "351",
"name": "in",
"password": "pariatur",
"rank": 87109912,
"countryCode": "laborum officia dolore",
"customProperties": {
"6": "reprehenderit irure et Ut",
"c": "nisi eiusmod eu"
}
},
{
"userId": "351",
"name": "do magna amet",
"password": "fugiat nulla eiusmod qui",
"rank": 70592451,
"countryCode": "nisi adipisicing amet labore culpa",
"customProperties": {
"g": "laboris reprehenderit",
"E": "aute"
}
}
],
"bots": [
{
"hostUserId": "consequat cupidatat do sit laboris",
"aiShortName": "laborum labore",
"aiOptions": {
"?S1jy": "Lorem Duis amet esse",
"~o#M1": "in",
"hDfN-P": "deserunt dolor ex",
"MGYubH": "labore sunt enim Duis dolore",
"vmt5g`fCG": "sit magna"
}
},
{
"hostUserId": "irure eu culpa",
"aiShortName": "magna"
},
{
"hostUserId": "culpa ex sit amet dolor",
"name": "proident consectetur",
"aiShortName": "ex qui Lorem esse",
"aiVersion": "dolore consectetur proident"
}
],
"advantage": 69283157.27988297,
"incomeMultiplier": 21404522.65739441,
"faction": "laboris",
"color": {
"r": 0.10230374336242676,
"g": 0.07018321752548218,
"b": 0.42608678340911865
},
"startPos": {
"x": -88824070,
"y": 1119220
},
"customProperties": {
"I": "veniam sed"
}
},
{
"players": [
{
"userId": "351",
"name": "quis",
"password": "est nisi",
"rank": -98817730,
"countryCode": "laboris",
"customProperties": {
"n": "et in"
}
},
{
"userId": "351",
"name": "culpa reprehenderit incididunt non nostrud",
"password": "ad",
"rank": 49097419,
"countryCode": "sint ex",
"customProperties": {
"F": "consequat dolore fugiat",
"s": "Ut",
"j": "dolore officia veniam ut"
}
},
{
"userId": "351",
"name": "qui laboris officia",
"password": "Ut",
"rank": 99209929,
"countryCode": "incididunt aute dolore",
"customProperties": {
"6": "deserunt sit culpa in"
}
},
{
"userId": "351",
"name": "incididunt eiusmod fugiat",
"password": "commodo veniam velit Duis",
"rank": 89086271,
"countryCode": "aute ut eu occaecat minim",
"customProperties": {
"M": "qui in fugiat",
"e": "minim Duis veniam pariatur",
"H": "nostrud Ut officia deserunt proident"
}
},
{
"userId": "351",
"name": "velit",
"password": "minim labore Lorem est in",
"rank": 40837670
}
],
"bots": [
{
"hostUserId": "ullamco commodo",
"name": "ea magna Duis",
"aiShortName": "sit",
"aiVersion": "Excepteur",
"aiOptions": {
".m": "cillum amet in dolore",
"HJ": "nisi in esse voluptate"
}
},
{
"hostUserId": "nisi sit",
"aiShortName": "aliquip",
"aiVersion": "enim nisi culpa aliqua"
},
{
"hostUserId": "cillum culpa aute deserunt",
"name": "voluptate eu culpa Ut",
"aiShortName": "incididunt laborum occaecat in",
"aiVersion": "sunt",
"aiOptions": {
"e": "nostrud amet aliquip occaecat pariatur"
}
},
{
"hostUserId": "adipisicing Excepteur est",
"name": "laboris",
"aiShortName": "in ea dolor ipsum",
"aiVersion": "est laboris cupidatat veniam",
"aiOptions": {
"sp1#XpT": "adipisicing magna dolor",
"": "commodo nisi",
"tYS!B||(,#": "laborum",
"\\Z>": "in"
}
}
],
"advantage": 14583509.306281269,
"incomeMultiplier": 65013319.25392151,
"faction": "sit aute",
"color": {
"r": 0.6819614768028259,
"g": 0.017740190029144287,
"b": 0.99942547082901
},
"startPos": {
"x": 38605774,
"y": 48749352
},
"customProperties": {
"I": "occaecat nostrud anim officia qui",
"d": "consequat dolore in",
"z": "qui voluptate magna",
"G": "sit exercitation in"
}
}
],
"startBox": {
"top": 0.17292773723602295,
"bottom": 0.3749868869781494,
"left": 0.12072700262069702,
"right": 0.9179433584213257
},
"allies": [
-3430438,
-87824357,
-65787483,
-85680569
],
"customProperties": {
"e": "ullamco pariatur officia",
"n": "ut in sit",
"f": "sed ex quis"
}
},
{
"teams": [
{
"aliquip5e2": -13786101.341247559,
"cupidatat0": false,
"minim_2": -7788157.4630737305,
"dolor501": -60026086,
"esse_df": -88536561,
"players": [
{
"userId": "351",
"name": "commodo consectetur dolore est reprehenderit",
"password": "Lorem nostrud",
"rank": 21764374,
"countryCode": "ex voluptate",
"customProperties": {
"L": "pariatur",
"G": "est do occaecat laborum dolor",
"h": "officia cupidatat consectetur dolor"
}
},
{
"userId": "351",
"name": "incididunt in aute sint esse",
"password": "consectetur in esse",
"rank": 24974001,
"countryCode": "Excepteur dolor",
"customProperties": {
"1": "deserunt exercitation adipisicing sit",
"N": "cillum sit officia irure eu",
"c": "sit Lorem ipsum",
"b": "deserunt ad irure",
"m": "dolore in minim officia magna",
"Z": "in sint sit"
}
},
{
"userId": "351",
"name": "tempor Ut mollit amet",
"password": "sunt Excepteur",
"customProperties": {
"8": "ea Ut consectetur dolor ipsum",
"C": "exercitation occaecat",
"p": "ex",
"o": "exercitation laborum cillum Lorem aliqua"
}
},
{
"userId": "351",
"name": "elit nostrud nisi consectetur",
"password": "consectetur",
"rank": 89644635,
"countryCode": "sint dolore do",
"customProperties": {
"6": "consectetur Excepteur",
"I": "nostrud exercitation sed minim nulla"
}
},
{
"userId": "351",
"name": "magna",
"password": "nostrud in minim dolor eiusmod",
"rank": -36712468,
"countryCode": "culpa et incididunt in",
"customProperties": {
"h": "laborum aliquip",
"B": "consectetur occaecat"
}
}
],
"advantage": 66589510.10672152,
"startPos": {
"x": 73716069,
"y": -66043711
},
"customProperties": {
"6": "velit in in",
"S": "anim dolor enim et",
"q": "dolor",
"p": "officia in ut amet"
}
},
{
"players": [
{
"userId": "351",
"name": "minim fugiat sit",
"password": "amet",
"rank": -19001782,
"countryCode": "voluptate cupidatat pariatur exercitation",
"customProperties": {
"Z": "nisi",
"R": "esse veniam occaecat"
}
},
{
"userId": "351",
"name": "fugiat",
"password": "proident quis incididunt eiusmod",
"rank": 26650262,
"countryCode": "aute officia dolor mollit irure",
"customProperties": {
"j": "cupidatat minim occaecat in",
"K": "in"
}
}
],
"advantage": 39534341.68431437,
"incomeMultiplier": 48139637.70866394,
"faction": "mollit amet non officia",
"color": {
"r": 0.2075824737548828,
"g": 0.5882518887519836,
"b": 0.5465092658996582
},
"startPos": {
"x": -66247368,
"y": 44942188
},
"customProperties": {
"8": "laboris ut consectetur",
"u": "voluptate anim pariatur qui",
"c": "est"
}
},
{
"players": [
{
"userId": "351",
"name": "irure ex dolore enim",
"password": "minim incididunt"
},
{
"userId": "351",
"name": "et amet dolore",
"password": "elit aliquip eu eiusmod",
"rank": -64600671,
"countryCode": "velit fugiat",
"customProperties": {
"z": "in",
"c": "deserunt et officia exercitation"
}
},
{
"userId": "351",
"name": "cillum eu quis",
"password": "nulla voluptate dolor"
}
],
"bots": [
{
"hostUserId": "velit est Lorem nisi",
"name": "deserunt",
"aiShortName": "ad in",
"aiVersion": "fugiat",
"aiOptions": {
">m$b!8H": "consequat aliquip incididunt",
"k(:": "ullamco fugiat exercitation aute",
"!w": "aliqua Excepteur Lorem",
"/he&wBRDcI": "ex eu minim enim commodo",
"}x`}'&$&EN": "Excepteur"
}
}
],
"advantage": 62574874.9805156,
"incomeMultiplier": 37332195.04356384,
"faction": "aliqua aute quis Ut",
"color": {
"r": 0.5740784406661987,
"g": 0.6380656361579895,
"b": 0.1813904047012329
},
"startPos": {
"x": 13698852,
"y": 90059543
},
"customProperties": {
"c": "dolore non cillum magna ipsum",
"V": "pariatur aute ut ut veniam"
}
},
{
"dolore73": true,
"consecteturf": 87244534.49249268,
"in1d": false,
"magna_506": 89318203,
"magnae46": -15695714.950561523,
"et_284": -62774586.67755127,
"qui8d8": "Excepteur in nisi nulla",
"proident0": "officia voluptate Ut occaecat sed"
}
],
"startBox": {
"top": 0.07877606153488159,
"bottom": 0.3487258553504944,
"left": 0.33356642723083496,
"right": 0.760676383972168
},
"allies": [
64502085
],
"customProperties": {
"0": "ex proident laborum do ad",
"1": "aute reprehenderit nisi ut fugiat",
"4": "nostrud do dolor dolor reprehenderit",
"B": "proident aliqua dolor consectetur",
"a": "ullamco quis",
"g": "ipsum minim magna"
}
},
{
"teams": [
{
"players": [
{
"userId": "351",
"name": "nostrud consequat",
"password": "sint anim laboris",
"rank": 71335328,
"countryCode": "aliquip culpa",
"customProperties": {
"i": "in",
"C": "tempor ex exercitation qui quis"
}
},
{
"userId": "351",
"name": "in deserunt Duis minim",
"password": "ut aute sint quis mollit",
"countryCode": "Lorem do",
"customProperties": {
"3": "id voluptate consectetur sint",
"7": "aliqua ut",
"U": "labore sunt"
}
},
{
"userId": "351",
"name": "sunt ipsum",
"password": "sed occaecat",
"rank": -10847402,
"countryCode": "Ut esse et",
"customProperties": {
"n": "est",
"P": "ipsum ullamco labore",
"z": "irure laborum eu sunt anim"
}
},
{
"userId": "351",
"name": "id officia",
"password": "laborum nulla"
},
{
"userId": "351",
"name": "sint deserunt ea magna",
"password": "ex id sed Duis"
}
],
"incomeMultiplier": 19990020.990371704,
"faction": "in Excepteur labore",
"color": {
"r": 0.4336785078048706,
"g": 0.1439773440361023,
"b": 0.23232990503311157
},
"startPos": {
"x": -76871908,
"y": 89035118
}
},
{
"ea1b": 96675086.02142334,
"sed9_": -55605186,
"adipisicing65": -43033302,
"mollit_83": "ipsum nostrud incididunt",
"anim_b6": 59163582,
"players": [
{
"userId": "351",
"name": "veniam cillum",
"password": "sint labore esse",
"rank": -77526176,
"countryCode": "commodo",
"customProperties": {
"F": "deserunt nostrud",
"-": "Duis consequat sint enim in"
}
},
{
"userId": "351",
"name": "et nulla dolore nisi ut",
"password": "deserunt voluptate cillum",
"rank": 68125809,
"countryCode": "qui quis nisi id eiusmod",
"customProperties": {
"H": "ex ipsum officia labore proident",
"S": "quis"
}
},
{
"userId": "351",
"name": "elit enim velit",
"password": "dolor pariatur fugiat",
"customProperties": {
"6": "deserunt velit",
"t": "sit magna Duis"
}
},
{
"userId": "351",
"name": "pariatur",
"password": "eu velit cupidatat qui in",
"rank": -24043357,
"countryCode": "dolore nisi pariatur do",
"customProperties": {
"T": "cupidatat aute pariatur fugiat",
"X": "aliquip sint",
"e": "ad in eu nulla pariatur"
}
}
],
"bots": [
{
"hostUserId": "sunt dolor",
"name": "eiusmod consectetur cillum",
"aiShortName": "aliqua dolor aliquip irure",
"aiVersion": "irure",
"aiOptions": {
"D": "fugiat aliquip laborum"
}
}
],
"advantage": 62427651.50644815,
"incomeMultiplier": 7656878.232955933,
"faction": "eiusmod in non",
"color": {
"r": 0.1042788028717041,
"g": 0.6624365448951721,
"b": 0.7217234373092651
},
"startPos": {
"x": 18630278,
"y": -51237047
},
"customProperties": {
"0": "consequat labore in eu",
"5": "fugiat nulla cillum esse aute",
"6": "sint quis veniam pariatur consequat",
"m": "elit Excepteur et",
"X": "sed minim"
}
},
{
"ut3": "incididunt aute eu mollit ea",
"veniama": -86705660.82000732,
"occaecat164": true,
"aute089": 83856511,
"minim_ab1": "pariatur sunt ullamco",
"exercitation83": true,
"essedf": false,
"et_b": 98816454,
"consectetur_1_c": "aliqua enim ullamco",
"faction": "ipsum id Ut",
"color": {
"r": 0.8473183512687683,
"g": 0.35496950149536133,
"b": 0.6534334421157837
}
},
{
"bots": [
{
"hostUserId": "Duis",
"aiShortName": "est pariatur anim incididunt dolor"
},
{
"hostUserId": "laboris aliqua",
"name": "ad exercitation",
"aiShortName": "veniam dolor occaecat",
"aiOptions": {
"o}": "eiusmod exercitation",
"G~L_i": "voluptate magna"
}
}
],
"advantage": 15368025.648660123,
"incomeMultiplier": 64632290.60173035,
"color": {
"r": 0.36387425661087036,
"g": 0.2606208324432373,
"b": 0.6198468804359436
}
},
{
"players": [
{
"userId": "351",
"name": "amet",
"password": "ea cupidatat"
},
{
"userId": "351",
"name": "labore",
"password": "est Duis",
"rank": -68919981,
"countryCode": "qui et fugiat labore sunt",
"customProperties": {
"1": "ex",
"-": "non officia",
"u": "laborum commodo amet",
"V": "incididunt ullamco"
}
},
{
"userId": "351",
"name": "enim minim sed nisi",
"password": "sed",
"rank": -69505215,
"countryCode": "sit qui laboris in",
"customProperties": {
"w": "in proident Excepteur veniam"
}
},
{
"userId": "351",
"name": "culpa incididunt reprehenderit aliqua sint",
"password": "sint aliquip incididunt aute",
"rank": -36600208,
"countryCode": "pariatur ea",
"customProperties": {
"2": "culpa id dolore",
"5": "Duis ullamco cillum",
"N": "sed",
"k": "officia consectetur cupidatat",
"L": "est",
"K": "amet anim id est"
}
}
],
"bots": [
{
"hostUserId": "deserunt in dolor pariatur do",
"name": "occaecat nostrud in",
"aiShortName": "pariatur",
"aiVersion": "dolor aute irure",
"aiOptions": {
"jELa<cE2": "ut elit",
"jE": "velit culpa fugiat",
"(s'yUeX[": "in in",
"gcD": "dolor veniam Ut pariatur"
}
},
{
"hostUserId": "ea exercitation nostrud quis",
"name": "nulla",
"aiShortName": "ea ipsum nostrud",
"aiVersion": "nostrud fugiat consectetur elit adipisicing",
"aiOptions": {
"Qs$\\]jWDG": "nulla tempor ea adipisicing",
"|k`$W(": "non velit"
}
},
{
"hostUserId": "officia incididunt",
"name": "fugiat",
"aiShortName": "enim labore non voluptate",
"aiVersion": "consectetur dolor eiusmod ad id",
"aiOptions": {
">o#h5": "ex",
"o>$bU0\"": "pariatur dolor commodo ipsum",
"(T": "aute qui dolor nulla commodo"
}
}
],
"advantage": 58186649.858050585,
"incomeMultiplier": 48607748.74687195,
"faction": "minim adipisicing culpa qui",
"color": {
"r": 0.5383103489875793,
"g": 0.7945767641067505,
"b": 0.9743609428405762
},
"startPos": {
"x": -90061009,
"y": 96826220
},
"customProperties": {
"H": "pariatur nisi fugiat id"
}
}
],
"startBox": {
"top": 0.7478622794151306,
"bottom": 0.7949627041816711,
"left": 0.6734796762466431,
"right": 0.4724380373954773
},
"allies": [
-93428088,
9524250,
-10267675,
-54131365
]
},
{
"teams": [
{
"id_b": "sit pariatur fugiat sed ut",
"ullamco9d": -98720633.98361206,
"magnab": -30369782.44781494,
"minim_d3c": -78744329,
"minim_5": "dolore id exercitation et",
"ut_26": false,
"cillum_54e": true,
"eiusmod_8": 70761799.8123169,
"bots": [
{
"hostUserId": "occaecat sunt ut cupidatat",
"name": "dolore deserunt laboris commodo",
"aiShortName": "laboris eiusmod magna",
"aiVersion": "fugiat commodo",
"aiOptions": {
"T": "elit laborum",
"": "aute labore",
".=. ": "in est"
}
},
{
"hostUserId": "labore ad incididunt ut",
"aiShortName": "est",
"aiVersion": "enim exercitation in nulla elit"
},
{
"hostUserId": "ut ad esse",
"name": "veniam irure",
"aiShortName": "deserunt incididunt velit cillum ut",
"aiVersion": "ea ipsum enim velit Excepteur",
"aiOptions": {
"`km;0 ": "nisi pariatur tempor Duis dolor",
"m|u ": "nisi culpa ut incididunt laborum"
}
}
]
}
],
"startBox": {
"top": 0.6006492376327515,
"bottom": 0.48911792039871216,
"left": 0.9773411154747009,
"right": 0.3548881411552429
},
"allies": [
-26628018,
-39395535,
11950791
],
"customProperties": {
"8": "ea deserunt",
"9": "laborum",
"g": "velit elit tempor eu commodo",
"m": "qui exercitation officia"
}
}
],
"spectators": [
{
"userId": {},
"name": "sit Duis",
"password": "minim Ut",
"rank": -73711968,
"countryCode": "sint"
},
{
"userId": {},
"name": "culpa enim Ut laboris",
"password": "nulla",
"rank": -23393989,
"countryCode": "proident Duis est ipsum"
},
{
"userId": {},
"name": "consequat",
"password": "tempor ut exercitation",
"rank": -33732951,
"countryCode": "commodo elit"
}
],
"gameOptions": {
"?DK{\"#I": "do consectetur",
"z%:": "aliquip nisi consequat ullamco",
"": "sint in",
"PG?egap}": "consectetur do"
},
"restrictions": {
"tFprn\"H": 19815570,
"U9fJ~[g": 94585121,
"IR": 64483953
},
"luamsgRegexp": ".+?"
}
}
export type StartPosType = "fixed" | "random" | "ingame" | "beforegame";
export type UserId = string;
export interface AutohostStartRequest {
type: "request";
messageId: string;
commandId: "autohost/start";
data: AutohostStartRequestData;
}
export interface AutohostStartRequestData {
battleId: string;
engineVersion: string;
gameName: string;
mapName: string;
gameArchiveHash?: string;
mapArchiveHash?: string;
startDelay?: number;
startPosType: StartPosType;
allyTeams: [AllyTeam, ...AllyTeam[]];
spectators?: Player[];
mapOptions?: {
[k: string]: string;
};
gameOptions?: {
[k: string]: string;
};
restrictions?: {
[k: string]: number;
};
luamsgRegexp?: string;
}
export interface AllyTeam {
teams: [Team, ...Team[]];
startBox?: StartBox;
allies?: number[];
customProperties?: CustomStartScriptProperties;
}
export interface Team {
players?: Player[];
bots?: Bot[];
advantage?: number;
incomeMultiplier?: number;
faction?: string;
color?: {
r: number;
g: number;
b: number;
};
startPos?: {
x: number;
y: number;
};
customProperties?: CustomStartScriptProperties;
}
export interface Player {
userId: UserId;
name: string;
password: string;
rank?: number;
countryCode?: string;
customProperties?: CustomStartScriptProperties;
}
export interface CustomStartScriptProperties {
[k: string]: string;
}
export interface Bot {
hostUserId: string;
name?: string;
aiShortName: string;
aiVersion?: string;
aiOptions?: {
[k: string]: string;
};
customProperties?: CustomStartScriptProperties;
}
export interface StartBox {
top: number;
bottom: number;
left: number;
right: number;
}
JSONSchema
{
"title": "AutohostStartResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostStartOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/start" },
"status": { "const": "success" },
"data": {
"title": "AutohostStartOkResponseData",
"type": "object",
"properties": {
"ips": {
"type": "array",
"items": {
"anyOf": [
{ "type": "string", "format": "ipv4" },
{ "type": "string", "format": "ipv6" }
]
}
},
"port": {
"type": "integer",
"minimum": 1024,
"maximum": 65535
}
},
"required": ["ips", "port"]
}
},
"required": ["type", "messageId", "commandId", "status", "data"]
},
{
"title": "AutohostStartFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/start" },
"status": { "const": "failed" },
"reason": {
"enum": [
"battle_already_exists",
"engine_version_not_available",
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "reprehenderit est",
"commandId": "autohost/start",
"status": "success",
"data": {
"ips": [
"630b:441f:8318:e63b:bc82:5efb:fbe3:e844",
"fd8e:c6fc:d9c5:810e:dd12:97e3:1fb3:c368",
"cba7:24e4:8621:6409:7e73:d31f:aa2f:870a",
"851c:25c6:74f1:4e7f:3c7a:e4f3:306a:dfba"
],
"port": 45347
}
}
export interface AutohostStartOkResponse {
type: "response";
messageId: string;
commandId: "autohost/start";
status: "success";
data: AutohostStartOkResponseData;
}
export interface AutohostStartOkResponseData {
ips: string[];
port: number;
}
Possible Failed Reasons: battle_already_exists
, engine_version_not_available
, internal_error
, unauthorized
, invalid_request
, command_unimplemented
This event should be sent to the server on connection and whenever any of the status properties change.
- Endpoint Type: Event
- Source: Autohost
- Target: Server
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostStatusEvent",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "event" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/status" },
"data": {
"title": "AutohostStatusEventData",
"type": "object",
"properties": {
"maxBattles": {
"description": "The maxBattles might be reported lower (e.g. 0) then currentBattles. Example: autohost is shutting down and doesn't want to accept any new battles.",
"type": "integer",
"minimum": 0
},
"currentBattles": { "type": "integer", "minimum": 0 },
"availableEngines": {
"description": "List of available engine versions on autohost",
"type": "array",
"items": { "type": "string" }
}
},
"required": ["maxBattles", "currentBattles", "availableEngines"],
"examples": [
{
"maxBattles": 10,
"currentBattles": 5,
"availableEngines": ["2025.01.5"]
}
]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "event",
"messageId": "nisi ipsum Duis fugiat sint",
"commandId": "autohost/status",
"data": {
"maxBattles": 10,
"currentBattles": 5,
"availableEngines": [
"2025.01.5"
]
}
}
export interface AutohostStatusEvent {
type: "event";
messageId: string;
commandId: "autohost/status";
data: AutohostStatusEventData;
}
export interface AutohostStatusEventData {
maxBattles: number;
currentBattles: number;
availableEngines: string[];
}
Ask the autohost to send us updates about its battles. Autohost will send all updates with time > since (not >= but >)
- Endpoint Type: Request -> Response
- Source: Server
- Target: Autohost
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostSubscribeUpdatesRequest",
"tachyon": {
"source": "server",
"target": "autohost",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "request" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/subscribeUpdates" },
"data": {
"title": "AutohostSubscribeUpdatesRequestData",
"type": "object",
"properties": {
"since": { "$ref": "../../definitions/unixTime.json" }
},
"required": ["since"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "request",
"messageId": "cupidatat aliquip",
"commandId": "autohost/subscribeUpdates",
"data": {
"since": 1705432698000000
}
}
export type UnixTime = number;
export interface AutohostSubscribeUpdatesRequest {
type: "request";
messageId: string;
commandId: "autohost/subscribeUpdates";
data: AutohostSubscribeUpdatesRequestData;
}
export interface AutohostSubscribeUpdatesRequestData {
since: UnixTime;
}
JSONSchema
{
"title": "AutohostSubscribeUpdatesResponse",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"anyOf": [
{
"title": "AutohostSubscribeUpdatesOkResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/subscribeUpdates" },
"status": { "const": "success" }
},
"required": ["type", "messageId", "commandId", "status"]
},
{
"title": "AutohostSubscribeUpdatesFailResponse",
"type": "object",
"properties": {
"type": { "const": "response" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/subscribeUpdates" },
"status": { "const": "failed" },
"reason": {
"enum": [
"internal_error",
"unauthorized",
"invalid_request",
"command_unimplemented"
]
},
"details": { "type": "string" }
},
"required": ["type", "messageId", "commandId", "status", "reason"]
}
]
}
Example
{
"type": "response",
"messageId": "officia irure",
"commandId": "autohost/subscribeUpdates",
"status": "success"
}
export interface AutohostSubscribeUpdatesOkResponse {
type: "response";
messageId: string;
commandId: "autohost/subscribeUpdates";
status: "success";
}
Possible Failed Reasons: internal_error
, unauthorized
, invalid_request
, command_unimplemented
Inform the server of battle updates.
- Endpoint Type: Event
- Source: Autohost
- Target: Server
- Required Scopes:
tachyon.lobby
JSONSchema
{
"title": "AutohostUpdateEvent",
"tachyon": {
"source": "autohost",
"target": "server",
"scopes": ["tachyon.lobby"]
},
"type": "object",
"properties": {
"type": { "const": "event" },
"messageId": { "type": "string" },
"commandId": { "const": "autohost/update" },
"data": {
"title": "AutohostUpdateEventData",
"type": "object",
"properties": {
"battleId": { "type": "string", "format": "uuid" },
"time": { "$ref": "../../definitions/unixTime.json" },
"update": {
"anyOf": [
{
"title": "StartUpdate",
"description": "The battle has started.",
"type": "object",
"properties": { "type": { "const": "start" } },
"required": ["type"]
},
{
"title": "FinishedUpdate",
"description": "The battle finished, generated once per every single player reporting who won.",
"type": "object",
"properties": {
"type": { "const": "finished" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"winningAllyTeams": {
"description": "Ally team IDs",
"type": "array",
"items": { "type": "integer" },
"minItems": 1
}
},
"required": ["type", "userId", "winningAllyTeams"]
},
{
"title": "EngineMessageUpdate",
"description": "A message from the engine, e.g. some ip is trying to connect.",
"type": "object",
"properties": {
"type": { "const": "engine_message" },
"message": { "type": "string" }
},
"required": ["type", "message"]
},
{
"title": "EngineWarningUpdate",
"description": "A warning from the engine.",
"type": "object",
"properties": {
"type": { "const": "engine_warning" },
"message": { "type": "string" }
},
"required": ["type", "message"]
},
{
"title": "EngineQuitUpdate",
"description": "The engine process for battle has quit cleanly, no more updates will be sent for this battle.",
"type": "object",
"properties": {
"type": { "const": "engine_quit" }
},
"required": ["type"]
},
{
"title": "EngineCrashUpdate",
"description": "The engine process for battle has crashed, no more updates will be sent for this battle.",
"type": "object",
"properties": {
"type": { "const": "engine_crash" },
"details": {
"description": "Optional, short, details of the crash.",
"type": "string"
}
},
"required": ["type"]
},
{
"title": "PlayerJoinedUpdate",
"type": "object",
"properties": {
"type": { "const": "player_joined" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"playerNumber": {
"description": "Player number in the game, can be useful for custom commands",
"type": "integer"
}
},
"required": ["type", "userId", "playerNumber"]
},
{
"title": "PlayerLeftUpdate",
"type": "object",
"properties": {
"type": { "const": "player_left" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"reason": {
"enum": [
"lost_connection",
"left",
"kicked"
]
}
},
"required": ["type", "userId", "reason"]
},
{
"title": "PlayerChatUpdate",
"anyOf": [
{
"type": "object",
"properties": {
"type": { "const": "player_chat" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"message": { "type": "string" },
"destination": {
"enum": [
"allies",
"all",
"spectators"
]
}
},
"required": [
"type",
"userId",
"message",
"destination"
]
},
{
"type": "object",
"properties": {
"type": { "const": "player_chat" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"message": { "type": "string" },
"destination": { "const": "player" },
"toUserId": {
"$ref": "../../definitions/userId.json"
}
},
"required": [
"type",
"userId",
"message",
"destination",
"toUserId"
]
}
]
},
{
"title": "PlayerDefeatedUpdate",
"type": "object",
"properties": {
"type": { "const": "player_defeated" },
"userId": {
"$ref": "../../definitions/userId.json"
}
},
"required": ["type", "userId"]
},
{
"title": "LuaMsgUpdate",
"description": "This update is generated only for messages matching luamsgRegexp set in the battle start script.",
"type": "object",
"properties": {
"type": { "const": "luamsg" },
"userId": {
"$ref": "../../definitions/userId.json"
},
"script": { "enum": ["ui", "game", "rules"] },
"uiMode": {
"description": "Set when script is 'ui'",
"enum": ["all", "allies", "spectators"]
},
"data": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/octet-stream"
}
},
"required": ["type", "userId", "script", "data"]
}
]
}
},
"required": ["battleId", "time", "update"]
}
},
"required": ["type", "messageId", "commandId", "data"]
}
Example
{
"type": "event",
"messageId": "voluptate nulla veniam",
"commandId": "autohost/update",
"data": {
"battleId": "585472d0-6fc6-dd03-6c31-07c80e164f73",
"time": 1705432698000000,
"update": {
"type": "engine_quit"
}
}
}
export type UnixTime = number;
export type UserId = string;
export type PlayerChatUpdate =
| {
type: "player_chat";
userId: UserId;
message: string;
destination: "allies" | "all" | "spectators";
}
| {
type: "player_chat";
userId: UserId;
message: string;
destination: "player";
toUserId: UserId;
};
export interface AutohostUpdateEvent {
type: "event";
messageId: string;
commandId: "autohost/update";
data: AutohostUpdateEventData;
}
export interface AutohostUpdateEventData {
battleId: string;
time: UnixTime;
update:
| StartUpdate
| FinishedUpdate
| EngineMessageUpdate
| EngineWarningUpdate
| EngineQuitUpdate
| EngineCrashUpdate
| PlayerJoinedUpdate
| PlayerLeftUpdate
| PlayerChatUpdate
| PlayerDefeatedUpdate
| LuaMsgUpdate;
}
export interface StartUpdate {
type: "start";
}
export interface FinishedUpdate {
type: "finished";
userId: UserId;
winningAllyTeams: [number, ...number[]];
}
export interface EngineMessageUpdate {
type: "engine_message";
message: string;
}
export interface EngineWarningUpdate {
type: "engine_warning";
message: string;
}
export interface EngineQuitUpdate {
type: "engine_quit";
}
export interface EngineCrashUpdate {
type: "engine_crash";
details?: string;
}
export interface PlayerJoinedUpdate {
type: "player_joined";
userId: UserId;
playerNumber: number;
}
export interface PlayerLeftUpdate {
type: "player_left";
userId: UserId;
reason: "lost_connection" | "left" | "kicked";
}
export interface PlayerDefeatedUpdate {
type: "player_defeated";
userId: UserId;
}
export interface LuaMsgUpdate {
type: "luamsg";
userId: UserId;
script: "ui" | "game" | "rules";
uiMode?: "all" | "allies" | "spectators";
data: string;
}