Skip to content
This repository

action
event
fleet
item
item_location
planet
planet_miners
player
player_inventory
player_trophy
price_list
ship
ship_control
ship_flight_recorder
stat_log
trade
trade_item
trophy
variable

While browsing these tables you will notice that for many of them a player does not even have the ability to SELECT from. This is because this information is hidden behind views to control what a player can see about others in the game.

You may still find this information interesting though because if you plan to create an item or trophy you can access any and all information you see below within the item/trophy script.

action

Column Type Player Permissions Extra Details
action character(20) Select, Insert, Update
string text Select, Insert, Update

If you have added an item into the item table then you have the ability to insert/update an action here so long as action.name is the same as item.system_name. This allows for the item to add custom event logs when run.

event

Column Type Player Permissions Extra Details
id integer Sequence:event_id_seq
action character(20)
player_id_1 integer FK:player(id)
ship_id_1 integer FK:ship(id)
player_id_2 integer FK:player(id)
ship_id_2 integer FK:ship(id)
referencing_id integer
descriptor_numeric numeric
descriptor_string character varying
location_x integer
location_y integer
public boolean
tic integer
toc timestamp without time zone Default:NOW()

fleet

Column Type Player Permissions Extra Details
id integer Sequence:fleet_id_seq
player_id integer FK:player(id)
name character varying(50)
script text
script_declarations text
last_script_update_tic integer Select
enabled boolean
runtime interval

item

Column Type Player Permissions Extra Details
system_name character varying Select, Insert, Update
name character varying Select, Insert, Update
description text Select, Insert, Update
howto text Select, Insert, Update
persistent boolean Select, Insert, Update Default:FALSE
script text Select, Insert, Update
creator integer Select FK:player(id)
approved boolean Select Default:FALSE
round_started integer Select

item_location

Column Type Player Permissions Extra Details
system_name character varying
location_x integer
location_y integer

planet

Column Type Player Permissions Extra Details
id integer Sequence:planet_id_seq
name character varying(50)
fuel integer
mine_limit integer
location_x integer
location_y integer
conqueror_id integer FK:player(id)

planet_miners

Column Type Player Permissions Extra Details
planet_id integer FK:planet(id)
ship_id integer FK:ship(id)

player

Column Type Player Permissions Extra Details
id integer Sequence:player_id_seq
username character varying Unique
created timestamp without timezone
balance integer
fuel_reserve integer
password character(40)
error_channel character(10)
starting_fleet integer FK:fleet(id)

player_inventory

Column Type Player Permissions Extra Details
id integer Sequence:player_inventory_id_seq
player_id integer FK:player(id); Default:GET_PLAYER_ID(SESSION_USER)
item character varying FK:item(system_name)
quantity integer Default:1

player_trophy

Column Type Player Permissions Extra Details
round integer Select
trophy_id integer Select FK:trophy(id)
player_id integer Select FK:player(id)

price_list

Column Type Player Permissions Extra Details
code character varying Select
cost integer Select
description text Select

ship

Column Type Player Permissions Extra Details
id integer Sequence:ship_id_seq
fleet_id integer
player_id integer FK:player(id)
name character varying
last_action_tic integer
last_move_tic integer
last_living_tic integer
current_health integer
max_health integer Default:100
current_fuel integer
max_fuel integer Default:1100
max_speed integer Default:1000
range integer Default:300
attack integer Default:5
defense integer Default:5
engineering integer Default:5
prospecting integer Default:5
location_x integer Default:0
location_y integer Default:0
destroyed boolean Default:FALSE

ship_control

Column Type Player Permissions Extra Details
ship_id integer FK:ship(id)
direction integer
speed integer
destination_x integer
destination_y integer
repair_priority integer

ship_flight_recorder

Column Type Player Permissions Extra Details
ship_id integer FK:ship(id)
tic integer
location_x integer
location_y integer

stat_log

Column Type Player Permissions Extra Details
current_tic integer Select
total_players integer Select
online_players integer Select
total_ships integer Select
avg_ships integer Select
total_trades integer Select
active_trades integer Select
total_fuel_reserve integer Select
avg_fuel_reserve integer Select
total_currency integer Select
avg_balance integer Select

trade

Column Type Player Permissions Extra Details
id integer Sequence:trade_id_seq
player_id_1 integer FK:player(id)
player_id_2 integer FK:player(id)
confirmation_1 integer
confirmation_2 integer
complete integer

trade_item

Column Type Player Permissions Extra Details
id integer Sequence:trade_item_id_seq
trade_id integer FK:trade(id)
player_id integer FK:player(id)
description_code character varying
quantity integer
descriptor character varying

trophy

Column Type Player Permissions Extra Details
id integer Select Sequence:trophy_id_seq
name character varying Select, Insert, Update
description text Select, Insert, Update
picture_link text Select, Insert, Update
script text Select, Insert, Update
script_declarations text Select, Insert, Update
creator integer Select FK:player(id)
approved boolean Select Default:FALSE
round_started integer Select

variable

Column Type Player Permissions Extra Details
name character varying
private boolean
numeric_value integer
char_value character varying
description text
Something went wrong with that request. Please try again.