Skip to content

API Windows and helpers

Marcel1853 edited this page Oct 9, 2026 · 1 revision

🇩🇪 Deutsche Version · ⬅ For mod authors

Windows and helpers

Meant for scenarios, tips scenes, tests and the console.

Windows

Function Effect
open_station(player_index, unit, tab?, standalone?) open a station window. tab 2 = tab "Values" (UTL train stop only). For the train stop the vanilla window opens with the UTL panel; with standalone only the UTL panel as its own window.
open_manager(player_index, tab?, select?) open the UTL Manager, optionally on a tab: "depots", "stations", "networks", "inventory", "history", "statistics", "alerts", "settings". select selects something like a click: `{ network = "
open_readout(player_index, unit) open a network combinator's window (without reach)
close_windows(player_index) close all UTL windows of this player
show_recipe_notice(player_index) show the "recipes changed" notice (otherwise only shown once after the update to 0.0.9)
/c remote.call("utl", "open_manager", game.player.index, "networks")

Helpers

Function Effect
perf(heartbeats) timing for the next heartbeats heartbeats; the result is in factorio-current.log
convert_blueprint_water(blueprint) Cargo Ships: swap rails ↔ waterways, signals ↔ buoys, train stops ↔ ports in a blueprint (LuaItemStack or LuaRecord), like the button in the game. Returns the number of swapped parts or nil.

More messages in the log when troubleshooting: set_map_config("utl-debug-log", true) (see Configuring).

Clone this wiki locally