Inventory Templates

by azaghal

Import and export inventory filters as blueprints.

Utilities
a month ago
1.1 - 2.0
928
Transportation Storage Blueprints

g [FIXED] Crash when picking up blueprint book from the library

a month ago
(updated a month ago)

From saaadel in another thread:

Crashed =) I took blueprint book in the hands from the blueprint library.

The mod Inventory Templates (2.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event inventory-templates::on_player_cursor_stack_changed (ID 32)
Record is not a BlueprintRecord.
stack traceback:
[C]: in function 'get_blueprint_entities'
inventory-templates/scripts/utils.lua:106: in function 'get_held_blueprint_entities'
inventory-templates/scripts/main.lua:75: in function 'update_button_visibility'
inventory-templates/scripts/handlers.lua:18: in function <inventory-templates/scripts/handlers.lua:16>

a month ago

Hm... Yeah... The blueprint book handling is currently fully broken in the mod.

It will take me a bit of time to fully figure it out and clean up the code checks for this (there's multiple ways to grab information depending on book vs blueprint and inventory vs library).

One worrying thing (at a quick glance) is that I don't seem to be able to find a way to retrive active blueprint when player is holding a blueprint book from the library, but I will have to dig into it some more.

Best regards,
Branko

a month ago
(updated a month ago)

The thing is, this book is not about templates at all. I tried to deconstruct something down and build something, but the mod crashes the use of books in general, not clicking with this book on the mod button.

P.S. Blueprints are unusable now - with this mod activated.

a month ago

It doesn't matter if the blueprint book is related to templates or not - the mod itself uses blueprints for exporting and importing configuration, and this includes logic on when to show the import/export/clear buttons (and this is where you hit the crash in the savegame).

Blueprint stored as part of a book are also meant to be supported by the mod (so you can group your inventory templates in a single book). There have been some changes around how the blueprint books are handled in version 2.0, and I did not account for them (nor test) when updating the mod.

For now, until I come up with a proper fix, you will have to disable the mod. It should not take long, but I need to wrap up another crash report from a different mod first. :)

Best regards,
Branko

a month ago

Well... Looks like currently selected blueprint in a blueprint book is not accessible via current game modding API (which is huge loss of functionality in my opinion). So, inventory template blueprints will only work when held directly (either from inventory or library).

But... I have fixed the crash, so feel free to give it another go and let me know if this particular issue is resolved. :)

Best regards,
Branko

a month ago

Does not crash anymore

a month ago

Great, thanks for trying it out and letting me know. :)

Still gotta see if we get some additions for being able to access blueprints (or at least blueprint info) in books via API at some point.

I'll close off this thread, but if you run into any other bugs, just let me know. :)

Best regards,
Branko

This thread has been locked.