inventory-system icon indicating copy to clipboard operation
inventory-system copied to clipboard

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

Open EnigmaEmmy opened this issue 9 months ago • 1 comments

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:

  • Food
    • Hunger : int
    • Spoiled : bool
  • Weapon
    • Damage : float
    • Durability : float

And if I have the following items:

  • Apple
  • Bread
  • Stick
  • Sword
  • Breadstick

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.

EnigmaEmmy avatar May 10 '24 15:05 EnigmaEmmy

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

scriptsengineer avatar May 11 '24 13:05 scriptsengineer

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"

MimiVRC avatar May 20 '24 21:05 MimiVRC

Added version 1.1.5, coming soon to asset lib

scriptsengineer avatar Jul 17 '24 01:07 scriptsengineer