Getting Start
This Plugin in Blueprint is separated by categories, the main categories being "Universal Interaction System", "UIVS". In these categories you will find all the plugin features available in Blueprint.
Last updated
This Plugin in Blueprint is separated by categories, the main categories being "Universal Interaction System", "UIVS". In these categories you will find all the plugin features available in Blueprint.
Last updated
After download the plugin, check if the plugin is enabled.
After making sure the plugin is activated, you need add Inventory Component to your character.
You can edit Inventory settings in Details tab
Inventory Size
Defines the size of the inventory. Set this value to -1 for an infinite inventory (i.e., no limit on the number of items).
Use Weight
Indicates whether the inventory system will use a weight system to limit the player's carrying capacity.
Max Weight Supported
Specifies the maximum weight that the player can carry (if Use Weight = true).
The unit of measurement is arbitrary and can be defined by the developer.
Set this value to limit the player's total weight capacity.
You will also need to create a widget to access the inventory, in the plugin's Example Content we already have a great widget, you can modify it or create your own by following:
To add it, just call it in the character's Begin Play (or anywhere else you use to create a HUD)
We will also add an interaction event so that when we press a key it opens the menu.
Create a actor and add UIES_InventoryInterface to him.
To find Interface Events, go to the left part of your Blueprint and find the Interfaces tab.
On Add Item
Triggered when an item is added to the inventory.
InvComponent: The Inventory Component where the item is added.
NewQuantity: The new quantity of the item after addition.
On Start Use Item
Triggered when an item starts being used.
InvComponent: The Inventory component that contains the item being used.
Returns: A boolean indicating if the item usage successfully started (true) or failed (false).
On End Use Item
Triggered when an item stops being used.
InvComponent: The Inventory component that contains the item being stopped.
Returns: A boolean indicating if the item usage was successfully stopped (true) or failed (false).
On Remove Item
Triggered when an item is removed from the inventory.
InvComponent: The Inventory component from which the item is removed.
NewQuantity: The new quantity of the item after removal.
bWasDropped: Indicates whether the item was dropped (true) or simply removed (false).
Get Item Info by Object
Retrieves the Item Info structure for the item associated with the calling Object.
Returns: The Item Info containing data about the item (e.g., quantity, weight, etc.).
Now that you've configured the character and added the interface, let's create the Item Info!
Let's create a new variable of type Item Info
And so we don't forget, let's connect this variable to the Get Item Info by Object Interface function
Now going back to the variable, we have some customization options.
Item ID
A way for the system to identify items, you can use this as the item name (not recommended), but if you don't want to, just change the DisplayName property.
!WARNING! Each type of item MUST have a specific ID, the system interprets any item with the same ID using equality.
So if a water bottle and a sword have the same ID, for the system they are the same thing.
Display Name
The display name of the item. This is shown in UI or HUDs.
Tooltip
Tooltip information for the item, typically displayed when the user hovers over it.
Description
A more detailed description of the item, often used in inventory or details panels.
Remove Item on Use
Determines if the item should be removed after it is used (consumables).
Or it must be kept in the inventory (like a sword).
Can be Dropped
Defines whether an item can be dropped or not.
!WARNING! If marked as false, the item can only be removed after use.
Quantity
Current quantity of the item. Minimum is 1.
Max Quantity
Maximum quantity allowed for the item. Setting this to -1 means infinite quantity is allowed.
Use Weight
Flag indicating whether the item's weight system should be used (affects inventory calculations).
Use Mesh Mass
Flag indicating whether the item should use its mesh's physical mass for weight calculations.
Individual Item Weight
The weight of a single instance of this item. Only used if Use Mesh Mass is false.
Now that you've done the basics for everything to be in harmony, you need to add a function to this item. Let's make a water bottle!
In the example content of the plugin, it already has a widget that serves as an inventory, and it also has a water variable, so we only need to add value to this variable when we use the item.
Ready! Now our item does something when we use it.
It is also possible to override the On Add Item function to define something to do when the item is added to the inventory.
We can, for example, attach the item to the player, disable its collision and remove it from view.
We can add a collision to our item, or simply change the collision of our mesh to overlap the player, ensuring that when the player bumps into the item it is automatically added to the inventory.
Simply finished! All we need to do is add the items to the map and press play.
But how do we get this item? Well, that's up to you, but let's make a basic interaction system for this item. (I recommend using an interaction plugin, like )