Skip to main content

API Reference

UPerkManagerComponent

Main component for managing perks on a pawn. Add to your Character or Pawn.

Static Functions

FunctionDescription
FindPerkManagerComponent(Actor)Find component on an actor

Perk Application

FunctionDescription
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

FunctionDescription
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

FunctionDescription
UpgradePerk(PerkInstance)Increase perk level by 1

Categories

FunctionDescription
GetConflictingExclusivePerk(PerkDefinition)Get conflicting perk in same category

Batch Operations

FunctionDescription
ApplyPerks(PerkDefinitions, bReplaceExclusive)Apply multiple perks
RemovePerks(PerkInstances)Remove multiple perks
ClearAllPerks()Remove all perks

Save/Load

FunctionDescription
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

PropertyTypeDescription
DisplayNameFTextUI display name
DescriptionFTextPerk description
IconTSoftObjectPtr<UTexture2D>UI icon
SortPriorityint32Sort order in lists

Leveling Properties

PropertyTypeDescription
MaxLevelint32Maximum level (1 = single unlock)
UnlockCostint32Cost to unlock/upgrade
CostTypeFGameplayTagOptional cost type tag

GAS Properties

PropertyTypeDescription
GameplayEffectsToApplyTArray<TSubclassOf<UGameplayEffect>>Effects on unlock
AbilitiesToGrantTArray<TSubclassOf<UGameplayAbility>>Abilities on unlock
AttributeSetsToGrantTArray<TSubclassOf<UAttributeSet>>Attribute sets to grant
GrantedTagsFGameplayTagContainerTags granted while active

Requirement Properties

PropertyTypeDescription
RequiredPerksTArray<TSubclassOf<UPerkDefinition>>Prerequisite perks
RequiredTagsFGameplayTagContainerRequired ASC tags
BlockedByTagsFGameplayTagContainerBlocking tags

Category Properties

PropertyTypeDescription
PerkCategoryFGameplayTagCategory for grouping
bExclusiveInCategoryboolOnly one perk per category

Event Properties

PropertyTypeDescription
EventTriggersTArray<FPerkEventTrigger>React to gameplay events
OnUnlockCueFGameplayTagGameplay cue on unlock
OnLevelUpCueFGameplayTagGameplay cue on level up
OnProcCueFGameplayTagGameplay cue on event trigger

Instance

PropertyTypeDescription
InstanceTypeTSubclassOf<UPerkInstance>Custom instance class

UPerkInstance

Runtime perk object. Subclass for custom behavior.

Overridable Functions

FunctionDescription
OnPerkApplied()Called when perk is applied
OnPerkRemoved()Called when perk is removed
OnPerkLevelChanged(OldLevel, NewLevel)Called when level changes

Properties

PropertyTypeDescription
PerkDefinitionTSubclassOf<UPerkDefinition>The perk definition
CurrentLevelint32Current perk level

UPerkTreeDefinition

Data asset defining a perk tree structure.

Properties

PropertyTypeDescription
TreeTagFGameplayTagIdentifier tag
TreeDisplayNameFTextDisplay name
TreeDescriptionFTextDescription
TreeIconTSoftObjectPtr<UTexture2D>Tree icon
NodesTArray<FPerkTreeNode>All nodes in tree

Functions

FunctionDescription
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.

PropertyTypeDescription
PerkDefinitionTSubclassOf<UPerkDefinition>The perk for this node
ParentPerksTArray<TSubclassOf<UPerkDefinition>>Parent prerequisites
ChildPerksTArray<TSubclassOf<UPerkDefinition>>Child nodes
PositionXfloatX position in graph
PositionYfloatY position in graph
TreeRowint32Grid row
TreeColumnint32Grid column
BranchTagFGameplayTagOptional branch grouping

UPerkSubsystem

World subsystem for global perk operations.

FunctionDescription
GetPerkSubsystem(WorldContextObject)Get subsystem instance