Page 1 of 1

Smart assembling machines [solved]

Posted: Sat Mar 19, 2016 7:41 pm
by Verata
I would really like to have programmable assembling machines in the game. So that it is possible to build factories that rearrange the recipes depending on the needs of the logistic system. Though I tried to figure out what it takes to write such a mod.
As I am new to modding in factorio I struggled a bit to get it in the right direction.
At first I copied the tech 3 assembling machine and changed its tech and crafting values. Then I wanted to add logic network ports which apparently did not work out.
As it is done in the smart inserter I tried to add the code for ports in the very end of the entity. However it does not run complaining about a missing closed bracket after “allowed_effects” Putting is after the ports didn’t work as well. I had to commend it out. My second problem is that there is still no port and I cannot connect a wire.
I am very happy for any help.

Code: Select all

...
    {
      module_slots = 4
    },
   	
    circuit_wire_connection_point =
    {
      shadow =
      {
        red = {0, 0},
        green = {0, 0}
      },
      wire =
      {
        red = {0, 0},
        green = {0, 0}
      }
    },
    circuit_wire_max_distance = 7.5
	
	--allowed_effects = {"consumption", "speed", "productivity", "pollution"}

  }
  })

Re: Smart assembling machines

Posted: Sun Mar 20, 2016 1:39 pm
by StanFear
Assembling machines cannot (yet) be connected to any network, if you really want it to be, you'll have to create a dummy entity, that will be connected to the networks, and then, with some code in Control.lua, you'll have to work some magic to link the two entities

Re: Smart assembling machines

Posted: Sun Mar 20, 2016 7:46 pm
by Verata
Thank you very much.