Files
UE5-Modular-Game-Framework/docs/blueprints/04-inventory/27_BPC_CollectibleTracker.md

2.0 KiB
Raw Blame History

BPC_CollectibleTracker — Collectible Tracker

Parent Class: ActorComponent Category: Inventory Target UE Version: 5.55.7 Build Phase: 3 — Inventory

1. Overview

BPC_CollectibleTracker tracks player collection of rare/optional items — figurines, hidden artifacts, secret tapes. Supports per-collection progress, completion rewards, and UI indicators for collectible hunters.

2. Variables

Variable Type Description
CollectionProgress TMap<FGameplayTag, int32> Collected count per collection type
CollectionTargets TMap<FGameplayTag, int32> Total items per collection
bShowCollectibleNotifications bool Toast on collectible pickup
CompletionRewards Map<Gameplay Tag, Array<Primary Asset Id>> Items granted on collection completion

3. Functions

Function Description
OnCollectiblePickedUp Records collectible acquisition
GetProgress Returns progress (current/total) for a collection
IsCollectionComplete Checks if collection is fully completed
GetAllCollections Returns all tracked collections with progress
GetTotalCompletion Returns overall completion percentage

4. Event Dispatchers

Dispatcher Payload Description
OnCollectibleFound FGameplayTag CollectionTag, int32 NewCount New collectible acquired
OnCollectionComplete FGameplayTag CollectionTag Collection fully completed
OnAllCollectionsComplete All collections complete

5. Dependencies

System Relationship
BPC_InventorySystem Collectibles as inventory items
BPC_AchievementManager Achievement triggers for completions
WBP_HUDController Toast notification display

6. Reuse Notes

  • Data-driven collection definitions via gameplay tags
  • Rewards are granted as inventory items on collection completion