SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Factorio

E

Entity GUI Library

LBy Lukah

A library for creating custom entity GUIs that replace (or extend) vanilla ones. Provides a barebones frame with title, close button, entity preview, and status.

Description

Entity GUI Library

A library mod for creating custom entity GUIs that automatically replace vanilla ones. Provides a clean API for mod authors to easily add custom interfaces to any entity type.

Features

  • Automatic replacement - Intercepts vanilla GUIs and replaces them with your custom version
  • Vanilla styling - Proper frame, titlebar, close button, entity preview, and status display
  • E Key support - Close GUI with E key like vanilla
  • Auto-refresh - Live-updating GUIs for progress bars, energy levels, etc.
  • Helper functions - Tabbed interfaces, confirmation dialogs
  • Multi-mod support - Priority system for handling conflicts between mods
  • 35+ entity statuses - Comprehensive status display coverage

For Mod Authors

Simple registration via remote interface:

remote.call("entity_gui_lib", "register", {
    mod_name = "my_mod",
    entity_type = "inserter",
    on_build = "build_my_gui",
})

Your callback receives a container to add custom GUI elements:

remote.add_interface("my_mod", {
    build_my_gui = function(container, entity, player)
        container.add{type = "button", caption = "Click me"}
    end,
})

Documentation

See the discussion

Example Mod

Includes a complete example mod in \examples\ demonstrating:

  • Basic button interactions
  • Confirmation dialogs
  • Tabbed interfaces
  • Auto-refreshing progress bars
  • Custom preview sizes

*This is a library mod - it does nothing on its own. Other mods could use it to create custom entity GUIs.*

Disclaimer: Still learning GUI, this might not work, might be missing features, or might not be suitable for you.

Shoutout: thesixthroc's Cerys mod - specifically the Fulgoran Teleporter GUI.

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.