After deleting the items in the Inventory ItemCollection, When I run the game the item is back

yuukimoka

New member
Q1 After deleting the items in the Inventory ItemCollection,
When I run the game the item is back

Q2 How to Set to not equip immediately after picking up an item
 

Sangemdoko

Moderator
Staff member
Q1)
Items can be added to a inventory itemCollection directly in the collection or through a loadout collection. Make sure you are removing the items in the loadout if you don't want those.

If you have an Inventory Saver you should be allowed to choose how the item should be added to the inventory (override or additive)

Q2)
I looked into this and it seems we are missing the option to not equip on pickup.
@Justin , can you confirm that this is not possible, and if it is the case can it be added to the item pickup, the pickup ability and/or the bridge component?
 

yuukimoka

New member
Q1)
Items can be added to a inventory itemCollection directly in the collection or through a loadout collection. Make sure you are removing the items in the loadout if you don't want those.

If you have an Inventory Saver you should be allowed to choose how the item should be added to the inventory (override or additive)

Q2)
I looked into this and it seems we are missing the option to not equip on pickup.
@Justin , can you confirm that this is not possible, and if it is the case can it be added to the item pickup, the pickup ability and/or the bridge component?



Q3 To run a script when using an item like a custom item in like DevdogInventoryPro

Q4 Inventory grid UI To limit the number of items you have
 

Sangemdoko

Moderator
Staff member
Q3) There are two ways you can either use ItemActions or UsableItemObject/ItemObjectActions.

ItemActions are used for UI item actions mostly. For example Equip/Unequip, Consume, Drop, etc... To make your own you simply need to make a class that inherits from the ItemAction class. You can look the itemActions in the demo for examples. You can read more about it here:

UsableItemObjects are used for equipped item if you are using UCC though you may want to use the the UCC UsableItem because it is a lot more advanced.

Q4) The UI won't limit the amount of item in your inventory. That is done directly on the Inventory itself.

You can use an itemCollectionRestrictionObject and set it on your inventory. You can limit total size, stack size, the item that are allowed to be added or not, etc...
You can learn more here https://opsive.com/support/documentation/ultimate-inventory-system/inventory/item-restrictions/
if that's not enough control for you and you would something a lot more custom you can extend the ItemCollection class and set it in the inventory component using the item collection type drop down.
 

yuukimoka

New member
Q3) There are two ways you can either use ItemActions or UsableItemObject/ItemObjectActions.

ItemActions are used for UI item actions mostly. For example Equip/Unequip, Consume, Drop, etc... To make your own you simply need to make a class that inherits from the ItemAction class. You can look the itemActions in the demo for examples. You can read more about it here:

UsableItemObjects are used for equipped item if you are using UCC though you may want to use the the UCC UsableItem because it is a lot more advanced.

Q4) The UI won't limit the amount of item in your inventory. That is done directly on the Inventory itself.

You can use an itemCollectionRestrictionObject and set it on your inventory. You can limit total size, stack size, the item that are allowed to be added or not, etc...
You can learn more here https://opsive.com/support/documentation/ultimate-inventory-system/inventory/item-restrictions/
if that's not enough control for you and you would something a lot more custom you can extend the ItemCollection class and set it in the inventory component using the item collection type drop down.

Q5 To localize UIS item names in other languages
 

yuukimoka

New member

Sangemdoko

Moderator
Staff member
Which scriptable object are you talking about? If you are talking about the scriptable object item cateogry or item definition anem, the way I would do it is use the scriptable object name as a string key.

As mentioned before, localization is not officially supported so there may be some quirks. In the future when I get to implement the integration things should go smoother. Of course it is understandable if you cannot wait a few months
 

yuukimoka

New member
Which scriptable object are you talking about? If you are talking about the scriptable object item cateogry or item definition anem, the way I would do it is use the scriptable object name as a string key.

As mentioned before, localization is not officially supported so there may be some quirks. In the future when I get to implement the integration things should go smoother. Of course it is understandable if you cannot wait a few months

I want to localize the red frame part.
sc1.PNG
 

Sangemdoko

Moderator
Staff member
In the documentation of the localisation part 8: https://docs.unity3d.com/Packages/com.unity.localization@0.8/manual/QuickStartGuide.html
It shows how to display localize strings.

This might also be useful: https://docs.unity3d.com/Packages/com.unity.localization@0.8/manual/Scripting.html

You will need to create custom scripts for the description such that it uses the description attribute value as the key for the localized table, instead of displaying the value directly. Same with the item name.
 
Top