Ultimate Inventory System WIP

@Sangemdoko -

Looks really good.

It might be handy to be able to (in UI too) sort by multiple categories rather than just one?

I am assuming, as with earlier UI, some support for popup UI with item details?

One thing that would be a nice-to-have is comparing stats/info from item equipped with item being hovered over (be that in player inventory or merchant...)?
 
@Duffer123

Sorters and filters are now their own components and each have a Multiple(Sorter/Filter) component that allows you to stack multiple sorters and filter toghether. So filter and/or sorting by multiple categories is already working!

Yes the UI still supports the description as the current version, I wasn't using it in the gif but I could have it works just fine.

As for the stats/info comparison in the description that's something that I hadn't thought of. I do it in the current demo scene but it is a custom solution. Having a solution that works out of the box sounds really useful.

I'll add it to my todo list :)
 
@Dreamwalker I'm glad I'm not the only one that enjoys playing on a gamepad :) . Do not worry about that, controller support is something we will most definitely not abandon. As I am implementing the drag&drop feature, I am abstracting the functionality such that it will work with a controller.

The process will be very similar. Let me know what you think of the following.

1) click on the item to open the item actions menu
2) press "Move" to start the move item action triggering a "drag start"
3) navigate the grid using the controller with the itembox following the selection with a certain offset triggering a "drop hover".
4) press again to set the new position of the item, triggering a "drop"

The Move action will have an option to select other panels such that you may "store/retrieve/equip/unequip" your items in a chest, a storage or a character panel.

Behind the scenes the functionality will be the same so if set up correctly we should be able to use both drag&drop and "move" in the same scene.

I'll be working on implementing that after I make sure the system is flexible enough to do some interesting things, which I hope people will enjoy :)
 
Looking good!

One feature that I think is important when talking about drag&drop inventories is the ability to also quickly move items via right click. Like being able to right click items in a treasure chest to quickly move them to inventory, and then right clicking equipment in inventory would quickly equip it in an open slot. Or this is already possible?
 
Hi @desukarhu
That's actually something I hadn't thought about. Currently the only option is to click on the item opening a list of actions (drop, equip, retrieve x amount, etc...) and then go from there. But having a "shortcut" which match an input to an action directly sounds very useful both for right click and a controller. I'll add it to my list of todos.

Thank you for the suggestion
 
Another sneak peak at v1.1 with a gif that shows both drag & drop with mouse and "move" with controller working in the same grid.

attachFull694151


There's still room for improvements and many, many more features, so I hope you can be patient :)
 
Great job, I use UCC and UIS.
They both offer great possibilities.

If this is possible would it be possible to have an example of UCC integration with a weapon damage update?

As in the UIS demo scene or other solution

I did not find the code below to try to adapt it

