Removing ItemCollection requirement and supporting Item categories.

chrisk

Active member
Hi, Justin,

1. Remove ItemCollection
There are two parts to the discussion to the road to supporting many items and here is a simple one first.
Currently, we list all items in both ItemCollection and ItemsSetManagers but I think we can safely remove ItemCollection from ItemSetManager.
Here are the reasons. (please keep in mind that a released game can have 100s of items with many different categories)

I already have 100s of items with several different categories; Rifle, Shotgun, Knife, Sword, Pistol, and etc...
They all have different properties thus I inherited from ItemType for each category.

Since I have many items with different categories, I organize them in different folders.
I already have prefab for each item and I parse them to create custom ItemTypes, meaning I don't create new ItemType using the UI Tool.

So far so good. But right now, to use the item, I have to register them into ItemCollection and I don't really see much benefit doing so.
The purpose of ItemCollection is to check if an item is valid but I created them and I don't think it's really necessary to doublecheck.

The ugly part is that you have to put all of them using the Character Manager Tool and it is an unorganized list.

2. Support Item Categories.
Likewise, we need to do something about ItemSetManger to support many items.
It is a bit more complicated but I'll mention it here to have you review it.
When you have 100s of items, you can really organize them well in a single list.

ItemSetManage is used to find the next euipable item but when you have 100s of items, it seems very inefficient.
Instead of listing individual items in the ItemSetManager, listing category seems to make better sense, like AR, Knife, Shotgun, Pistol categories.
When you switch to the next time, you will switch to the next categories because that's what you really want in a normal case.
Right now, you are using Item Category means different meaning. It means more like Slot.
ItemType can have slot information, thus you can get the necessary information without using Category.
So get rid of the current Category system, and create a different category(class) system like above.
It will then adding many new times with different categories will be a lot easier.


I hope it makes sense.

#1 is something we can do it right now easily and it's a little urgent.

#2 can be done when you overhaul Item system.


Thanks.
 
Last edited:
The purpose of ItemCollection is to check if an item is valid but I created them and I don't think it's really necessary to doublecheck.
The main purpose of the Item Collection is to determine the order that the items should be equipped. Right now you don't need to add the Item Type ahead of time - if it's not in the Item Collection then it'll automatically be added.

Edit: Oops, read this as Item Set Manager. The item needs to be added to the Item Collection so the Item Set Manager knows which categories they belong to. You don't really notice it when creating the item type since the item collection has to be specified and the scriptable object is just a child of the item collection.

The ugly part is that you have to put all of them using the Character Manager Tool and it is an unorganized list.
I haven't looked at the ItemTypeManager recently but maybe the solution is to open up the API more so you can create things using your own tooling?

2. Support Item Categories.
Within the Item Set you can have different categories for weapons, and then enable/disable that category based on the currently equipped item. Take a look at this page for a variety of use cases: https://opsive.com/support/documentation/ultimate-character-controller/inventory/item-sets/
 
Last edited:
The item needs to be added to the Item Collection so the Item Set Manager knows which categories they belong to.
Hmm.. The category information is already in the ItemType.
I can see that the Tool needs to manage a number of ItemTypes, thus you created ItemCollections but for runtime, ItemCollection is not really necessary in my opinion but it requires it. The problem is that I don't create ItemTypes through the Tool as it's limited to create just a single ItemType but it forces me to have ItemCollections in the runtime.

In the ItemSetManager, the current category system only tells if an Item belongs to a certain category and if it's the same category, you cannot equip them without unequip first. Am I right?

To make it easier, let me tell you what I want to do.
I would like to support loadout system to change several items all at once.
I first thought ItemSetManager allows you to do that but it seems like it checks what to equip next.
In order to support loadouts, we will probably need subcategories.
The main category tells if you can hold it on the hand without unequip what have already, and the subcategory tells how to group similar items together. In loadout system, you will want to group AR, Sniper, Shotgun, Knifes together and not mix them.
I guess what we need is user definable category and subcategory first.
For example, under Weapon category, we will have AR, Sniper, Shotgun, Knife.. subcategories.
Similarly, under Consumable category, we will have various eatable subcategory items.
I hope it makes sense.

Thanks.
 
In the ItemSetManager, the current category system only tells if an Item belongs to a certain category and if it's the same category, you cannot equip them without unequip first. Am I right?
If it's in the same slot, yes. The item won't unequip if for example a pistol is in slot 0 and you are then going to dual pistols in slots 0 and 1.

I would like to support loadout system to change several items all at once.
I need to put more thought into the correct way to do this, and whether it would be on the UCC or inventory side of things. We should also have some pretty big news regarding inventory in a few months.
 
I need to put more thought into the correct way to do this, and whether it would be on the UCC or inventory side of things. We should also have some pretty big news regarding inventory in a few months.

This sounds super exciting...

This is how I view things.
ItemCollection is a static Item DB and we should make it as easy as possible to extend to accommodate different item categories.
ItemSetManager is a runtime Item DB and we should make as flexible as possible, including swap out loadout(presets) for weapons and characters and so on.

Thanks.
 
Top