# Quick Start Guide

Get up and running with AP Attribute Suite in minutes.

Support: discord.gg/n5HxmrkpC4


# 1. Installation

  1. Copy the AfterPrimeAttributeSuite/ folder into your project's Plugins/ directory.
  2. Open your project in UE5 — go to Edit → Plugins, search "Attribute Suite", and enable it.
  3. Restart the editor when prompted.

# 2. Create an Attribute Set Data Asset

Attributes are defined as Data Assets — no code required.

  1. In the Content Browser: Right-click → Miscellaneous → Data Asset.
  2. Select AP_AttributeSet as the class.
  3. Name it (e.g., DA_PlayerAttributes).
  4. Open it and add rows to the Definitions array:
Property Description
Tag Gameplay Tag identifying this attribute (e.g., AP.Attribute.Health)
BaseValue Starting and reset value
MinValue Minimum value this attribute can reach
MaxValue Maximum value before modifiers are applied
bRegenEnabled Whether this attribute regenerates over time
RegenRatePerSecond Units regenerated per second when regen is active
RegenDelay Seconds after a negative delta before regeneration begins

# Example Configuration

Tag BaseValue MinValue MaxValue bRegenEnabled RegenRate RegenDelay
AP.Attribute.Health 100 0 100 true 5.0 3.0
AP.Attribute.Stamina 100 0 100 true 10.0 1.0
AP.Attribute.Mana 50 0 50 true 3.0 5.0

# 3. Add the Component

  1. Open your Character or Actor Blueprint.
  2. Click Add Component → search for AP_AttributeSuite → add it.
  3. Select the component in the Components panel.
  4. In the Details panel, find the AttributeSets array and add your DA_PlayerAttributes asset.
  5. Compile and save.

# 4. Mutate Attributes

Server Only

All mutations are server-authoritative. Call them through Server RPCs from your PlayerController or Character.

# ApplyDelta

Adds a delta to the current value — negative values deal damage, positive values heal.

Pin Description
AttributeTag The attribute to modify (e.g., AP.Attribute.Health)
Delta Amount to add — negative for damage, positive for healing

# SetCurrentValue

Directly sets the current value, clamped to [MinValue, EffectiveMax].

# SetBaseValue

Changes the base value. Recomputes EffectiveMax and clamps CurrentValue if it exceeds the new max.

# ResetToBase

Restores CurrentValue to the BaseValue defined in the DataAsset. Clears the regen delay timer.


# 5. Query Attributes

Server + Client

All query functions are BlueprintPure — safe to call on any machine.

Function Returns Description
GetCurrentValue(Tag) float Current replicated value
GetBaseValue(Tag) float Base unmodified value from DataAsset
GetMaxValue(Tag) float Effective max after modifiers
GetMinValue(Tag) float Minimum allowed value
GetNormalizedValue(Tag) float 0.0–1.0 Use directly for progress bars
HasAttribute(Tag) bool True if the tag exists on this component
GetAllAttributeTags() Tag Array All registered attribute tags

# 6. Bind Delegates

In your Actor's BeginPlay, get the component reference and bind:

Delegate Fires When Parameters
OnAttributeChanged Any mutation to CurrentValue AttributeTag, OldValue, NewValue
OnAttributeDepleted CurrentValue reaches MinValue AttributeTag
OnAttributeRestored CurrentValue rises above MinValue AttributeTag
OnModifierAdded A modifier is successfully added AttributeTag, Handle
OnModifierRemoved A modifier is removed or expires AttributeTag, Handle

# 7. Add Modifiers

Server Only

Modifiers affect EffectiveMax — not CurrentValue directly. CurrentValue is clamped after EffectiveMax changes.

Call Add Modifier on the component with an FAP_AttributeModifier:

Field Description
ModifierType Additive, Multiplicative, or Override
Value The modifier value
Duration Seconds until auto-expiry. 0 = permanent

# Modifier Evaluation Order

Base MaxValue
  → sum all Additive modifiers
  → apply Multiplicative modifiers sequentially
  → Override replaces EffectiveMax entirely (only one active at a time)
  → clamp result to >= MinValue

Returns an FAP_AttributeModifierHandle — store it to remove the modifier early:

Remove Modifier → ModifierHandle: (stored handle)

Call Remove All Modifiers with the attribute tag to clear everything at once.


# 8. Regeneration

Configure regen per attribute in the DataAsset — bRegenEnabled, RegenRatePerSecond, and RegenDelay. Override at runtime:

SetRegenEnabled → AttributeTag: AP.Attribute.Health, bEnabled: true

Regen activates when:

  1. Regen is enabled for the attribute
  2. CurrentValue is below EffectiveMax
  3. Enough time has passed since the last negative delta (RegenDelay)

# 9. Zero-Setup Access — Static Helpers

Access attributes from any Blueprint without interface implementation or storing component references:

Function Description
GetAttributeValue(Actor, Tag) One-liner for GetCurrentValue
GetNormalizedAttributeValue(Actor, Tag) One-liner for GetNormalizedValue — use for progress bars
GetAttributeComponent(Actor) Find the component on any actor
HasAttributeComponent(Actor) Check if an actor has the component

# 10. Interface (Optional)

Implement IAP_AttributeInterface on your Actor for typed checking and custom component resolution:

  1. Open your Actor Blueprint → Class Settings → Interfaces → Add → search AP_AttributeInterface
  2. Override GetAttributeComponent to return your component reference
  3. Other systems can check Does Implement Interface (AP Attribute Interface) for typed queries

Not required — the static helpers fall back to FindComponentByClass automatically.


# 11. Widget Setup

# Single Attribute Bar

  1. Create a Widget Blueprint (e.g., WBP_HealthBar)
  2. In Class Settings set Parent Class to AP_AttributeWidgetBase
  3. Add a Progress Bar and Text Block to the Designer
  4. Override OnDisplayUpdated in the Event Graph:
    • Set Progress Bar Percent = NormalizedValue
    • Set Text = format CurrentValue / MaxValue
  5. In your HUD or character BeginPlay, call BindToAttribute on the widget passing the actor and tag

# Multi-Attribute Panel

  1. Create a Widget Blueprint (e.g., WBP_AttributePanel) with parent class AP_AttributeWidgetBase
  2. Add a Vertical Box to the canvas
  3. Override OnActorInitialized:
    • Loop through the AttributeTags array
    • For each tag: Create Widget (your bar class) → Add Child to the Vertical Box
    • Call BindToAttribute on each created widget — use AttributeComponent → GetOwner for the Target Actor parameter
  4. In your HUD or PlayerController BeginPlay, call InitForActor passing the target actor

# 12. Debug Tools

Function Description
GetSnapshot() Returns full state of all attributes — CurrentValue, BaseValue, MinValue, EffectiveMax, NormalizedValue, bRegenActive, ActiveModifierCount
DebugPrint() Logs all attribute values, effective maxes, and modifier counts to the Output Log

# 13. Multiplayer Checklist

  • Configure PIE: Edit → Editor Preferences → Level Editor → Play → Number of Players: 2, enable Run Dedicated Server
  • All mutation calls routed through Server RPCs
  • OnAttributeChanged, OnAttributeDepleted, OnAttributeRestored bound on both server and client
  • OnModifierAdded and OnModifierRemoved bound inside Switch Has Authority — server only
  • Widget BindToAttribute uses AttributeComponent → GetOwner for Target Actor in panel contexts

# Next Steps

  • API Reference — complete class, function, delegate, enum, and struct documentation
  • Changelog — version history and fixes

AfterPrime Systems — Building the Gameplay Foundation