Smart assembling machines [solved]

Place to get help with not working mods / modding interface.
Post Reply
Verata
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 19, 2016 6:43 pm
Contact:

Smart assembling machines [solved]

Post 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"}

  }
  })
Last edited by Verata on Sun Mar 20, 2016 7:48 pm, edited 1 time in total.

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: Smart assembling machines

Post 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

Verata
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 19, 2016 6:43 pm
Contact:

Re: Smart assembling machines

Post by Verata »

Thank you very much.

Post Reply

Return to “Modding help”