[Help needed]Modding Circuit Connections and GUI

Place to get help with not working mods / modding interface.
User avatar
PrincessSelena
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Mar 17, 2016 4:37 pm
Contact:

[Help needed]Modding Circuit Connections and GUI

Post 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!
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [Help needed]Modding Circuit Connections and GUI

Post 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.
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.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [Help needed]Modding Circuit Connections and GUI

Post 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
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Modding help”