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 [out-of-scope] Vehicle Autopilot

1 year, 1 month ago

Idea. How difficult is it to make, based on the existing logic for the controller, a “control module” for vehicles that could “see” the environment within a radius of 1 chunk and issue instructions to the vehicle (in which it is installed) according to the embedded program? This would significantly expand the possibilities of automation, since transport vehicles would become independent programmable agents. Especially if the program could be loaded into them automatically with the equipment of the “control module”, and the programs could be transferred from one module (used as a template) to another. In a completely ideal case, it would be possible to request from objects (other vehicles and radars) located in the “radius of visibility” (1 chunk around) the information they know about their surroundings (and thereby increase their own awareness).

1 year, 1 month ago

It's probably best to do in a separate mod, as it's not really related to signals and circuit network, and should probably have entirely different UIs.

But yeah, probably not that hard to add hooks for doing something like this, and probably expose some simplie API for giving vehicle orders from code, chaining and queuing them, etc.
Iirc there were a few combat and cargo vehicle mods, which might already have some degree of control loops like that from lua code.

1 year, 1 month ago

Specific mods that I was thinking about above, probably implementing something like this:
https://mods.factorio.com/mod/aai-programmable-vehicles
https://mods.factorio.com/mod/Transport_Drones
Though I haven't played the game or looked at the mods in a couple years by now, so there're probably many more of them around.

You almost certainly know enough lua and programming from using combinators of this mod to tinker with factorio modding API directly, as it's no different than using combinators, just way-way more powerful (allowing you to change almost anything in the game) and better documented :)

1 year, 1 month ago

I used your mod in conjunction with https://mods.factorio.com/mod/aai-programmable-vehicles.

This is a good mod, but it is quite heavy if you want to do something large-scale and complex, such as an automatic swarm of tanks or bombers. A program tied to each individual machine would be more suitable. And this is where your interface for in-game writing and linking scripts comes into play.

Unfortunately, I don’t understand very well how scripting works in Factorio and I’m afraid to get stuck at the learning stage.

New response