Any way to detect description changes? Hiccup in developing Blueprint Repository/Build System.

Place to get help with not working mods / modding interface.
pinkmexican
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Aug 05, 2025 5:33 am
Contact:

Any way to detect description changes? Hiccup in developing Blueprint Repository/Build System.

Post by pinkmexican »

Hello everyone, I'm developing a Blueprint Repository and Build System for Factorio. As part of this tool, I'm making a Factorio mod that syncs an in-game blueprint inventory to a local filesystem repo, so the user can easily edit and develop blueprints/books while versioning/storing in a local git repo. It has some fairly complex change detection and syncing logic I'm pleased with. It's about 90% complete.

But I've run into an annoying hiccup I'm stuck on. I can't for the life of me figure out if there's any direct way to detect if the user has edited the description of a book or blueprint. There are no APIs for reading the description (only label), and none of the events seem to trigger for the book editing modal since it's not a custom GUI (side note, weirdly inconsistent that on_gui_clicked only works for custom guis, but on_gui_closed and on_gui_opened works for native guis).

If a user goes in and edits a book description I have no way of knowing in the mod that I can tell.

Of course I can resort to generating an export_stack and decoding once the book gui is closed but this really causes the interface/mod to slow down for large books since it has to export and decode the full nested tree of books. I tried this method and for a book like 10 Books of Rails and I end up with a 2-3 second delay every time I close one of the books or switch to another boo.

As a last resort I could add a button for the user to manually trigger change detection, but I was hoping to build a seamless editing/saving experience.

Anything I'm missing? Any other ideas?
Would love some API support from the devs to read/write blueprint/book descriptions, but not sure I can count on that happening anytime soon.
Post Reply

Return to “Modding help”