Entity GUI Library

by Lukah

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

Internal
7 hours ago
2.0
3
Owner:
Lukah
Source:
N/A
Homepage:
https://github.com/Lukahhh/entity-gui-lib/
License:
MIT
Created:
a day ago
Latest Version:
0.1.3 (7 hours ago)
Factorio version:
2.0
Downloaded by:
3 users

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.