Core Concepts

avatar`
Yuewu(罗传月武)
Updated: Jul 23, 2025

Overview

This document helps you quickly understand the core concepts and functionalities of the Generic Inventory System (GIS).

Items

Item Definition

ItemDefinition is a data asset. Creating a new item definition is equivalent to creating a new asset of this type. It contains static data and can include ItemFragment data fragments to support complex data structures.

Item Data Fragments

ItemFragment is a data object attached to an item definition, allowing users to add custom data fragment types to extend static data.

Item Definition Schema

ItemDefinitionSchema is a data asset used for validating item definitions. You can specify schemas in Project Settings to enforce configuration rules (e.g., required data fragments and their order).

Item Instance

A single ItemDefinition can generate multiple ItemInstance objects at runtime. Instances can be created, destroyed, or saved/loaded. An instance provides access to its definition and supports dynamic data changes (e.g., enhancements or stat modifications) during gameplay.

Item Attributes

Each ItemInstance can store a set of float or int attributes identified by GameplayTags, supporting saving/loading and network replication.

Inventory

Inventory Component

GIS_InventorySystemComponent manages item instances through one or more item collections. An Actor typically has one inventory component. In-game item interactions (e.g., purchasing from shops, picking up items, or looting enemy relics) are essentially data exchanges between item collections of different inventory components. Actions like organizing a backpack or equipping weapons involve item data interactions and sorting within collections of the same inventory component.

Item Collection Definition

ItemCollectionDefinition refers to the static configuration of item collections, defining properties like Tags and restrictions.

Item Collection

An inventory can contain multiple types of ItemCollection, each holding multiple item stacks. Item stacks can exchange data between collections within the same inventory or with collections in other inventories (e.g., purchasing an item from a shop inventory to a player’s inventory).

Item Stack

An ItemStack is an element in an item collection, represented as a simple struct that references the corresponding ItemInstance, its quantity, and its position in the collection.

Item Info

ItemInfo is a temporary struct used to pass item-related information during operations, such as the owning collection, quantity, and corresponding item instance.

Equipment

Equipment Overview

Certain items have a physical presence in the game world (e.g., weapons, helmets, armor) and are referred to as equipment in GIS.

Equipment Instance

EquipmentInstance is a UObject or Actor implementing the GIS_EquipmentInterface interface, handling equipment logic such as adding/removing skills or game effects and spawning/destroying equipment Actor objects.

Equipment Actors

UObject-based equipment instances can be associated with one or more Actor objects for physical representation, such as a weapon or a pet Actor spawned to assist in combat when equipped.

Equipment System Component

GIS_EquipmentSystemComponent tracks item changes in specific inventory collections, automatically equipping or unequipping instances based on the item’s equipment data, and manages the creation, activation, and destruction of equipment instances.

Currency and Shop

Currency Definition

GIS_CurrencyDefinition is a static data asset used to define currency types.

Currency System Component

GIS_CurrencySystemComponent is a container for managing and tracking currency.

Shop System Component

GIS_ShopSystemComponent integrates the currency and inventory systems to handle in-game transaction logic.

Core Concepts

Inventory Subsystem

GIS_InventorySubsystem handles the underlying operational logic of GIS, serving as a wrapper for the Inventory Factory. Typically, users do not need to interact with this component directly.

Inventory Factory

GIS_InventoryFactory is a customizable class that allows control over low-level operations such as item creation, duplication, and serialization.

logo_small
YuewuDev

© Yuewu @2025. All rights reserved.

Core Concepts | Unreal Engine - Generic Inventory System | Yuewu's Coding Journey