Repository navigation
API Queries
Marcel1853 edited this page Oct 9, 2026
·
1 revision
🇩🇪 Deutsche Version · ⬅ For mod authors
All queries return copies. The basics (stations, trains, goods keys) are on the page For mod authors.
| Function | Result |
|---|---|
station_count() |
number of UTL stations |
idle_train_count() |
number of free trains in depots |
delivery_count() |
number of running deliveries |
chained_count() |
how many deliveries were given out directly afterwards (without the depot) |
| Function | Result |
|---|---|
get_station(unit) |
copy of the station data: unit, kind, stop_name, config, provide, request, version; nil if unknown. config holds all settings, among them mode, roles, network, addon_role and ext (data of add-ons). |
get_stations(filter?) |
list: unit, stop, stop_name, network, roles, addon_role, surface, force. filter = { surface = index, force = name, network = name, role = …, addon_role = "mod/name" }; role: "provider", "requester", "depot", "fuel", "cleanup", "storage". |
get_trains_at_station(unit) |
{ here = { ids of trains waiting there }, coming = { ids of trains whose delivery goes there next } }; nil if unknown |
pending_trains(stop_unit) |
how many trains UTL sends by waypoint to this train stop (depot, refuelling, cleanup). Together with stop.trains_count this gives the occupancy against the train limit. |
| Function | Result |
|---|---|
get_deliveries() |
running deliveries: id, train_id, provider, requester, from, to, network, manifest, state, started, chained, extra_stops; with a second provider also second (station) and leg (1 or 2) |
get_delivery(id) |
one running delivery (fields as above) or nil
|
state is to_provider, loading, to_requester or unloading. manifest = { [goods key] = amount }.
| Function | Result |
|---|---|
get_train(train_id) |
what UTL knows about a train: id, idle (free in a depot), network, depot (name), depot_stop, delivery (id), service ("fuel", "cleanup", "both", "relocate" …), stuck_minutes, held_by (mod holding it); nil if UTL does not know it |
get_idle_trains(filter?) |
free trains in depots: id, network, depot, length, surface, force. filter = { surface = index, force = name, network = name }. With { role = "mod/name" } instead the free trains in an add-on's depot (fields id, station, depot, length, surface, force, role). |
| Function | Result |
|---|---|
get_networks(surface_index, force?) |
network names on a surface for a team, sorted |
get_network_star(surface_index, name, force?) |
star of a network: role, center, partners
|
get_team_config(force_name, key) |
effective team value (own value or map value): load_timeout, unload_timeout, timeout_mode
|
get_elevators() |
space elevators (Space Exploration only): per side unit, stop, opposite, surface, ok (finished and powered) |
| Function | Result |
|---|---|
get_readout(unit) |
network combinator: config (network, mode, star, transit) and values (last output signals per goods key); nil if unknown. mode: "stock", "storage", "demand", "shortage", "trains". |
get_statistics() |
statistics as in the manager: since, deliveries, goods (per good ten, hour), trains (per train deliveries, utilization), stations (per station sent_ten, sent_hour, received_ten, received_hour) – over all surfaces and teams |
get_alerts() |
latest alerts, newest first: key, group, icon, count, tick
|
Unified Train Logistics · version / Version 0.0.25 · made with AI help, tested by Marcel / mit KI-Hilfe erstellt, von Marcel getestet · Mod portal · GitHub
🇬🇧 English
- Quick start
- Stations and roles
- Networks
- Mixed providers and job output
- How trains run
- Fuel, cleanup and depots
- Storage
- Blueprints with parameters
- Network combinator
- UTL Manager and alerts
- Settings
- Teams and surfaces
- Space elevator
- Scenarios and tips
- FAQ and troubleshooting
-
For mod authors
- Queries · Configuring · Events
- Windows and helpers
- Add-ons: roles and data · trips · rebuilding trains · windows
- Performance · Signal icons · Examples
🇩🇪 Deutsch
- Schnellstart
- Stationen und Rollen
- Netzwerke
- Gemischte Anbieter und Auftrags-Ausgabe
- Wie die Züge fahren
- Tanken, Cleanup und Depots
- Lager
- Blaupausen mit Parametern
- Netz-Kombinator
- UTL-Manager und Warnungen
- Einstellungen
- Teams und Oberflächen
- Weltraumaufzug
- Szenarien und Tipps
- Häufige Fragen und Fehlersuche
-
Für Mod-Autoren
- Abfragen · Einstellen · Ereignisse
- Fenster und Hilfen
- Add-ons: Rollen und Daten · Fahrten · Züge umbauen · Fenster
- Leistung · Signal-Symbole · Beispiele