Lua Command - Get game version

Place to get help with not working mods / modding interface.
DocHoss333
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Jan 23, 2025 4:25 pm
Contact:

Lua Command - Get game version

Post 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.
robot256
Smart Inserter
Smart Inserter
Posts: 1163
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Lua Command - Get game version

Post by robot256 »

Code: Select all

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

Return to “Modding help”