well, my item system is a bit broad, i consider all things you can collect to be game items, including everything that goes into the save file. so every quest flag or dialogue flag or enemy killed or level unlocked or character introduced, would be items in my inventory.
i did not know about B-trees, so thanks for pointing that out, i am looking into it now. i have heard of octrees, and binary search trees, but i never knew about B-Trees. so i will have to do some tests and see if your idea is easier to manage. i know it won’t be more efficient at runtime, since my method doesn’t require searching at all, while yours requires O(log n) searches for each item, but it might be slightly more efficient for development time. thanks for the info.
but im pretty sure B-trees can be made without struct pointers or struct inheritance, by putting the structs in an array, and using their Index as if it was a pointer. any data that is ReadOnly, i would still store in separate spreadsheets.
“It literally does what you’re arguing for you but behind the scene so you don’t have to deal with it.”
no, it organizes the data far less efficiently, using arbitrary rules about how many items a folder can have, instead of using rules that correspond to how the data will be displayed. and it doesn’t save me any time, adding a new item category is a rare event that is easy enough with my current method, and could be made easier with methods that are far less detrimental to performance.
putting things where you want to retrieve them, in the order you want them displayed, skipping sorting all together, will always be more efficient than putting things in a bag and searching for each item in a list.
but i would love to hear more about how you would implement B trees in UE4. when i search for items, i use Names, but you can only compare Names for equality, there is no greater than or less than comparisons for text in blueprints. so would you search for items by a number ID?