Page 1 of 1

Lua Command - Get game version

Posted: Mon Apr 28, 2025 7:33 pm
by DocHoss333
I'm using RCON to programmatically get commands into the game. Working splendidly so far. I stumbled across a minor issue and don't know Lua well enough to solve it. If I want to get the output of

Code: Select all

/version
or some other slash command sent to the RCON output, how can I do that? What I'd like is something similar to:

Code: Select all

rcon.print(/version)
but that doesn't work, obviously.

Re: Lua Command - Get game version

Posted: Wed Apr 30, 2025 1:21 pm
by robot256

Code: Select all

rcon.print(script.active_mods["base"])
https://lua-api.factorio.com/latest/cla ... ctive_mods