Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

g [feature] Keeping code as files under some dir

3 months ago

Hi mk-fg
i like this mod. for at selfexpanding factory it is easy to use :D
but where is the program saved? is it posible to use a ide like VS-code to edit the program?

kaag101

3 months ago

Hi, thanks.

It's only saved as a lua string in an in-game global variable, which gets serialized into factorio savegame file.

But you can totally edit code in normal editor, just need to then copy-paste it into appropriate combinator in-game.
I've always edited such code in emacs here, which of course is more convenient than a simple text box.

I think factorio mod API allows write_file() function, intended for saving logs, reports or debug outputs, but not loading files back.
There is also RCON interface for talking to lua in dedicated servers from an external app, and that can be used to have a trivial external script running, which monitors a directory of files somewhere and synchronizes code to/from with the game combinators.

RCON-based tool might be a nice and not that difficult thing to implement, but dunno if I'll get to it tbh.

3 months ago

Hi mk-fg
thanks for the respont :) that is also what i have been doing from time to time :D

New response