[MOD 0.12.x] Lua Combinator 0.0.1

Topics and discussion about specific mods
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

[MOD 0.12.x] Lua Combinator 0.0.1

Post by JamesOFarrell »

Type: Mod
Name: Lua Cominator
Description: Run a lua script in response to wire network. Can be used to query and control most in game objects. Basically command blocks for Factorio
License: MIT
Version: 0.0.1
Release: 2015-08-30
Tested-With-Factorio-Version: 0.12.x
Category: Item
Tags: Logistics, Scripting, Lua
Download-Url: Download v0.0.2
Website: Forum Thread (you are here!)
Long description
Version history
License
Example Scripts
Attachments
LuaCombinator_0.0.2.zip
v0.0.2
(28.32 KiB) Downloaded 1016 times
Last edited by JamesOFarrell on Sat Sep 05, 2015 12:20 am, edited 6 times in total.
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by JamesOFarrell »

This mod only works unzipped for some reason. I am looking into it now but if you have issue just unzip the mod.

Edit fixed i think, also bonus picture

Image
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by Adil »

Impressive work. Truly impressive. If only those who code were actually playing the game :?
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by GopherAtl »

nice, this was pretty high on my to-do list, but I'm glad to have someone beat me to it. Too many mods, not enough time, after all :D
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections
User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by Smarty »

Moved to Work in progress by smarty
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by JamesOFarrell »

Smarty wrote:Moved to Work in progress by smarty
Thanks Smarty!
British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by British_Petroleum »

is it possible to write a script in the lua combinator that (when the conditions are met) will spawn another lua combinator at a specified location on the map with a specified script in the newely spawned lua combinator?
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by JamesOFarrell »

British_Petroleum wrote:is it possible to write a script in the lua combinator that (when the conditions are met) will spawn another lua combinator at a specified location on the map with a specified script in the newely spawned lua combinator?
You can spawn a lua combinator but you can't set the script. it is a really good idea though so I'll put it on the todo list.
s0ulcub3
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 19, 2016 11:15 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by s0ulcub3 »

Hello there. I'd very much love to try this mod but it appears that it does not work with the latest Factorio build. Are there any plans to continue updates to this mod? Thanks.
NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by NoriSilverrage »

I'm guessing the author isn't around anymore.. The mod errors on loading a game. I looked into it and it seems pretty simple.
In control.lua lines 119-126 reference game.x and it appears that is no longer in use. Simply changing them to the following allowed the mod to work.
I ran a few basic scripts through the combinator and it worked just fine.

Code: Select all

script.on_event(defines.events.on_gui_click, on_gui_click)

script.on_event(defines.events.on_tick, on_tick)

script.on_load(on_load)

script.on_event(defines.events.on_built_entity, on_built_entity)
script.on_event(defines.events.on_robot_built_entity, on_built_entity)
xmnovotny
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jun 29, 2016 7:47 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by xmnovotny »

I have upgraded mod for Factorio 0.13.

Both circuit condition and logistic condition works. I have added new script variable - "circuit_network" - it is a table of LuaCircuitNetwork for red and green wire {defines.wire_type.red = .., defines.wire_type.green = ...}.

URL for download will be on the next post due to forum restrictions.
xmnovotny
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jun 29, 2016 7:47 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by xmnovotny »

I have added another new script variable - circuit_network_signals - table of combined values of signals from both wires.

Here is file to download:
https://www.dropbox.com/s/ef3ierbvco8h5 ... 3.zip?dl=1
aahaxor
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Nov 27, 2016 3:18 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by aahaxor »

I have posted a updated version for factorio version 0.14 on the official factorio mods site.

I will post the URL in the next post due to forum restrictions.

If you have a problem with it please post a bug report or whatever there.

Hope you enjoy and use!
aahaxor
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Nov 27, 2016 3:18 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by aahaxor »

Here is the URL for downloading the mod:

https://mods.factorio.com/mods/aahaxor/LuaCombinator

Hope you enjoy! :D
nosferato
Inserter
Inserter
Posts: 27
Joined: Sat Aug 02, 2014 11:11 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by nosferato »

Thanks to JamesOFarrell, for creating this and aahaxor for updating, I have been using this to work out how lua works
poetter
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Jan 09, 2016 4:52 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by poetter »

Hey aahaxor,

hope you are still around. Would it be possible for you to update this mod to 0.15? I would really like to get my hands on this mod in combination with AAI Programmable Vehicles.
smitty
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 23, 2017 5:18 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by smitty »

Hey do you have this up on git hub? I'd like to help maintain it and such. If you like I can put it up there for you. And if you're not around I suppose I can just do that anyway since it's MIT licensed.
smitty
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue May 23, 2017 5:18 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by smitty »

I created a reop here. PM me if you want to do anything with it.

https://github.com/smitty42/LuaCombinator
deltaone
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jun 01, 2017 5:14 am
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by deltaone »

martijnenco
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jun 15, 2017 11:14 pm
Contact:

Re: [MOD 0.12.x] Lua Combinator 0.0.1

Post by martijnenco »

smitty wrote:I created a reop here. PM me if you want to do anything with it.
How is it going with this project? Looking forward using it :)
Post Reply

Return to “Mods”