Inventory System Concepts

Terminology
Item Definition
An item definition is a data asset. Creating a new item definition is equivalent to creating a new instance of the item definition class. Essentially, item definitions are static data that can incorporate item data fragments to achieve complex data structures.
Item Definition Schema
The item definition schema is a data asset used in editor for data validation. Each item definition can be associated with a schema to constrain the configuration specifications of the item definition (such as which data fragments are included, the order of data fragments, etc.).
Item Instance
An item definition can generate multiple item instances during gameplay. Instances can be created, destroyed, or saved. Through an item instance, one can retrieve its definition. Item instances can also undergo data changes during gameplay (such as enhancements or value changes).
Item Information
Item information is a temporary structure used to pass item-related information across different operations, such as its belonging collection, quantity, and corresponding item instance.
Inventory
The inventory component organizes and manages item instances through one or more item collections. An Actor typically possesses one inventory component. In games, players acquire items through shop systems, picking them up from the ground, or obtaining relics by defeating enemies. These mechanisms can essentially be understood as item data exchanges between two different inventory components. Actions like organizing a player's backpack or equipping weapons are fundamentally interactions and sorting of item data between different collections within an inventory component.
Inventory Collection
An inventory can contain multiple item collections, each of which can include multiple item stacks. Different item stacks can exchange information between different collections within the same inventory, as well as with collections in other inventories (e.g., purchasing an item from the shop inventory to the player’s inventory).
Item Stack
Each element in an item collection is an item stack, which is simply a structure used to store the corresponding item instance, their amount, and their position within the collection.
Inventory Subsystem
The inventory subsystem is responsible for creating item instances based on item definitions at a foundational level. The actual creation logic is managed by the Item Factory. Generally, you do not need to understand this part.
Equipment
Some items have physical representations in the game world, such as weapons, helmets, and armor. These tangible items are referred to as equipment in the GIS. The equipment component monitors changes to equipped items in specific collections within the inventory and creates or destroys physical instances of the equipment based on the equipped items.