Page 1 of 1

[Help needed]Modding Circuit Connections and GUI

Posted: Thu Aug 25, 2016 11:38 am
by PrincessSelena
Hey guys!
I am currently working on a smart Assembly Machine Mod, which adds an Assembly Machine, that's recipe can be set by a Circuit Network, but I'm having trouble to mod the connection in. I have the Assembly Machine, Recipe and Technology set up, but I can't figure out, how to tell the game that this entity is connectable and how it interacts with the Machine(Perhaps set up a custom GUI if nessecary). (I set the type of the entity to "assembling-machine". If there is a better type, please let me know)
I'd love to have some help with that, as I'd like to use that mod as the next level of end-game automation!

Re: [Help needed]Modding Circuit Connections and GUI

Posted: Thu Aug 25, 2016 4:40 pm
by Adil
You cannot 'tell' the game that an entity of one type should now have additional behavior. If you want some entity do more than it's supposed to, you have to construct it together by using the opportunities provided by api.
For example, you can use scripts to place additional connectable entity, when your assembler is placed. And then use scripts to read the circuit condition on that dummy entity.

See other mods doing similar things for examples. I know of "nixie tubes" which provides (actually, imitate) networking in entities not conditioned for that, however, I'm afraid the code might be complex to read.

Re: [Help needed]Modding Circuit Connections and GUI

Posted: Thu Aug 25, 2016 6:08 pm
by aubergine18
Here's a good example mod for creating additional entities when main entity is placed: https://mods.factorio.com/mods/Klonan/Concrete_Lamppost