Item Slot Collection

ItemSlotCollection stores items in a fixed-slot structure, ideal for "equipment" collections.

通用库存系统.封面
罗传月武(YueWu)

Author

罗传月武(YueWu)

专注游戏开发和Web技术。

Created: Jun 23, 2025Updated: Sep 15, 2026

Table of contents

Item Slot Collection

ItemSlotCollection stores items in a fixed-slot structure, ideal for "equipment" collections (e.g., character gear, hotbars, skill slots, etc.).

This collection has a fixed size, with each item stack corresponding one-to-one with an "item slot." Examples include:

  • Placing a knife in the melee weapon slot.
  • Placing a gun in the ranged weapon slot.
  • Placing an accessory in the accessory slot.
  • Placing a skill in the skill slot.
  • Placing a pet in the pet slot.
  • Placing armor in the armor slot.

An ItemSlotCollection definition includes the following:

槽集合.概览

Key Settings:

  • SlotDefinitions: Defines all available item slots and the collection’s size.
  • bNewItemPriority: If a new item cannot stack with an existing one, should it replace the existing item?
  • bTryGivePrevItemToNewItemCollection: Should the replaced item be returned to the source collection of the new item?
  • EquipmentGroup: Slots can be grouped by parent tags.

Item Slot Definition

The SlotDefinitions array allows you to add an unlimited number of item slot definitions. Each slot definition configures static data, such as background, allowed item types/tags, etc.

Example:

槽集合.槽定义

This example defines seven ItemSlotDefinition entries, allowing the collection to hold two primary weapons, two secondary weapons, two accessories, and one bag.

Designing Your Slot Collection

GIS provides game designers with ample flexibility to create diverse "slot collections."

You can:

  • Use a single ItemSlotCollection named "Equipped" to define all items a player can equip.
  • Use multiple ItemSlotCollection instances, one for a weapon list, one for armor, one for equipped skills, etc. The complexity depends on your project’s needs.

Collection API

Loading Blueprint

Initializing BlueprintUE renderer...

The slot collection defines only the relationship between item slots and items. Logic for what happens when items are placed into or removed from slots can be controlled by the equipment system.

You can listen for changes in the collection’s item stacks and respond to items being added to or removed from slots.