Inventory Grid and Item Shape Grid on the same panel

manscom

Member
hi

I want to use both of the inventory grid and item shape grid on the inventory menu panel, for that , I want to keep the weapons on the inventory grid and the consumable items keep on the item shape view, like the image below.
螢幕截圖 2021-07-11 下午5.23.02.png

so I used item info item collection and category filter for this case, it works for the inventory grid for only storing the weapon, but using the same way seems does not work for the item shape grid due to it keeps asking for item grid data for the items that should not belong to that grid, for example I have also setup treasure items and the puzzle items on other inventory grid and that also cause those item auto delete from the item collection in run time.螢幕截圖 2021-07-11 下午5.41.53.png
I wonder if I have done something wrong with the filter because I only use the show item category for the commutable item due to it works for the first grid but not the second one, please assist me for this.
螢幕截圖 2021-07-11 下午5.42.56.png
Thank you!
Man
 
This is slightly more complicated than you would think.

The ItemShapeGrid will prevent items to be added if they do not fit in the itemCollection. There's a way to turn that off, but 99% of the time that's not what you want to do since items that do not fit in the grid shouldn't be added when you pick them up.

The Filer you added on the ItemShapeGrid will prevent items to be added to the itemCollection too (if I remember correctly).

It would be much easier, and better organized, if you used a different ItemCollection for each of those Containers. So an ItemCollection for the Weapons, and another for your consumables. The issue is that you can't have both be your main itemCollection.

This is a limitation that I previously didn't take into account. While working on the Adventure Kit I thought of a solution. Its called TransactionItemCollection. Essentially its an ItemCollection that sends item to the correct place, its used as a transaction and it doesn't really hold any items.

To work it tries to add the item in all the itemcollections you specify in order and if it doesn't fit in one it tries to add it to the next. To check if it fits in an itemcollection or not I use an new ItemRestriction object.

unfortunalty all of this code is not yet available. I could send you the code, but it might not compile if it has external dependencies. You could either wait for the update, which is planned around the end of this month, or you can try to implement the solution I mentioned above yourself. Doing your own implementation of the TransactionItemCollection might give you more freedom in the future too.

I'm sorry for not taking into consideration this use case before, i hope this helps a bit
 
I think now I will use the inventory grid for both grids ,this is much easier for me. I will still wait for the new upgrade to see if I would like to change it back. thanks for you statement.
 
Top