expressobits / inventory-system

Modular inventory system for godot 4 with nodes, compatible with multiplayer, separate logic from the UI, Using items as separate resources.
MIT License
470 stars 31 forks source link

Add Item Category custom properties to automate adding custom properties to individual items #114

Closed EnigmaEmmy closed 2 months ago

EnigmaEmmy commented 4 months ago

Item Categories should have a section to add 'Custom Properties' to.

The reasoning for this is to automate the creation of custom properties for each item. Instead of manually adding the same properties to each item, or duplicating existing items and amending the existing fields, simply assign or unassign a category and all of the associated custom properties will be added/removed from the item.

For example: If I have the following categories with custom properties:

And if I have the following items:

Assigning the 'Food' category to Apple and Bread would automatically add the 'Hunger' and 'Spoiled' custom properties to them.

Assigning the 'Weapon' category to Stick and Sword would automatically add the 'Damage' and 'Durability' custom properties to them.

Assigning both the 'Food' and 'Weapon' categories to Breadstick would automatically add all four custom properties ('Hunger', 'Spoiled', 'Damage' and 'Durability') to the Breadstick item.

scriptsengineer commented 4 months ago

Very interesting, I don't know why I didn't think of this before, I'm going to put this feature in the plan!

MimiVRC commented 4 months ago

I was digging around for something similar and think that a good solution would be if we could save "presets" for all of the "new" buttons in the database. at any time we can go to an item, recipe, station or category, and on any existing item click something to "save a preset". now when you push "new" for that type it has that preset as an option

example, add an item, add all properties armor could ever use, set it up as much as you can and then "save as preset". name it "armor" now in the "new inventory item" button it would have "new item with new resource" "new item from existing resource" "new 'armor' item"

scriptsengineer commented 2 months ago

Added version 1.1.5, coming soon to asset lib