Skip to content

Item Effect Applier Component

Overview

UMIPItemEffectApplierComponent applies gameplay effects from usable items (e.g. consumables) to the player. It holds references to UMIPCharacterGameplayEffectsManager and UMIPFamilyGameplayEffectManager, subscribes to the ability system for active effect add/remove, and broadcasts friendly info for UI. ApplyUsableItemEffect(InUsablePieceAsset) is the entry point when a usable item is consumed.

Key traits:

  • Attachment: PlayerController.
  • Flow: OnPlayerStateReady → init managers; when usable item is used, ApplyUsableItemEffect applies the GE from the usable piece asset. Callbacks OnActiveGameplayEffectAddedCallback / OnRemoveGameplayEffectCallback broadcast ClientOnGameplayEffectAdded / ClientOnGameplayEffectRemoved.
  • Delegates: ClientOnGameplayEffectAddedDelegate(FMIPGameplayEffectFriendlyInfoOutputStruct), ClientOnGameplayEffectRemovedDelegate(EffectClass).

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


Key Classes & Files

Class File
UMIPItemEffectApplierComponent Public/StatusEffect/MIPItemEffectApplierComponent.h

UMIPItemEffectApplierComponent

  • Base: UMIPBasePlayerControllerComponent.
  • API: ApplyUsableItemEffect(InUsablePieceAsset), MakeFriendlyInfoOutputFromSpec(Spec).
  • Integration: UMIPPlayerServerIMC (or usage handler) calls ApplyUsableItemEffect when a consumable is used; ASC applies the effect; this component turns spec into friendly info for UI/notifications.