Call external executable or shell command from Lua?

Place to get help with not working mods / modding interface.
Post Reply
zangman
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Aug 12, 2018 2:55 am
Contact:

Call external executable or shell command from Lua?

Post by zangman »

It seems that calls to io and os are disabled by default. If I want to interface with an external program from factorio (both send and receive data), whats the best way to do it through a mod? Can I have my application running as a local webserver and send requests to it?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Call external executable or shell command from Lua?

Post by DaveMcW »

RCON for input. It requires a headless server to work.
game.write_file() for output.

zangman
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Aug 12, 2018 2:55 am
Contact:

Re: Call external executable or shell command from Lua?

Post by zangman »

Thanks. Rcon seems pretty complex, since I'm just sending data out, write_file works for now.

Post Reply

Return to “Modding help”