Skip to content

The spawn module

Overview

API: Spawn

grid_spawn(id, name, tag, x, y, icon_index, color, roles)

Spawn a grid object on a ship.

Parameters:

Name Type Description Default
id Agent | int

The agent to which the grid object should be added

required
name str

The name of the grid object

required
tag str

The tag/side

required
x int

the x grid location

required
y int

the y grid location

required
icon_index int

the icon index

required
color str

color

required
roles str

string of comma-separated roles

required

Returns:

Name Type Description
GridObject

The grid object.

npc_spawn(x, y, z, name, side, ship_key, behave_id)

Spawn a non-player ship.

Parameters:

Name Type Description Default
x float

the x location

required
y float

the y location

required
z float

The z location

required
name str

The name can be None

required
side str

The side the the ship is on

required
ship_key str

The key from shipData to use

required
behave_id str

Behavior type

required

Returns:

Name Type Description
SpawnData

The SpawnData object for the npc.

player_spawn(x, y, z, name, side, ship_key)

Spawn a player ship.

Parameters:

Name Type Description Default
x float

the x location

required
y float

the y location

required
z float

The z location

required
name str

The name can be None

required
side str

The side the the ship is on

required
ship_key str

The key from shipData to use

required

Returns:

Name Type Description
SpawnData

The SpawnData object for the player ship.

terrain_spawn(x, y, z, name, side, ship_key, behave_id)

Spawn a terrain (passive) object.

Parameters:

Name Type Description Default
x float

the x location

required
y float

the y location

required
z float

The z location

required
name str

The name can be None

required
side str

The side the the object is on can be None

required
ship_key str

The key from shipData to use

required
behave_id str

Behavior type

required

Returns:

Name Type Description
SpawnData

The SpawnData object for the terrain.