How to make an entity with a custom GUI?

Place to post guides, observations, things related to modding that are not mods themselves.
waltermundt
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed May 24, 2017 4:55 am
Contact:

How to make an entity with a custom GUI?

Post by waltermundt »

Is it possible to make a custom entity GUI? As in, the panel that appears when you click things like containers, assemblers, etc, but with lua-driven contents?

Related: how about custom entity configs? E.g. I want to make a pump-type entity that has a customizable throughput limit. I've actually got this working on the fluid level, but I'm not sure about the best way to expose the setting to the player.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: How to make an entity with a custom GUI?

Post by bobingabout »

Unfortunately not, the GUIs are hardwired into the base game.

what you can do though is create a secondary GUI that opens on the left side of the screen. In my case you open it by pointing to the entity and pressing SHIFT + E. Other people have written an on_tick event that opens it when it detects you open the main GUI.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
Post Reply

Return to “Modding discussion”