Skip to content

Pickup and Loot Actors

Overview

AMIPBaseItemPickup is the main item pickup actor: it holds loot definitions, rolls loot into RolledItemLoots (replicated), and implements ICircularInteractionSphereInterface. The player picks up via UMIPItemPickupComponent (interaction → popup → server RPC). Lootables (AMIPBaseLootable, AMIPAnyoneLootable, AMIPLootBox, AMIPLockedLootBox, AMIPModeRewardLockedLootBox) and AMIPBaseGatherable share overlap/interaction patterns. AMIPGoToQuestOverlapper is an interactable used for “go to” quest objectives.

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


Key Classes & Files

Class File
AMIPBaseItemPickup Public/Pickup/Actors/MIPBaseItemPickup.h
AItemPickupWithStaticMesh Public/Pickup/Actors/ItemPickupWithStaticMesh.h
AMIPBaseLootable Public/GameObjects/MIPBaseLootable.h
AMIPAnyoneLootable Public/GameObjects/MIPAnyoneLootable.h
AMIPLootBox Public/GameObjects/MIPLootBox.h
AMIPLockedLootBox Public/GameObjects/MIPLockedLootBox.h
AMIPModeRewardLockedLootBox Public/GameObjects/MIPModeRewardLockedLootBox.h
AMIPBaseGatherable Public/Gatherings/MIPBaseGatherable.h
AMIPGoToQuestOverlapper Public/GameObjects/MIPGoToQuestOverlapper.h

AMIPBaseItemPickup

  • Base: AMIPOnlyOwnerInteractableInitially; ICircularInteractionSphereInterface.
  • Data: LootDefinitions (TArray); RolledItemLoots (TArray, ReplicatedUsing=OnRep_RolledItemLoots).
  • API: InitializeItemPickup(InLootDefinitions) – called by spawner or level. InteractThisObject_Implementation – starts pickup flow on PC. GetCircularInteractionSphereAttachmentInfo_Implementation.
  • Delegate: OnLootsChanged. OnRep_RolledItemLoots for replication.
  • Friend: UMIPItemPickupComponent (access to loot and interaction). Pickup flow: Pickup component subscribes to interaction; shows item list popup; ServerPickupItemAtIndex / ServerPickupAllItems add items to inventory and remove from pickup; destroy when empty if desired.

AItemPickupWithStaticMesh

  • Base: AMIPBaseItemPickup; IOutliningInterface. Pickup with a static mesh representation and outline support.

Lootables

  • AMIPBaseLootable – AMIPOnlyOwnerInteractableInitially, ICircularInteractionSphereInterface. Base for “loot container” that only the owner can open initially (or until released).
  • AMIPAnyoneLootable – AMIPBaseLootable. Any player can loot (e.g. world chest).
  • AMIPLootBox – AMIPAnyoneLootable, IOutliningInterface. Loot box with outline; opens to show/roll loot.
  • AMIPLockedLootBox – AMIPLootBox. Requires key or condition to open.
  • AMIPModeRewardLockedLootBox – AMIPLockedLootBox. Unlocks based on game mode reward (e.g. dungeon completion).

Lootables typically use UMIPItemPickupSpawnerComponent or similar to roll and spawn pickups, or grant items directly to inventory.


AMIPBaseGatherable

  • Base: AMIPBaseInteractable; ICircularInteractionSphereInterface. Resource node (ore, herb) that player “gathers” – interaction consumes time or tool and grants items. Implements GetCircularInteractionSphereAttachmentInfo_Implementation and interaction definitions.

AMIPGoToQuestOverlapper

  • Base: AMIPBaseInteractable. Used for “go to location” quest tasks; overlap or interaction completes the objective. Quest system listens for overlap/interact and updates task.

Integration

  • UMIPItemPickupComponentPickup; interaction tag → StartPickupItem, popup, ServerPickupItemAtIndex/ServerPickupAllItems.
  • UMIPItemPickupSpawnerComponentServerComponents; SpawnPickupAroundActor, RollLoots; used when mob dies or loot box opens.
  • UMIPLootDefinitionAsset – Defines loot tables for pickup and lootables.