C#:
protected virtual void ApplyUpgradeStatChanges()
        {
            m_UpgradeableItemAmount.Item.name = GetFullItemWithSlotsName(m_UpgradeableItemAmount.Item, m_Slots);
          
            int constBoost = 0;
            float multBoost = 0;
            for (int i = 0; i < m_Slots.Count; i++) {
                constBoost += m_Slots[i].Item?.GetAttribute<Attribute<int>>("BoostConstant")?.GetValue() ?? 0;
                multBoost += m_Slots[i].Item?.GetAttribute<Attribute<float>>("BoostMultiplier")?.GetValue() ?? 0;
            }
          
            var attackAttribute = m_UpgradeableItemAmount.Item.GetAttribute<Attribute<int>>("Attack");
            if (attackAttribute != null) {
                var baseAttack = m_UpgradeableItemAmount.Item.GetAttribute<Attribute<int>>("BaseAttack").GetValue();
              
                attackAttribute.SetOverrideValue(baseAttack+constBoost+(int)(baseAttack*multBoost));
            }
          
            var defenceAttribute = m_UpgradeableItemAmount.Item.GetAttribute<Attribute<int>>("Defence");
            if (defenceAttribute != null) {
                var baseDefence = m_UpgradeableItemAmount.Item.GetAttribute<Attribute<int>>("BaseDefence").GetValue();
              
                defenceAttribute.SetOverrideValue(baseDefence+constBoost+(int)(baseDefence*multBoost));
            }
        }
      
        public static string GetFullItemWithSlotsName(Item item, ItemAmounts itemSlots)
        {

            if (itemSlots == null || itemSlots.Count == 0) { return item.ItemDefinition.name; }
              
            string prefix = "";
            string suffix = "";
            var count = 0;
            for (int i = 0; i < itemSlots.Count; i++) {
                if (itemSlots[i].Item == null) { continue;}

                count++;
                var itemPrefix = itemSlots[i].Item.GetAttribute<Attribute<string>>(DemoInventoryDatabaseNames.UpgradeItem.prefix).GetValue();
                if (!string.IsNullOrWhiteSpace(itemPrefix)) {
                    prefix += itemPrefix + " ";
                }
                var itemSuffix = itemSlots[i].Item.GetAttribute<Attribute<string>>(DemoInventoryDatabaseNames.UpgradeItem.suffix).GetValue();
                if (!string.IsNullOrWhiteSpace(itemSuffix)) {
                    suffix += itemSuffix + " ";
                }
            }

            if (count == 0) { return item.ItemDefinition.name;}

            return $"{prefix} {item.ItemDefinition.name} {suffix} (+{count})";
        }
 
Hello,

I'm back :), thanks again for the feedback.

Another subject, I would like my UCC by pressing 1 or 2 to be able to switch between a primary weapon and a secondary weapon.

In the inventory, he would have several primary weapons and several secondary weapons but only one of each could be equipped.

Because currently, I have several item definitions that activate one behind the other.

But if for example I have more than 100 weapons. To equip the last one I have to do next next ... or I have to open the inventory and equip it

It looks a bit like the demo where the character can equip only one sword or magic staff
 
Hi @Chris

If possible I would appreciate if you could create new threads when asking those questions because I'm sure many other users might have the same questions, and may miss it if it's hidden in the WIP thread.

Coming back to your question there's actually no way of doing this out of the gate. I've added it to my todo list, we'll be making an update very soon so this feature won't make it in time, It'll probably take a few weeks before it's out.

It shouldn't be hard too hard to implement yourself though. The idea is that you would remove the previous/next equip abilities from the UCC character. Then you could have a custom script that listens to the "OnItemActionEquipUnequip" event. You can then know what item was equipped from the inventory menu. If the item is a primary weapon you replace your reference to the primary weapon and if it's a secondary weapon you replace your secondary reference. Then you can set the input for your custom script that uses the "OnItemActionEquipUnequip" to equip/unequip your primary and secondary weapon

If you are unfamiliar with how the UCC event system works make sure to check this out: https://opsive.com/support/documentation/ultimate-character-controller/programming-concepts/events/
 
Hi @Sangemdoko,

Sorry I'm creating the new thread.

Thank you again for the feedback and the responsiveness.

I will try to put something in place while looking forward to the update.
 
Hello everyone, it's been a while since I posted here. But I've been making some progress with the Item Shape Grid.

I thought some of you might want to see a gif in action:

ItemShapeGrid_low_res_29_12_2020.gif

It shows items with shapes being dragged from one inventory to another one.

I have a lot of work planned to improve Item Shape Grids, for example an option to have a shape grid for each item collection, so I hope you are looking forward to this "new" feature.
 
Hi again!

I added a new feature that is coming to v1.1.4, it was requested by a few people. Dropping Items by drag and dropping them from the inventory in the scene! I'm sure it will go great with improve Item Shape Grid.

ItemDropInScene_MousePosition_lowres_14_01_2021.gif

It uses the ItemViewDropHandler and an ItemViewSlot that covers the entire screen view. The Item View Slot is used to detect the drop event and preview the hover.
 
Top