Advanced Inventory & Equipment System¶
Comprehensive data-driven inventory and equipment management for Unreal Engine with multiplayer support.
System Overview¶
The Mountea Advanced Inventory & Equipment System provides complete item management functionality including storage, equipment handling, UI components, and network replication. Built with modularity and extensibility in mind.
Core Systems¶
Inventory System¶
Complete item storage and management system with:
- Core functionality - Basic inventory operations
- Item Instances - Runtime item instances and data structures
- Item Templates - Static item definitions and properties
- Categories - Item classification and organization
- Rarity System - Visual and economic item tiers
- Search & Filtering - Advanced item queries
- Notifications - User feedback system
Equipment System¶
Advanced equipment management featuring:
- Equipment & Attachment System - Equipment slots and management & Dynamic item attachment with sockets
User Interface¶
Complete widget framework with:
- UI Overview - Widget interfaces and base classes
- Inventory UI - Main inventory interface components
- Grid System - 2D spatial inventory layouts
- Item Widgets - Individual item presentation
- Item Preview - 3D item visualization
- Slate Elements - Custom UI controls
Configuration¶
System-wide settings and data:
- Settings - Project configuration and themes
- Inventory Types - Different inventory behaviors
- Replication - Multiplayer synchronization
Key Features¶
๐ฆ Inventory Management
- Stackable items with quantity tracking
- Durability system with degradation
- Fast item search and filtering
- Efficient network replication
โ๏ธ Equipment System
- RPG-style weapon switching
- Two-handed vs dual-wield logic
- Socket-based attachments
- Gameplay tag filtering
๐ฎ User Interface
- Grid-based inventory layouts
- Drag & drop functionality
- 3D item previews
- Customizable themes
๐ Multiplayer Ready
- Delta compression replication
- Authority validation
- Client prediction support
- Efficient bandwidth usage
Quick Start¶
- Setup: Configure system in Settings
- Items: Create templates using Item Templates
- UI: Implement widgets with User Interface
- Network: Enable Replication for multiplayer
Architecture¶
Mountea Inventory & Equipment System - Architecture Design¶
Table of Contents¶
- High-Level System Architecture
- Component Relationship Diagram
- Class Hierarchy
- Data Flow Diagrams
- Interface Definitions
- Core Struct/Class Definitions
1. High-Level System Architecture¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MOUNTEA INVENTORY & EQUIPMENT SYSTEM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONFIGURATION LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ UMounteaAdvancedInventorySettings โ
โ โโ UMounteaAdvancedInventorySettingsConfig โ
โ โ โโ Inventory Types (Player, NPC, Storage, Merchant, Loot, Specialized) โ
โ โ โโ Item Rarities โ
โ โ โโ Item Categories โ
โ โ โโ UI Classes โ
โ โ โโ Notification Configs โ
โ โโ UMounteaAdvancedEquipmentSettingsConfig โ
โ โโ Equipment Slot Definitions โ
โ โโ Attachment Rules โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DATA LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Templates (Data Assets): โ
โ โโ UMounteaInventoryItemTemplate โ
โ โโ UMoneyItemTemplate : UMounteaInventoryItemTemplate โ
โ โโ UCraftingRecipeTemplate : UMounteaInventoryItemTemplate โ
โ โโ UModifierTemplate : UMounteaInventoryItemTemplate โ
โ โ
โ Runtime Instances (Structs): โ
โ โโ FInventoryItem โ
โ โโ FInventoryItemArray (FastArraySerializer) โ
โ โโ FEquipmentSlot โ
โ โโ FEquipmentSlotArray (FastArraySerializer) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CORE LOGIC LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ INVENTORY SUBSYSTEM โ โ EQUIPMENT SUBSYSTEM โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโ UInventoryManagerComponent โโ UEquipmentManagerComponent โ
โ โ (Database) โ (Attachment Database) โ
โ โ โ โ
โ โโ Operations: โโ Operations: โ
โ - Add/Remove Items - Equip/Unequip โ
โ - Modify Quantity - Get Slots โ
โ - Find/Get Items - Validate Equipment โ
โ - Sort/Filter - Save/Load โ
โ - Save/Load โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CRAFTING SUBSYSTEM โ โ RECIPE SUBSYSTEM โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโ UCraftingComponent โโ URecipeKnowledgeComponent โ
โ โ (Recipe Execution) โ (Recipe Storage) โ
โ โ โ โ
โ โโ Operations: โโ Operations: โ
โ - Can Craft - Learn Recipe โ
โ - Craft Item - Forget Recipe โ
โ - Validate Ingredients - Get Known Recipes โ
โ - Execute Recipe - Is Recipe Known โ
โ - Save/Load โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NOTIFICATION SYSTEM โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโ UNotificationManagerComponent โ
โ (Event Processing) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INTERACTION LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PICKUP/DROP SYSTEM โ โ LOOTING/VENDOR SYS โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโ IMounteaPickupInterface โโ IMounteaLootableInterface โ
โ โโ IMounteaDroppableInterface โโ IMounteaVendorInterface โ
โ โ
โ Operations: Operations: โ
โ - Pickup Item - Request Loot Access โ
โ - Drop Item - Transfer Items โ
โ - Spawn Pickup Actor - Buy/Sell โ
โ - Calculate Price โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRESENTATION LAYER (UI) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ INVENTORY UI โ โ EQUIPMENT UI โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโ UInventoryUIComponent โโ UEquipmentUIComponent โ
โ โ (UI Bridge) โ (UI Bridge) โ
โ โ โ โ
โ โโ Widget Hierarchy: โโ Widget Hierarchy: โ
โ - Wrapper Widget - Equipment Panel โ
โ - Inventory Widget - Equipment Slots โ
โ - Item Grid - Quick Access Slots โ
โ - Item Slots - Slot Tooltips โ
โ - Item Widgets โ
โ - Categories โ
โ - Tooltips โ
โ - Action Menus โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NOTIFICATION UI โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโ Notification Widgets โ
โ - Container โ
โ - Notification Items โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REPLICATION LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Server Authority: โ
โ - All inventory operations โ
โ - All equipment operations โ
โ - Crafting execution โ
โ - Item transfers โ
โ โ
โ Client Prediction: โ
โ - Equipment visual attachment (with server confirmation) โ
โ - UI updates (with rollback on server rejection) โ
โ โ
โ Replication Method: โ
โ - FastArraySerializer for item arrays โ
โ - Delta replication for efficient bandwidth โ
โ - OnRep functions for client notification โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. Component Relationship Diagram¶
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ACTOR (Player/NPC) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ UInventoryManager โ โ UEquipment โ โ URecipeKnowledge โ
โ Component โ โ Manager โ โ Component โ
โ โโโโโโโโโโโโโโโโโโ โ โ Component โ โ โโโโโโโโโโโโโโโโโโ โ
โ Implements: โ โ โโโโโโโโโโ โ โ Stores: โ
โ - IInventoryInterface โ โ Implements: โ โ - Known Recipes โ
โ โ โ - IEquipment โ โ - Recipe States โ
โ Contains: โ โ Interface โ โ โ
โ - FInventoryItemArray โ โ - IAttachmentโ โ Operations: โ
โ โ โ Container โ โ - LearnRecipe() โ
โ References: โ โ โ โ - ForgetRecipe() โ
โ - EquipmentManager โโโโผโโผโโโโโโโโโโโโโ>โ โ - IsKnown() โ
โ - NotificationMgr โ โ โ โ - GetKnownRecipes() โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โ Contains: โ โโโโโโโโโโโโโโโโโโโโโโโ
โ โ - FEquipment โ
โ โ SlotArray โ โ
โ โ - Attachment โ โ
โ โ Slots โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ โ
โ โ โ
โโโโโโโโโโโโฌโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UCraftingComponent โ
โ โโโโโโโโโโโโโโโโโโโโโ โ
โ Implements: โ
โ - ICraftingInterface โ
โ โ
โ Requires: โ
โ - InventoryManager โ
โ - RecipeKnowledge โ
โ โ
โ Operations: โ
โ - CanCraft() โ
โ - CraftItem() โ
โ - ValidateIngredients()โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UI COMPONENTS LAYER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ UInventoryUIComponent โ โ UEquipmentUIComponent โ
โ โโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโโ โ
โ Implements: โ โ Implements: โ
โ - IInventoryUI โ โ - IEquipmentUI โ
โ Interface โ โ Interface โ
โ โ โ โ
โ References: โ โ References: โ
โ - InventoryManager โโโโผโโโโโโโโ>โ - EquipmentManager โโโโผโโโโโ
โ - InventoryWidget โ โ - EquipmentWidget โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โ โ
โผ โผ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Inventory Widget Tree โ โ Equipment Widget Treeโ โ
โ โโโโโโโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโโโ โ โ
โ - WrapperWidget โ โ - EquipmentPanel โ โ
โ - InventoryWidget โ โ - EquipmentSlots โ โ
โ - ItemGridWidget โ โ - QuickAccessSlots โ โ
โ - ItemSlotWidgets โ โ (tagged slots) โ โ
โ - ItemWidgets โ โ - SlotTooltips โ โ
โ - CategoryWidgets โ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ - TooltipWidgets โ โ
โ - ActionMenuWidgets โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ>โ UNotificationManager โ
โ Component โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Implements: โ
โ - INotificationInterface โ
โ โ
โ Operations: โ
โ - ProcessNotification() โ
โ - CreateNotificationWidget()โ
โ - QueueNotification() โ
โ โ
โ References: โ
โ - NotificationContainer โ
โ Widget โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INTERACTION INTERFACES โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Actor (with Pickup Interface) Actor (with Lootable Interface)
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
โ Pickup Actor โ โ Lootable Container โ
โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโโโ โ
โ Implements: โ โ Implements: โ
โ - IPickupable โ โ - ILootable โ
โ โ โ - IInventory โ
โ Contains: โ โ Interface โ
โ - ItemTemplate โ โ โ
โ - Quantity โ โ Contains: โ
โ - Mesh โ โ - InventoryManager โ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
Actor (with Vendor Interface)
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Vendor NPC โ
โ โโโโโโโโโโโโโโโ โ
โ Implements: โ
โ - IVendor โ
โ - IInventory โ
โ Interface โ
โ โ
โ Contains: โ
โ - InventoryMgr โ
โ - BuyMultiplier โ
โ - SellMultiplier โ
โโโโโโโโโโโโโโโโโโโโ
3. Class Hierarchy¶
3.1 Component Hierarchy¶
UActorComponent
โ
โโ UInventoryManagerComponent
โ โโ Implements: IMounteaAdvancedInventoryInterface
โ โโ Contains: FInventoryItemArray
โ
โโ UEquipmentManagerComponent
โ โโ Implements: IMounteaAdvancedEquipmentInterface
โ โโ Implements: IMounteaAdvancedAttachmentContainerInterface
โ โโ Contains: FEquipmentSlotArray, TArray<UAttachmentSlot*>
โ
โโ UCraftingComponent
โ โโ Implements: IMounteaCraftingInterface
โ โโ Requires: UInventoryManagerComponent, URecipeKnowledgeComponent
โ
โโ URecipeKnowledgeComponent
โ โโ Implements: IMounteaRecipeKnowledgeInterface
โ โโ Contains: TMap<FGuid, FRecipeKnowledge>
โ
โโ UInventoryUIComponent
โ โโ Implements: IMounteaInventoryUIInterface
โ โโ References: UInventoryManagerComponent
โ
โโ UEquipmentUIComponent
โ โโ Implements: IMounteaEquipmentUIInterface
โ โโ References: UEquipmentManagerComponent
โ
โโ UNotificationManagerComponent
โโ Implements: IMounteaNotificationInterface
โโ Contains: TArray<FInventoryNotificationData>
3.2 Data Asset Hierarchy¶
UPrimaryDataAsset
โ
โโ UMounteaInventoryItemTemplate (base template)
โ โ
โ โโ UMoneyItemTemplate
โ โ โโ Additional: CurrencyType (GameplayTag)
โ โ โโ Additional: AutoStack = true
โ โ
โ โโ UCraftingRecipeTemplate
โ โ โโ Additional: TMap<FGuid, int32> RequiredIngredients
โ โ โโ Additional: TMap<FGuid, int32> OutputItems
โ โ โโ Additional: bPermanentLearning
โ โ โโ Additional: CraftingStationTag
โ โ โโ Additional: SuccessRate
โ โ
โ โโ UModifierTemplate (for affectors/effects)
โ โโ Additional: ModifierType (GameplayTag)
โ โโ Additional: bIsReversible
โ โโ Additional: TArray<FGameplayEffectSpecHandle> Effects
โ โโ Additional: ModifierStats
โ
โโ UMounteaAdvancedInventorySettingsConfig
โ โโ Contains: Inventory Type Configs
โ โโ Contains: Item Rarities
โ โโ Contains: Item Categories
โ โโ Contains: UI Class References
โ โโ Contains: Notification Configs
โ
โโ UMounteaAdvancedEquipmentSettingsConfig
โโ Contains: Equipment Slot Definitions
3.3 Struct Hierarchy¶
FFastArraySerializerItem
โ
โโ FInventoryItem (existing)
โ โโ FGuid Guid
โ โโ UMounteaInventoryItemTemplate* Template
โ โโ int32 Quantity
โ โโ float Durability
โ โโ FGameplayTagContainer CustomData
โ โโ TMap<FGameplayTag, FGuid> AffectorSlots
โ โโ TScriptInterface<IInventoryInterface> OwningInventory
โ
โโ FEquipmentSlot (new)
โโ FGuid SlotGuid
โโ FName SlotName
โโ FGameplayTagContainer SlotTags
โโ FGuid EquippedItemGuid
โโ EEquipmentSlotState State
โโ UMounteaAdvancedAttachmentSlot* AttachmentSlot
FFastArraySerializer
โ
โโ FInventoryItemArray (existing)
โ โโ TArray<FInventoryItem> Items
โ
โโ FEquipmentSlotArray (new)
โโ TArray<FEquipmentSlot> Slots
3.4 Widget Hierarchy¶
UUserWidget
โ
โโ Inventory UI Hierarchy
โ โโ UInventoryWrapperWidget (IInventorySystemBaseWidgetInterface)
โ โ โโ Contains: UInventoryWidget
โ โ
โ โโ UInventoryWidget (IInventoryWidgetInterface)
โ โ โโ Contains: UItemGridWidget
โ โ โโ Contains: UCategoriesWrapperWidget
โ โ โโ Contains: UItemPanelWidget
โ โ
โ โโ UItemsGridWidget (IInventoryItemsGridWidgetInterface)
โ โ โโ Contains: TArray<UItemSlotWidget>
โ โ
โ โโ UItemSlotWidget (IInventoryItemSlotWidgetInterface)
โ โ โโ Contains: UItemWidget
โ โ
โ โโ UItemWidget (IInventoryItemWidgetInterface)
โ โ
โ โโ UItemTooltipWidget (IInventoryTooltipWidgetInterface)
โ โ
โ โโ UItemActionsContainerWidget (IInventoryItemActionsContainerWidgetInterface)
โ โ โโ Contains: TArray<UItemActionWidget>
โ โ
โ โโ UItemActionWidget (IInventoryItemActionWidgetInterface)
โ โ
โ โโ UCategoryWidget (IInventoryCategoryWidgetInterface)
โ
โโ Equipment UI Hierarchy
โ โโ UEquipmentPanelWidget (IEquipmentPanelWidgetInterface)
โ โ โโ Contains: TArray<UEquipmentSlotWidget>
โ โ
โ โโ UEquipmentSlotWidget (IEquipmentSlotWidgetInterface)
โ โโ Contains: UItemWidget (reused from inventory)
โ
โโ Notification UI Hierarchy
โโ UNotificationContainerWidget (INotificationContainerWidgetInterface)
โ โโ Contains: TArray<UNotificationWidget>
โ
โโ UNotificationWidget (INotificationWidgetInterface)
3.5 Interface Inheritance¶
UInterface (Unreal Base)
โ
โโ IMounteaAdvancedInventoryInterface
โ โโ Core inventory operations
โ
โโ IMounteaAdvancedEquipmentInterface
โ โโ Core equipment operations
โ
โโ IMounteaAdvancedAttachmentContainerInterface (existing)
โ โโ Attachment slot container operations
โ
โโ IMounteaAdvancedAttachmentAttachableInterface (existing)
โ โโ Attachable object interface
โ
โโ IMounteaCraftingInterface
โ โโ Crafting operations
โ
โโ IMounteaRecipeKnowledgeInterface
โ โโ Recipe storage and retrieval
โ
โโ IMounteaPickupInterface
โ โโ Pickup operations
โ
โโ IMounteaDroppableInterface
โ โโ Drop operations
โ
โโ IMounteaLootableInterface
โ โโ Looting operations
โ
โโ IMounteaVendorInterface
โ โโ Buy/sell operations
โ
โโ IMounteaInventoryUIInterface
โ โโ Inventory UI bridge operations
โ
โโ IMounteaEquipmentUIInterface
โ โโ Equipment UI bridge operations
โ
โโ IMounteaNotificationInterface
โ โโ Notification processing
โ
โโ Widget Interfaces (multiple for each widget type)
โโ IMounteaInventorySystemBaseWidgetInterface
โโ IMounteaInventoryWidgetInterface
โโ IMounteaInventoryItemSlotWidgetInterface
โโ IMounteaInventoryItemWidgetInterface
โโ IMounteaInventoryTooltipWidgetInterface
โโ IMounteaEquipmentPanelWidgetInterface
โโ IMounteaEquipmentSlotWidgetInterface
โโ IMounteaNotificationWidgetInterface
4. Data Flow Diagrams (Simplified)¶
4.1 Add Item Flow¶
Player โ InventoryManager
โ
โโ [Server] Validate Request
โ โโ Check Inventory Space
โ โโ Check Weight Limit
โ โโ Check Item Validity
โ โโ Check Configuration
โ
โโ [Server] Process Item
โ โโ Find Existing Stack (if stackable)
โ โโ Add to Existing OR Create New Item Instance
โ โโ Update FInventoryItemArray
โ
โโ [Replication] Replicate to Clients
โ โโ OnRep_InventoryItems()
โ
โโ [Server] Fire Notification
โ โโ NotificationManagerโProcessNotification()
โ
โโ [Both] Update UI
โโ InventoryUIComponentโRefreshInventory()
4.2 Equip Item Flow¶
Player โ EquipmentManager
โ
โโ [Client] Request Equip (Prediction)
โ โโ Show Equipment Visual
โ
โโ [Server] Validate Request
โ โโ Check Item in Inventory
โ โโ Check Slot Compatibility
โ โโ Check Slot State
โ โโ Check Configuration
โ
โโ [Server] Process Equipment
โ โโ Get Item from InventoryManager
โ โโ Find Target Equipment Slot
โ โโ Unequip Current Item (if any)
โ โโ Update FEquipmentSlot
โ โโ Attach to AttachmentSlot
โ
โโ [Replication] Replicate to Clients
โ โโ OnRep_EquipmentSlots()
โ โโ Physical Attachment Update
โ
โโ [Both] Update Inventory UI State
โ โโ Mark Item as Equipped
โ
โโ [Both] Update Equipment UI
โโ EquipmentUIComponentโRefreshSlot()
4.3 Craft Item Flow¶
Player โ CraftingComponent
โ
โโ [Server] Validate Recipe
โ โโ RecipeKnowledgeโIsRecipeKnown()
โ โโ InventoryManagerโValidateIngredients()
โ โโ Check Crafting Station (if required)
โ โโ Roll Success Chance (if configured)
โ
โโ [Server] Execute Crafting
โ โโ InventoryManagerโRemoveItems(ingredients)
โ โโ InventoryManagerโAddItems(outputs)
โ โโ Apply Tool Durability (if configured)
โ
โโ [Replication] Replicate Inventory Changes
โ โโ FInventoryItemArray replication
โ
โโ [Server] Fire Notification
โโ NotificationManagerโProcessNotification()
4.4 Apply Modifier Flow¶
Player โ Drag Modifier to Item
โ
โโ [Client] UI Validation
โ โโ Check Affector Slot Compatibility
โ โโ Visual Feedback
โ
โโ [Server] Validate Modification
โ โโ Check Item Has Affector Slot
โ โโ Check Slot is Empty/Compatible
โ โโ Check Modifier Compatibility
โ
โโ [Server] Apply Modifier
โ โโ Get Target Item from Inventory
โ โโ Remove Modifier Item (if configured)
โ โโ Add ModifierGuid to Item.AffectorSlots
โ โโ Apply Effects to Item.CustomData
โ โโ Update Item Template (if needed)
โ
โโ [Replication] Replicate Item Change
โ โโ FInventoryItem replication
โ
โโ [Both] Update UI
โโ Refresh Item Display
โโ Show Modifier Visual
4.5 Pickup Item Flow¶
Player Interacts with Pickup Actor
โ
โโ [Client] Show Pickup Prompt
โ
โโ [Server] Pickup Request
โ โโ PickupActorโIPickupInterfaceโRequestPickup()
โ
โโ [Server] Transfer to Inventory
โ โโ Get ItemTemplate + Quantity from Pickup
โ โโ InventoryManagerโAddItem()
โ
โโ [Server] Destroy/Update Pickup Actor
โ โโ Remove from world or reduce quantity
โ
โโ [Replication] Standard Add Item Flow
(See 4.1)
4.6 Loot/Trade Flow¶
Player โ Opens Loot/Vendor Interface
โ
โโ [Server] Request Access
โ โโ TargetโILootableInterfaceโRequestLootAccess()
โ OR TargetโIVendorInterfaceโRequestTradeAccess()
โ
โโ [Server] Validate Access
โ โโ Check Distance
โ โโ Check Permissions
โ โโ Check Inventory Flags
โ
โโ [Both] Show UI
โ โโ Source Inventory UI
โ โโ Target Inventory UI
โ
โโ [Transfer Item] Player Action
โ โโ [Server] Validate Transfer
โ โโ [Server] SourceโRemoveItem()
โ โโ [Server] TargetโAddItem()
โ โโ [Server] Process Payment (if vendor)
โ
โโ [Replication] Both Inventories Update
โโ FInventoryItemArray replication
5. Interface Definitions¶
5.1 Core Interfaces¶
IMounteaAdvancedInventoryInterface¶
Purpose: Core inventory database operations Implementers: UInventoryManagerComponent
Responsibilities: - Add/Remove items - Find items by GUID/template/tags - Modify item quantity/durability - Get inventory state (weight, value, capacity) - Sort/filter items - Save/load inventory data - Validate inventory operations - Process inventory notifications
IMounteaAdvancedEquipmentInterface¶
Purpose: Equipment slot management and attachment Implementers: UEquipmentManagerComponent
Responsibilities: - Equip/unequip items - Get equipment slots by name/tag - Validate equipment compatibility - Get equipped items - Check slot states - Save/load equipment data - Manage quick access slots
IMounteaCraftingInterface¶
Purpose: Crafting execution and validation Implementers: UCraftingComponent
Responsibilities: - Validate recipe requirements - Check ingredient availability - Execute crafting recipe - Calculate success chance - Handle crafting failures - Check crafting station requirements - Apply tool durability costs
IMounteaRecipeKnowledgeInterface¶
Purpose: Recipe storage and learning system Implementers: URecipeKnowledgeComponent
Responsibilities: - Learn recipe (permanent or temporary) - Forget recipe - Check if recipe is known - Get all known recipes - Get recipes by category/tags - Save/load recipe knowledge - Handle recipe discovery
IMounteaPickupInterface¶
Purpose: Item pickup operations Implementers: APickupActor
Responsibilities: - Provide item template - Provide quantity - Handle pickup request - Destroy or update after pickup - Show pickup prompt - Validate pickup conditions
IMounteaDroppableInterface¶
Purpose: Item drop operations Implementers: UInventoryManagerComponent, Player/NPC Actors
Responsibilities: - Validate drop request - Spawn pickup actor - Remove item from inventory - Position pickup in world - Handle drop permissions
IMounteaLootableInterface¶
Purpose: Looting system access control Implementers: Actors with InventoryManagerComponent
Responsibilities: - Request loot access - Validate looter permissions - Provide inventory reference - Check loot distance - Handle loot state (open/closed) - Apply loot filters
IMounteaVendorInterface¶
Purpose: Buy/sell operations Implementers: Vendor NPCs, Merchant Actors
Responsibilities: - Calculate buy price - Calculate sell price - Validate transaction - Process payment - Provide merchant inventory - Check vendor gold/currency - Apply price multipliers
5.2 UI Interfaces¶
IMounteaInventoryUIInterface¶
Purpose: Bridge between inventory logic and UI Implementers: UInventoryUIComponent
Responsibilities: - Create/destroy inventory widgets - Refresh inventory display - Handle UI input - Translate UI commands to inventory operations - Subscribe to inventory notifications - Update item slot visuals
IMounteaEquipmentUIInterface¶
Purpose: Bridge between equipment logic and UI Implementers: UEquipmentUIComponent
Responsibilities: - Create/destroy equipment widgets - Refresh equipment display - Handle slot interactions - Translate UI commands to equipment operations - Update equipped item visuals - Show/hide quick access slots
IMounteaNotificationInterface¶
Purpose: Notification processing and display Implementers: UNotificationManagerComponent
Responsibilities: - Process notification requests - Create notification widgets - Queue notifications - Play notification sounds - Apply notification styles - Remove expired notifications
5.3 Widget Interfaces¶
IMounteaInventorySystemBaseWidgetInterface¶
Purpose: Top-level UI wrapper Implementers: UInventoryWrapperWidget
Responsibilities: - Initialize all child widgets - Handle widget lifecycle - Manage input mode - Toggle visibility - Coordinate multiple panels
IMounteaInventoryWidgetInterface¶
Purpose: Main inventory panel Implementers: UInventoryWidget
Responsibilities: - Display item grid - Show categories - Handle sorting - Manage item panel - Coordinate sub-widgets
IMounteaInventoryItemSlotWidgetInterface¶
Purpose: Individual inventory slot Implementers: UItemSlotWidget
Responsibilities: - Display item widget - Handle drag/drop - Show slot state - Trigger tooltip - Execute item actions
IMounteaEquipmentSlotWidgetInterface¶
Purpose: Individual equipment slot Implementers: UEquipmentSlotWidget
Responsibilities: - Display equipped item - Show slot type/name - Handle equip/unequip - Validate equipment drag/drop - Show compatibility feedback
6. Core Struct/Class Definitions¶
6.1 New Structs¶
FEquipmentSlot¶
USTRUCT(BlueprintType)
struct FEquipmentSlot : public FFastArraySerializerItem
{
GENERATED_BODY()
UPROPERTY()
FGuid SlotGuid;
UPROPERTY()
FName SlotName;
UPROPERTY()
FGameplayTagContainer SlotTags;
UPROPERTY()
FGuid EquippedItemGuid;
UPROPERTY()
EEquipmentSlotState State;
UPROPERTY(NotReplicated)
TObjectPtr<UMounteaAdvancedAttachmentSlot> AttachmentSlot;
};
FEquipmentSlotArray¶
USTRUCT(BlueprintType)
struct FEquipmentSlotArray : public FFastArraySerializer
{
GENERATED_BODY()
UPROPERTY()
TArray<FEquipmentSlot> Slots;
bool NetDeltaSerialize(FNetDeltaSerializeInfo& DeltaParams);
};
FCraftingRecipeData¶
USTRUCT(BlueprintType)
struct FCraftingRecipeData
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FGuid, int32> RequiredIngredients;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FGuid, int32> OutputItems;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
float SuccessRate = 1.0f;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTag CraftingStationTag;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bConsumesTool = false;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
float ToolDurabilityCost = 0.0f;
};
FRecipeKnowledge¶
USTRUCT(BlueprintType)
struct FRecipeKnowledge
{
GENERATED_BODY()
UPROPERTY()
FGuid RecipeGuid;
UPROPERTY()
bool bIsPermanent;
UPROPERTY()
FDateTime LearnedAt;
UPROPERTY()
FGuid SourceItemGuid;
};
FInventoryTransferRequest¶
USTRUCT(BlueprintType)
struct FInventoryTransferRequest
{
GENERATED_BODY()
UPROPERTY()
FGuid ItemGuid;
UPROPERTY()
int32 Quantity;
UPROPERTY()
TScriptInterface<IMounteaAdvancedInventoryInterface> SourceInventory;
UPROPERTY()
TScriptInterface<IMounteaAdvancedInventoryInterface> TargetInventory;
UPROPERTY()
bool bIsVendorTransaction = false;
UPROPERTY()
float TransactionPrice = 0.0f;
};
FModifierData¶
USTRUCT(BlueprintType)
struct FModifierData
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTag ModifierType;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bIsReversible;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTagContainer ModifierTags;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TMap<FName, float> StatModifiers;
};
6.2 New Enums¶
EEquipmentSlotState¶
UENUM(BlueprintType)
enum class EEquipmentSlotState : uint8
{
Empty,
Equipped,
Locked,
Disabled
};
ECraftingResult¶
UENUM(BlueprintType)
enum class ECraftingResult : uint8
{
Success,
Failed_MissingIngredients,
Failed_InsufficientQuantity,
Failed_NoRecipeKnowledge,
Failed_NoCraftingStation,
Failed_ChanceRoll,
Failed_InsufficientSpace
};
EInventoryTransferResult¶
UENUM(BlueprintType)
enum class EInventoryTransferResult : uint8
{
Success,
PartialSuccess,
Failed_SourceInvalid,
Failed_TargetInvalid,
Failed_ItemNotFound,
Failed_InsufficientQuantity,
Failed_TargetFull,
Failed_InsufficientCurrency,
Failed_PermissionDenied
};
6.3 New Data Assets¶
UMoneyItemTemplate¶
UCLASS()
class UMoneyItemTemplate : public UMounteaInventoryItemTemplate
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTag CurrencyType;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
int32 CurrencyValue = 1;
virtual bool IsStackable() const override { return true; }
virtual bool IsAutoStack() const override { return true; }
};
UCraftingRecipeTemplate¶
UCLASS()
class UCraftingRecipeTemplate : public UMounteaInventoryItemTemplate
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FCraftingRecipeData RecipeData;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bPermanentLearning = true;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText RecipeDescription;
};
UModifierTemplate¶
UCLASS()
class UModifierTemplate : public UMounteaInventoryItemTemplate
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FModifierData ModifierData;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTagContainer CompatibleSlotTags;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bConsumeOnApplication = true;
};
6.4 Component Definitions¶
UInventoryManagerComponent¶
UCLASS()
class UInventoryManagerComponent : public UActorComponent, public IMounteaAdvancedInventoryInterface
{
GENERATED_BODY()
public:
UPROPERTY(Replicated)
FInventoryItemArray InventoryItems;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
EInventoryType InventoryType;
UPROPERTY()
TObjectPtr<UEquipmentManagerComponent> EquipmentManager;
UPROPERTY()
TObjectPtr<UNotificationManagerComponent> NotificationManager;
// Configuration loaded from InventorySettingsConfig
FInventoryTypeConfig TypeConfig;
};
UEquipmentManagerComponent¶
UCLASS()
class UEquipmentManagerComponent : public UActorComponent
, public IMounteaAdvancedEquipmentInterface
, public IMounteaAdvancedAttachmentContainerInterface
{
GENERATED_BODY()
public:
UPROPERTY(Replicated)
FEquipmentSlotArray EquipmentSlots;
UPROPERTY(NotReplicated)
TArray<TObjectPtr<UMounteaAdvancedAttachmentSlot>> AttachmentSlots;
UPROPERTY()
TObjectPtr<UInventoryManagerComponent> InventoryManager;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TArray<FName> EnabledSlotNames;
};
UCraftingComponent¶
UCLASS()
class UCraftingComponent : public UActorComponent, public IMounteaCraftingInterface
{
GENERATED_BODY()
public:
UPROPERTY()
TObjectPtr<UInventoryManagerComponent> InventoryManager;
UPROPERTY()
TObjectPtr<URecipeKnowledgeComponent> RecipeKnowledge;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FGameplayTag CurrentCraftingStationTag;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bRequiresCraftingStation = false;
};
URecipeKnowledgeComponent¶
UCLASS()
class URecipeKnowledgeComponent : public UActorComponent
, public IMounteaRecipeKnowledgeInterface
{
GENERATED_BODY()
public:
UPROPERTY(SaveGame, Replicated)
TMap<FGuid, FRecipeKnowledge> KnownRecipes;
UPROPERTY()
TObjectPtr<UInventoryManagerComponent> InventoryManager;
};
UNotificationManagerComponent¶
UCLASS()
class UNotificationManagerComponent : public UActorComponent
, public IMounteaNotificationInterface
{
GENERATED_BODY()
public:
UPROPERTY()
TArray<FInventoryNotificationData> NotificationQueue;
UPROPERTY()
TObjectPtr<UUserWidget> NotificationContainerWidget;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
int32 MaxVisibleNotifications = 5;
};
Interfaces & Components¶
Each system provides well-defined interfaces for maximum flexibility:
IMounteaAdvancedInventoryInterface- Core inventory operations, lacks UI representationIMounteaAdvancedEquipmentInterface- Equipment managementIMounteaAdvancedInventoryUIInterface- Inventory UI management, provides elegant way to separate Inventory and its UIIMounteaAdvancedAttachmentContainerInterface- Attachment handling
Components can be used independently or as part of the complete system, enabling gradual adoption and customization.