Station
The station object gives you access to the current station's data and lets you create and manage stations
Properties
| Property | Type | Description |
|---|---|---|
id |
number |
The station's id |
name |
string |
The station's name |
level |
number |
The station's tech level |
hangaritemscount |
number |
The number of items in the station's hangar |
hangarshipscount |
number |
The number of ships in the station's hangar |
agentscount |
number |
The number of agents in the station |
Properties are readable and writable
Methods
Create
Creates a new station and returns its id
Warning
This method can only be called inside the EarlyInit event
Args
name- The station's nametechlevel- The station's tech leveltextureid- The planet texture idsystemid- The id of the system to place the station in
IsVoid
Returns true if the current station is a void station
AddHangarShip
Adds a ship to the station's hangar
Args
shipid - The id of the ship to add
SetHangarShipInfo
Updates the info of a ship in the station's hangar
Args
slotid- The hangar slot indexshipinfo- A table containing the ship properties to update
HasItemInHangar
Returns true if the station's hangar contains the given item
Args
itemid - The id of the item to check
RemoveHangarItem
Removes an item from the station's hangar
Args
itemid - The id of the item to remove
GetAgentName
Returns the name of an agent at the given index
Args
index - The agent's index (starting from 0)
GetAgentFaction
Returns the faction of an agent at the given index
Args
index - The agent's index (starting from 0)
CreateAgent
Creates a new agent in the current station
Warning
The game deletes the agent when you visit at least 3 stations, do your own checks if the agent has been already made (if the player join the same system then you can have duplicated agents)
Args
name- The agent's namefactiontype- The agent's factionisterranwoman- Pass1for a female terran model,-1otherwiseimageinfo- A table describing the agent's portraitagentinfo- A table describing the agent's behavior and dialogue