ItemShape Grid issue

cepoimario

New member
I am trying to add the itemshape grid as an inventory to UCC , have followed the steps in the new video however it get the following error trown away when trying to equip an item Unable to find the ItemSet for item 1 Revolver (3096726548) ItemCollection is NULL ItemStack is NULL in category index 0.

The inventory was setup with a clone of the empty database and an itemshape attribute was added to "All".
 
I haven't taken to time to try it yet but my guess is the drop action/condition is causing the issue. Essentially the UCC/UIS Integration requires the item to be equipped a certain way and therefore we have a custom drop action for it.
1611827345435.png
My guess is that by renaming your Item Shape Grid (in the Unique name field in the inspector) to match the name in the condition it will trigger the correct action to equip the item.

I could be wrong though, do let me know.

You may need to create a new Drop Action Set and make sure it has these drop action/conditions. Item Shape also require some drop other action/condtions (refer the the drop handler on the Item Shape Grid).


If none of the things you try work, I'll dig in deeper once I have more time
 

Attachments

  • 1611827294510.png
    1611827294510.png
    45.2 KB · Views: 6
I haven't taken to time to try it yet but my guess is the drop action/condition is causing the issue. Essentially the UCC/UIS Integration requires the item to be equipped a certain way and therefore we have a custom drop action for it.
View attachment 4962
My guess is that by renaming your Item Shape Grid (in the Unique name field in the inspector) to match the name in the condition it will trigger the correct action to equip the item.

I could be wrong though, do let me know.

You may need to create a new Drop Action Set and make sure it has these drop action/conditions. Item Shape also require some drop other action/condtions (refer the the drop handler on the Item Shape Grid).


If none of the things you try work, I'll dig in deeper once I have more time
I just renamed the itemshape grid to Main Inventory Grid but it does not seem to make a difference , drop handler is already created with the appropriate actions
 
So thanks to looking into this in detail I found some issues.

In the Item Shape Grid Data please replace the following functions:


Code:
/// <summary>
/// Can the grid contain the item.
/// </summary>
/// <param name="originalItemInfo">The item to preview.</param>
/// <param name="receivingCollection">The receiving Item Collection.</param>
/// <returns>True if the item fits.</returns>
public virtual bool CanAddItem(ItemInfo originalItemInfo, ItemCollection receivingCollection)
{
    if (m_Controller.IsCollectionIgnored(receivingCollection)) { return true; }
    
    
    
AND THEN


/// <summary>
/// An item was added, checking if it needs a position within the grid.
/// </summary>
/// <param name="originItemInfo">The original item info.</param>
/// <param name="itemStackAdded">The item stack of the added item.</param>
public void OnItemAdded(ItemInfo originItemInfo, ItemStack itemStackAdded)
{
    if (m_Controller.IsCollectionIgnored(itemStackAdded.ItemCollection)) { return; }

That's because the Items in the UCC+UIS integration must start in the default loadout. Which I mistakenly decided to not allow when using Item Shape Grid Data.

You'll want to use this as the Item View Slot Drop Action Set
1611918385973.png

And finally I think the error you are getting is because you are not adding the item in your inventory in a way that is allowed.

Items added at edit time must all be set in the Loadout collection. All the other collections must be empty (That's a limitation we are looking to solve one day)
1611918502831.png

Then all items added to the inventory at runtime must be added to the Main Collection.

I hope that helps solve your issues
 
Top