Skip to main content

Buff

This guide walks you through creating your first buff effect using Master Combat Core.

Prerequisites

Before starting, make sure:

  • You already have a player character.
  • An EntityComponent has been added to the player prefab (from the previous guide)
  • Core Attributes have been set up (e.g. hp, attack)

Step 1 — Create the Buff Graph

  1. Right-click in the Project Window and create a new GraphObject:
    • Create > Soft Kitty > Node Graph Object
  2. Double-click the asset to open it in the Graph Editor
  3. Create two Variable Nodes and set their type to .
  4. Configure them as follows:
    UIDTypeDefault Value
    N/AConstant2
    LayerDynamic Variables1
  5. Add a Math NodeMultiply.
  6. Connect both Variable Nodes to the input ports of the Multiply Math Node.

Step 2 — Configure Always-On Execution

  1. Remove the Trigger Node and Condition Node.

    • Buff graphs are executed continuously by the Over-Time Effect system and do not require triggers.
  2. Create a Target Entity Node and connect it to the Entity input of an TempAttributeChange Action Node. Make sure the type of the Action Node is TempAttributeChange not AttributeChange.

  3. Connect the Multiply Math Node output to the Value input of the AttributeChange Action Node.

  4. Configure the Action Node:

    • Attribute UID: atk
    • Operation: Add
    • Duration: 2

    Your graph should now look like this:


Step 3 — Create the Over Time Effect (OTE)

  1. Go to:
    • Project Settings > SoftKitty > SubData - Over Time Effect
  2. Click Add New OverTimeEffect.
  3. Fill in basic information such as:
    • Display Name
    • Category
    • Duration
  4. Set:
    • UID: rage
    • Design Graph: drag in the Buff Graph you just created
  5. Enable:
    • Can Be Refreshed
    • Layered
    • Set Maximum Layer to 99

Step 4 — Apply the Buff via Code

You can now apply the Buff to an entity using code:

GameManager.GetPlayer().AddOverTimeEffect("rage", null);

During runtime:

  • Monitor the EntityComponent Inspector.
  • Repeatedly apply the Buff
  • Observe that:
    • The effect stacks
    • Buff scales with the number of layers
    • The player’s attack increases accordingly

Step 5 — Apply Buff from a Damage Graph (On Hit)

You can also apply a Buff from another Graph.

  1. Open the Damage Graph created in the previous guide.
  2. Add a new Action Node.
  3. Change its type to OverTimeEffect.
  4. Set:

Now, when the damage graph executes:

  • rage is added to the attacker on hit

Result

You now have:

  • A fully functional Damage-over-Time system
  • Layered and refreshable effects
  • Graph-driven buff logic
  • Reusable buff behavior across skills, weapons, and enemies

Notes & Best Practices

  • TempAttribute for time-based modifiers applied to attributes

  • The same Buff graph can be reused across multiple effects