The spawn module
Overview
API: Spawn
grid_spawn(id, name, tag, x, y, icon, color, roles)
Spawn a grid object on a ship
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
agent
|
The agent to add the grid object to |
required |
name
|
str
|
The name of the grid item |
required |
tag
|
str
|
The tag/side |
required |
x
|
int
|
the x grid location |
required |
y
|
int
|
the y grid location |
required |
icon
|
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, art_id, 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 |
art_id
|
str
|
The art ID to use |
required |
behave_id
|
str
|
Behavior type |
required |
Returns:
Name | Type | Description |
---|---|---|
SpawnData |
|
player_spawn(x, y, z, name, side, art_id)
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 |
art_id
|
str
|
The art ID to use |
required |
Returns:
Name | Type | Description |
---|---|---|
SpawnData |
|
terrain_spawn(x, y, z, name, side, art_id, 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 |
art_id
|
str
|
The art ID to use |
required |
behave_id
|
str
|
Behavior type |
required |
Returns:
Name | Type | Description |
---|---|---|
SpawnData |
|