Skip to main content

Introduction to Inventory (Early Access)

Last updated on April 16, 2024
note

The Inventory service is currently available as an Early Access feature to AGS Premium clients.

Introduction

The AccelByte Gaming Services (AGS) Inventory service is designed to allow players to store and manage items collected throughout the game that can be done through various ways such as looting, crafting, trading, and gifting.

Other than supporting players to have flexibility to manage items, Inventory will also work with E-commerce to allow item purchasing and let you integrate the store catalog as the main source for item metadata.

You can use the Inventory service to:

  • Allow your player to have multiple storage with a variety of slot capacity (e.g., backpack, chest, storage, bag, etc.)
  • Allow your player to manage and organize their own items as follows:
    • Move items between inventories
    • Sort and order items within inventory

Key concepts

To make sure you can have seamless integration with Inventory service, it is important to understand the service's key concepts that will be used throughout the documentation.

Inventory configuration

Inventory configuration is a set of information and rules set by the admin to determine the type of inventory that the game will support.

Manage inventory

This section covers the manage inventory actions you can do with the Inventory service, which are viewing, consuming, and removing items.

View inventory

You can allow players to view their inventories, which can be multiple depending on the configuration.

Multiple inventories inAGS

Consume item

Consuming items refer to when players use items from their inventory. Usually, the items can only be used once and their effects are often temporary. For example, Health Potions, Mana Potions, Food, etc. Consuming items will decrease the item's quantity. If the item has only one quantity, the item will be removed from the player's inventory upon consumption and will free up the slot.

Remove item

Removing items refers to taking items out of a player’s inventory. You can allow your players to remove items from their inventory, which they cannot undo.

Move items between inventory

You can enhance the gameplay and strategic decision-making experience of your players by allowing them to move items between their inventories so that they can manage the items more efficiently.

Move items between inventory in AGS

Acquire items

The server can perform server authoritative actions to grant items to player inventory. For example, the server can grant items to the player on action done such as kill monster, loot, etc.

Grant inventory

You can grant a new inventory to the player as long as the number of inventory with the same code does not exceed the maximum instances per user set in the inventory configuration.

Item custom attributes

Custom attributes allow you to store additional information for an item within inventory. There are two types of additional information: customAttributes and serverCustomAttributes.

Custom attributes

Custom attributes can be updated by your players and your game server. This is suitable if you want to allow your players to store additional information related to the items. The attribute stored usually does not not impact the gameplay mechanics. For example: Item style/cosmetic.

Inventory custom attributes in AGS

Server custom attributes

Server custom attributes can only be modified by a game server with the required permissions. You can update attributes that will impact gameplay experience, such as item stats modifier. This attribute will be stored in the serverCustomAttributes field, for example, items with additional damage, critical, durability, etc.

Inventory Server custom attributes in AGS

Item tags

The game client and the game server can add tags to items for for the purpose of tagging and grouping them. For example, by type, rarity, function, or any other relevant criteria. Tags are predefined and only admins can add or modify the predefined tags. Item tagging supports both server and client authoritative actions.

  • Server can only add and remove tags from items from the server.
  • Client can add and remove tags from items from both the server and client.

Inventory item tags in AGS

Slots and quantity

Slot offers more flexibility to manage player inventory items. This feature allows you to stack the same items in the same slot or distribute it in multiple slots. Meanwhile, item quantity is tied to a specific item and is different from slots. An item can take up one slot and have multiple quantities. The same item can take up multiple slots and have different quantities in each slot. You can utilize slot and quantity to flexibly store the items according to your game use cases.

Inventory slot inAGS

Next steps

Learn how to manage inventory configurations and your players' inventories using the Admin Portal, your game client, and your game server. See the following articles: