Built-in Item Actions

There are a few built-in Item Actions which can be used out of the box. Some of them require a specific setup to work as expected.

Simple Item Actions

Simple Item Actions are actions which trigger as soon as the action is clicked in the inventory menu.

Debug Item Action

This is default Item Action. It prints a log statement in the console with the values of all the attributes on an item. It can be useful when debugging your items.

Debug Item Object Action

Similar to Debug Item Action but it prints logs for both the Item Object and the Item Info, very useful for debugging.

Drop Item Action

The drop Item Action has a reference to an Item Pickup Prefab. That prefab requires Item Pickup component.
The item is dropped around the item user game object, or if it does not exist, it will be dropped around the inventory game object.

The Opsive Character Controller integration includes a Item Drop Item Action should be used instead of the default Drop Item Action.

Duplicate Item Action

Duplicates the Item and adds it to the Inventor of the Item Info.

Move To Collection Item Action

This Item Action is used to move an item from one item collection to another within the same inventory. This can be used to equip and unequip items by moving them from the main item collection to the equipped item collection.

The Opsive Character Controller integration includes a Equip Unequip Item Action which should be used instead of the default Move To Collection Item Action

Remove Item Action

Remove an Item from the inventory (does not drop, simply deletes the item from the Inventory of the Item Info).

Use Item Action Set Attribute

Use Item Action Set Attribute is an item action that calls an item action on an Item Action Set that was set on an Item as an Attribute. It also allows you to set a cooldown automatically to reuse that item, which can be used with a Cooldown Item View to show the cooldown on the item UI.

Multi Item Action

Allows you to set multiple item action into one, combining simple item action to create complex ones without writing code.

 

Item Action With Panels

These are Item Actions which use the abstract Item Actions with panels above.

Quantity Drop Item Action

This Item Action function similarly to the Drop Item Action except it shows a Quantity Picker Panel for the user to choose the amount of items to drop.

The Opsive Character Controller integration includes a Quantity Item Drop Item Action which should be used instead of this one.

Assign Hotbar Item Action

This item action allows the player to assign the selected item to a slot on the item hot bar.
The Async Func Action Panel Prefab must have a Async Func Action Panel Int component or any component that inherits the Async Func Action Panel <int> class.

To invoke the action, the Item User must either inherit the Item Hotbar Owner interface or have a neighboring component which inherits the Item Hotbar Owner interface.

In the demo the PlayerCharacter component is both an Item User and an Item Hotbar Owner.

The UltimateInventorySystemBridge component in the Opsive Character Controller integration is the Item User and the Item Hotbar Owner component should be added as a neighboring component.

Item Action With Confirmation Pop Up

This item action allows you to nest another Item Action and ask the player to confirm his choice before executing the nested Item Action.

Move Item Action

Uses the Item View Slot move Cursor component on the Item View Slots Container to move an Item form one Item View Slot to another.

Open Other Item View Slot Container Item Action

This item Action can be used to open another Panel with an Item View Slot Container and listens to the Item Selected. This Item Action can be used to search and select an Item from an inventory for example.

 

Abstract Item Actions

The are abstract classes which are inherited by complex item actions. These are usually Item Actions which wait for the input from the player.

Item Action With Quantity Picker Panel

This abstract Item Action allows to invoke an item action after waiting for the player to choose an amount in a quantity picker panel.
This Item Action requires a Quantity Picker Panel Prefab, which is pooled and spawned under the Action Panel. The method InvokeWithAwaitedValue can be overridden to perform the action:

/// <summary>
/// Invoke with the action with the awaited value. 
/// </summary>
/// <param name="itemInfo">The itemInfo.</param>
/// <param name="itemUser">The item user.</param>
/// <param name="awaitedValue">The value that was waited for.</param>
protected abstract void InvokeWithAwaitedValue(ItemInfo itemInfo, ItemUser itemUser, int awaitedValue);
Item Action With Async Func Action Panel

This abstract generic Item Action allows to invoke an item action after waiting for the player to choose value of type ‘T’ in a list of options.
This Item Action requires a Async Func Action Panel Prefab, which is pooled and spawned under the Action Panel. he method InvokeWithAwaitedValue can be overridden to perform the action:

/// <summary>
/// Invoke with the action with the awaited value. 
/// </summary>
/// <param name="itemInfo">The itemInfo.</param>
/// <param name="itemUser">The item user.</param>
/// <param name="awaitedValue">The value that was waited for.</param>
protected abstract void InvokeWithAwaitedValue(ItemInfo itemInfo, ItemUser itemUser, T awaitedValue);

Item Object Action

Lets you set an Item Object using “SetItemObject” function.

Item View Slots Container Item Action

lets you reference the Display Panel and the Item View Slots Container where the Item Action was called from. This is particularly useful when the item index in the Item View Slots Container is important for the Item Action.