UPerkManagerComponent
Main component for managing perks on a pawn. Add to your Character or Pawn.
Static Functions
| Function | Description |
|---|
FindPerkManagerComponent(Actor) | Find component on an actor |
Perk Application
| Function | Description |
|---|
ApplyPerk(PerkDefinition, bReplaceExclusive) | Apply a perk, returns instance |
RemovePerk(PerkInstance) | Remove a specific perk instance |
RemovePerkByDefinition(PerkDefinition) | Remove perk by definition class |
CanApplyPerk(PerkDefinition, bIgnoreExclusivity) | Check if requirements met |
HasPerk(PerkDefinition) | Check if perk is applied |
Perk Queries
| Function | Description |
|---|
GetPerkInstance(PerkDefinition) | Get instance for a definition |
GetAllPerkInstances() | Get all applied perk instances |
GetPerkLevel(PerkDefinition) | Get current perk level (0 if not applied) |
HasPerkWithTag(Tag) | Check for perk with specific tag |
HasPerkWithAnyTags(Tags) | Check for perk with any of the tags |
GetPerksInCategory(Category) | Get all perks in a category |
GetPerkInstancesWithTag(Tag) | Get instances matching tag |
Leveling
| Function | Description |
|---|
UpgradePerk(PerkInstance) | Increase perk level by 1 |
Categories
| Function | Description |
|---|
GetConflictingExclusivePerk(PerkDefinition) | Get conflicting perk in same category |
Batch Operations
| Function | Description |
|---|
ApplyPerks(PerkDefinitions, bReplaceExclusive) | Apply multiple perks |
RemovePerks(PerkInstances) | Remove multiple perks |
ClearAllPerks() | Remove all perks |
Save/Load
| Function | Description |
|---|
GetPerkSaveData() | Get save data for all perks |
LoadPerkSaveData(SaveData) | Load perks from save data |
ResetAndLoadPerks(SaveData) | Clear all and load from save |
UPerkDefinition
Base class for perk definitions. Create Blueprint subclasses.
Display Properties
| Property | Type | Description |
|---|
DisplayName | FText | UI display name |
Description | FText | Perk description |
Icon | TSoftObjectPtr<UTexture2D> | UI icon |
SortPriority | int32 | Sort order in lists |
Leveling Properties
| Property | Type | Description |
|---|
MaxLevel | int32 | Maximum level (1 = single unlock) |
UnlockCost | int32 | Cost to unlock/upgrade |
CostType | FGameplayTag | Optional cost type tag |
GAS Properties
| Property | Type | Description |
|---|
GameplayEffectsToApply | TArray<TSubclassOf<UGameplayEffect>> | Effects on unlock |
AbilitiesToGrant | TArray<TSubclassOf<UGameplayAbility>> | Abilities on unlock |
AttributeSetsToGrant | TArray<TSubclassOf<UAttributeSet>> | Attribute sets to grant |
GrantedTags | FGameplayTagContainer | Tags granted while active |
Requirement Properties
| Property | Type | Description |
|---|
RequiredPerks | TArray<TSubclassOf<UPerkDefinition>> | Prerequisite perks |
RequiredTags | FGameplayTagContainer | Required ASC tags |
BlockedByTags | FGameplayTagContainer | Blocking tags |
Category Properties
| Property | Type | Description |
|---|
PerkCategory | FGameplayTag | Category for grouping |
bExclusiveInCategory | bool | Only one perk per category |
Event Properties
| Property | Type | Description |
|---|
EventTriggers | TArray<FPerkEventTrigger> | React to gameplay events |
OnUnlockCue | FGameplayTag | Gameplay cue on unlock |
OnLevelUpCue | FGameplayTag | Gameplay cue on level up |
OnProcCue | FGameplayTag | Gameplay cue on event trigger |
Instance
| Property | Type | Description |
|---|
InstanceType | TSubclassOf<UPerkInstance> | Custom instance class |
UPerkInstance
Runtime perk object. Subclass for custom behavior.
Overridable Functions
| Function | Description |
|---|
OnPerkApplied() | Called when perk is applied |
OnPerkRemoved() | Called when perk is removed |
OnPerkLevelChanged(OldLevel, NewLevel) | Called when level changes |
Properties
| Property | Type | Description |
|---|
PerkDefinition | TSubclassOf<UPerkDefinition> | The perk definition |
CurrentLevel | int32 | Current perk level |
UPerkTreeDefinition
Data asset defining a perk tree structure.
Properties
| Property | Type | Description |
|---|
TreeTag | FGameplayTag | Identifier tag |
TreeDisplayName | FText | Display name |
TreeDescription | FText | Description |
TreeIcon | TSoftObjectPtr<UTexture2D> | Tree icon |
Nodes | TArray<FPerkTreeNode> | All nodes in tree |
Functions
| Function | Description |
|---|
GetAllPerks() | Get all perk classes in tree |
GetNodeForPerk(PerkDefinition) | Get node data for a perk |
GetRootNodes() | Get nodes with no parents |
GetChildNodes(PerkDefinition) | Get child nodes |
GetParentNodes(PerkDefinition) | Get parent nodes |
GetNodesInRow(Row) | Get nodes in a specific row |
GetNodesInBranch(BranchTag) | Get nodes with branch tag |
FPerkTreeNode
Structure representing a node in the perk tree.
| Property | Type | Description |
|---|
PerkDefinition | TSubclassOf<UPerkDefinition> | The perk for this node |
ParentPerks | TArray<TSubclassOf<UPerkDefinition>> | Parent prerequisites |
ChildPerks | TArray<TSubclassOf<UPerkDefinition>> | Child nodes |
PositionX | float | X position in graph |
PositionY | float | Y position in graph |
TreeRow | int32 | Grid row |
TreeColumn | int32 | Grid column |
BranchTag | FGameplayTag | Optional branch grouping |
UPerkSubsystem
World subsystem for global perk operations.
| Function | Description |
|---|
GetPerkSubsystem(WorldContextObject) | Get subsystem instance |