StarOS: other hosts

These scripts also define def tick():. They do not see robot. Each starts with a documented default script. See the overview.

train

Also: json, math, memory, sun, and with a modem net, llm, jev.

member does
train.status() id, name, state, x, y, facing, stop, destination, wagons, battery_container, battery_wh, capacity_wh, blocked_by, wait
train.go_to(stop) head to one of your stops, by number or name
train.wait(turns) hold 0 to 1000 turns
train.stops() id, name, x, y, yard
train.wagons(), train.cargo() wagons with containers, and total contents
train.log(message), train.speed log; cells per turn

A train moves only while wagon 1 carries a charged battery container.

power_controller

A power station's script. Also json, math, memory, and with a modem net, llm, jev.

readings() gives bus_mv, batteries, controllers, loads, stop_permille, resume_permille. charge_limits(stop_permille, resume_permille), priority(load_id, n) (highest number is shed first), shed(load_id), restore(load_id), and in the newest build meters(). What it asks applies from the next turn.

gate

Also json, math, memory, net, llm, jev.

gate.status(), gate.open(turns, password=None) (1 to 240 turns), gate.close(), gate.log(message). Status includes state, turns_left, energy_turns, both banks and the toll. A gate that closes on a train destroys the wagon inside it.

ship

Also json, math, memory, net, llm, jev. ship.status() (id, name, owner, field, x, y, phase, turn) and ship.log(message). Edit it on the Alerts page.

Newest build only

The two below are new; if your game does not offer them yet, they have not shipped there.

signal: a railway signal in script mode. It sees json, math, memory, signal.status() (id, turn, open, occupied, trains), signal.set_open(open), signal.log(message).

notify: in the spacecraft script only. notify.channels() lists your verified channels (id, kind, name). notify.send(channel_id, text, level="info") records a message; level is info, warning or critical. At most 5 delivered a turn and 30 a day, 500 characters, 0.001 MT each.