Skip to content

Definitions Reader Subsystem

Overview

UMIPDefinitionsReaderSubsystem is a UGameInstanceSubsystem that loads and caches key data assets by gameplay tag: item definitions (FGameplayTag → UMIPItemDefinition) and NPC info assets (FGameplayTag → UMIPNPCInfoAsset). It supports async loading and exposes static helpers so the game can resolve item or NPC data by tag without holding direct references. Abilities can be resolved by tag to get CDO (GetStaticMIPAbilityCDOByTag).

All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.


Key Class & File

Class File
UMIPDefinitionsReaderSubsystem Public/System/MIPDefinitionsReaderSubsystem.h

API

  • Static: ReadDataAssets(InPath) – kick off async load of definitions in path. OnAllLoadingCompleted (FOnDefinitionsReaderLoaded) – when all loading is done. ReadObjectFromAssetPathName(InAssetPathName) – load a single object by path.
  • Access: Get(WorldContextObject) – get subsystem from game instance.
  • Getters: GetItemClasses() – TMap. GetNPCInfoAssets() – TMap. GetItemDefByPrimaryAssetId(InPrimaryAssetId). GetStaticMIPAbilityCDOByTag(InTag) – returns ability CDO for tag.
  • Initialize: LoadAsync loads primary asset IDs; OnAllItemLoaded fires when done and broadcasts OnAllLoadingCompleted.

Integration

  • Inventory: GetItemDefByPrimaryAssetId / GetItemClasses used when creating or resolving item entries.
  • NPC: GetNPCInfoAssets used for NPC info by tag.
  • Ability: GetStaticMIPAbilityCDOByTag for ability level-up and UI. Systems that need definitions at startup can register for OnAllLoadingCompleted before using the maps.