Effect

Definition

An Effect is a ScriptableObject that can be applied to a Character. In PAT, Effects control various logic such as damage, knockback, and more.

By default, an Effect has main tags. Once applied, it grants the tags it holds to the character, and these tags are removed when the Effect is removed.

Example: Chain1 Effect

Effects also have components that modify their behavior in different ways. You can add an Effect Component by selecting a class from the dropdown and then clicking the 'Add Component' button.

Select a component to add

Inspector

Currently, there are two types of Effect components implemented in PAT: Effect Life Control and Effect Mod Value.

Effect Life Control

This component controls how long the Effect will remain on the character on its own. It's a useful tool when you don't want to manage the Effect's lifespan manually.

Effect Life Control inspector

Effect Mod Value

This component influences the values of Attributes in various ways. We will cover the details of Attributes later, but for now, it’s important to know that HP, Mana, Posture, Defense, and similar stats are all Attributes in PAT. Controlling Attributes generally means managing every non-action aspect of the game.

Effect Mod Value inspector

Resource Tag

The Effect Mod Value will search for an Attribute with the same tag and influence it.

Mod Target

Specifies whether it modifies the Attribute's value or the auto-recovery rate of the Attribute.

Mod Pattern

  • To Base Value Adds or subtracts from the actual base value, commonly used for damage, mana, or stamina.

  • Add Increases or decreases the final value but will no longer influence it once the Effect is removed. This is useful for buffs like a speed boost.

  • Add Multi Multiplies the value. Multiple Add Multis will stack together before the calculation. Similar to Add, it will no longer influence the final value once removed.

  • Final Multi Unlike Add Multi, this does not stack. It multiplies the value directly.

  • Override The value is directly replaced by the override value and will no longer influence the final value once the Effect is removed. Useful for effects like reducing movement speed to zero.

  • Level Not used by default, but you can implement special logic by overriding the Attribute class.

  • Order Determines the priority between multiple Effect Mod Values. If both have the same order, the most recently added Effect will take precedence.

Last updated