Items and Item Set Manager

zroc

Member
I know what I'm about to ask may seem a little off the edge, but I have not used UCC Items before as I have my own inventory system that is just a little too extensive for my current project. So I wanted to see about incorporating UCC Items into this project. I have been reading the items and item set manager docs pages, but from what I've seen in the demos as well as the docs it looks like everything is a one-to-one relationship.

Is it possible to have the same category of weapons (swords, shields, etc..) using the same itemdefination itemtype?

I have a wide variety of melee weapons that have been configured as pun runtime items and pickups. I initially configured each respective item to the itemdef of it's category, swords to the sword, knives/daggers to the knives, etc... But in doing so, it didn't matter which item the character picked up, as the very first item of that itemdef itemtype was rendered on pickup as well as drop. So I had to create separate itemdef itemtypes for each which that rendered the correct item/weapon. Oddly enough, in doing this I got an unexpected result I didn't want and that was the character can pickup any item of the same even if he's already carrying it. For example let's same there are 3 different swords and he's carrying sword 1, he can pickup up sword 2 and 3 while carrying sword 1. Same for shield, etc.. Additionally, without having to create a massive list of itemsets, I tried to configure the pickups with the specific itemset(s) to add to the character at pickup, but that does not seem to be working. So had to create a huge list of itemsets on the character specific to each new itemdef itemtype, for each, so forth...

Perhaps if you could briefly detail a response in the initial set up for two swords as an example?

[EDIT]: Got it. I'm an idiot.. lol. However, still have question about the bow and different arrows?

Thank you!
 
Last edited:
Glad you figured out part of it :)

For using one bow with different arrow items, that's not something that ShootableWeapon supports out of the box unfortunately, so you'd need to either extend ShootableWeapon slightly to allow multiple consumable item definitions, or use multiple bow items. Another option to try is to have multiple ShootableWeapon actions on the same bow, each with a different consumable item definition - you'd then need some way of knowing which ShootableWeapon action to fire (i.e. each one with a different action ID and different Use abilities matching those IDs).
 
Glad you figured out part of it :)

For using one bow with different arrow items, that's not something that ShootableWeapon supports out of the box unfortunately, so you'd need to either extend ShootableWeapon slightly to allow multiple consumable item definitions, or use multiple bow items. Another option to try is to have multiple ShootableWeapon actions on the same bow, each with a different consumable item definition - you'd then need some way of knowing which ShootableWeapon action to fire (i.e. each one with a different action ID and different Use abilities matching those IDs).
Yes. Will try that and write some interfacing for different arrow selections into the char weapons.. Np.

But hey.. Going back to original issue. I was right. It's not working. After I logged the original thread I went back and redid the entire inventory collection. After doing that went back through all the pun items and pun item pickups and reconfigured them to the new inventory collection itemdef. Ensured only one of each of those new itemdefs were on the character (sword, axe, shield, sword/shield, longsword, etc... in respective slot(s)). I then placed two pun pickup items on the ground (axe01 and axe02). As soon as you pickup up axe02, it renders axe01 based on the fact that on character init only 'unique' itemtypes are being added to the character.

NOTE: No weapons are configured on the character pre-spawn. All items are set as Pun Runtime Objects and Pun Runtime Pickups.

Please see pics. You will see in pic#2 that axe02 item is never added to the character because it has the same itemdef as axe01 (axe_n). So when axe02 is picked up it forces axe01 to render as its locating that item based on that itemdef (if that makes sense). So is there something confgiured wrong here?

Thank you.
 

Attachments

  • Items_Config_Char_Config_Objs_Pickups.jpg
    Items_Config_Char_Config_Objs_Pickups.jpg
    916.5 KB · Views: 6
  • char_spawned_items_added_to_char_not_all-PrePickup.jpg
    char_spawned_items_added_to_char_not_all-PrePickup.jpg
    285.6 KB · Views: 6
  • axe02_pickedup-wrong_item_enabled.jpg
    axe02_pickedup-wrong_item_enabled.jpg
    109.8 KB · Views: 7
Unless I'm missing something you're trying to have multiple items sharing the same ItemDefinition and pick up specific ones. That won't work how you want it to, because it's not how the inventory system is set up. Each ItemDefinition is for a unique item.

If you want to just have different visuals for the same item, there are a couple of ways you could do that. You could just have each different visual be a completely separate item. Or you could use a custom script on your items to change which visual object is used. E.g. the Third Perspective Item has the "Object" property (under "Render"), which I think you can modify during run-time (e.g. before picking up the item).
 
Top