Effects and Attributes
An effect is a Blueprint class, a child of SeinARTS Effect, that changes the game for a while or for good. An upgrade that makes every Soldier hit harder, a slow that wears off after four seconds, a research that unlocks a building and a level-up that adds 10 health are all effects.
An effect changes attributes: the number fields of components and abilities. Movement Speed, a Combat Damage field you author, an ability’s Max Range or Cooldown, a player’s resource cap are all attributes. An effect does not edit the Blueprint. It lays modifiers over the field, and everything that reads the field, such as movement, production, abilities, Blueprint nodes and the HUD, sees the modified value without any code that knows about buffs.
Create one
Section titled “Create one”Right-click in the Content Browser and choose SeinARTS > SeinARTS Effect, pick Generic Effect, and name it with the SE_ prefix. SE_Training gets the Effect Tag SeinARTS.Effect.Training. Apply the effect with the Apply Effect node, from research (Granted Tech Effect), or from a construction site’s Completion Effect.
Scope: who is affected
Section titled “Scope: who is affected”Scope decides where the effect lives and which entities its modifiers reach.
| Scope | Lives on | Reaches | Example |
|---|---|---|---|
| Instance | The entity you applied it to | That entity only | A four-second slow on one enemy |
| Class | The owner’s player entity | Every entity that player owns with the modifier’s class tag, including units built later | An upgrade that makes all Soldiers hit harder |
| Player | The owner’s player entity | The player entity itself: its resources, caps and the components its Player State authors | A higher Minerals cap |
For Class and Player scope, the owner is the owner of the entity you passed as the target. The effect then belongs to the player, not to that entity, and it survives the entity’s death.
A Class effect picks its class from each modifier’s Target Class Tag, or from the effect’s Default Target Class Tag when the modifier has none. With neither, it reaches all of the player’s entities. Tags match by hierarchy, so SeinARTS.Unit reaches every unit. A unit that gains the tag later, or is built after the effect was applied, is reached at once and starts with the modified values.
Duration and ticking
Section titled “Duration and ticking”| Duration Mode | Behavior |
|---|---|
| Instant | Applies and ends in the same tick. Its modifiers change the field’s base for good, for example +10 Max Health on a level-up. |
| Persistent | Stays until removed, or until the entity (Instance scope) is destroyed. Use it for upgrades and techs. |
| Timed | Lasts Duration simulation seconds, then expires. |
Tick Interval above zero also fires the effect’s On Tick event every interval while it is active. It works with Persistent and Timed; an Instant effect ends before it can tick.
Stacking
Section titled “Stacking”Stacking Rule decides what happens when the same effect class is applied again to the same target:
| Rule | Behavior |
|---|---|
| Stack | The stack count rises by one up to Max Stacks. The timer of a Timed effect refreshes. Each stack applies the modifiers once more. |
| Refresh | The count stays at 1. The timer refreshes. |
| Independent | Each application is a separate instance with its own timer. Max Stacks caps how many exist at once; further applications are ignored. |
Max Stacks is 1 by default, so a second application of a Stack effect only refreshes its timer. Raise it to let stacks build.
Set Remove On Source Death when the effect should end with the entity that applied it, such as an aura. By default an effect outlives its source.
Modifiers
Section titled “Modifiers”Modifiers is a list. Each row changes one field:
| Setting | Meaning |
|---|---|
| Target | Component or Ability |
| Component | The component type, such as Sein Movement Data. Entities without it are left alone. |
| Ability Tag | For an Ability target: every ability of the entity whose Ability Tag is this tag or a child of it. |
| Field | A field name or path. |
| Operation | Add, Multiply or Override. |
| Value | The amount for a number field. |
| Override Value | The value to hold for a field that is not a number. It takes the field’s own type. |
| Target Class Tag | Class scope only: the class this row reaches. |
A Field is a name (Speed), a dot for a field inside a struct (Placement.Radius), [n] for an array element (VisionStamps[0].Radius) and [key] for a map entry (ResourceCaps[SeinARTS.Resource.Minerals]). The field picker lists the fields it knows. Type the path for the rest.
How the three operations combine on a number field:
- Add adds Value.
- Multiply scales by Value, and
1.3means +30%. Several Multiplies add their percentages, so1.3and1.3make1.6, not1.69. A stack of reductions stops at zero. - Override holds the field at Value whatever else modifies it. If several apply, the most recently applied effect wins. It works on any field type: a weapon class, a bool, a tag.
The result is the base, plus every Add, scaled by one plus every Multiply’s percentage. Each modifier counts once per stack. Integer fields round to the nearest whole number.
Fields on one entity that sit inside each other, such as a struct and one of its members, do not combine. The inner modifier is skipped with an error.
A Blueprint compile warns about a missing component, tag or field, an Add or Multiply on a field that is not a number, and an Override with no value. At runtime, a modifier that cannot apply is skipped and logged.
Base and effective values
Section titled “Base and effective values”A modified field holds the effective value, the number everything reads. Beside it the entity keeps the base, the value without modifiers. Soldier Speed is 350 in the Blueprint. With Training’s 1.3 it reads 455, and its base stays 350.
When an effect ends, the field returns to its base. When something writes a modified field, the written value becomes the new base, and the modifiers apply on top again.
| Node | Gives you |
|---|---|
| Get Attribute | One number field of one entity: Value (effective) and Base. |
| Get Data (for example Get Movement Data) | The whole component, effective. |
| Get Base Data (for example Get Base Movement Data) | The whole component with every modified field at its base. |
| Get Class Data (for example Get Class Producible Data) | What a class authors (Default) and what a unit of it would start with for a player (Value), with that player’s Class effects applied. No entity needed. |
| Set Base Attribute | Sets a number field’s base. |
| Apply Field Delta | Adds to a number field’s base, with optional clamps. |
The Get Data nodes are typed to a component. Right-click in a graph and search for “Get”, “Get Base” or “Get Class” followed by the component’s name. A Blueprint component such as SC_HealthData appears the same way.
Apply Field Delta is the node for changing a stat. Damage, healing, ammo and morale are all Apply Field Delta against your own component, with Clamp Min at 0 or Clamp Max at the maximum. It reports New Value, whether it Changed, and whether the base now sits At Min or At Max. At Min with Min Value 0 is your cue for “health reached zero”. On a field that effects modify, the delta and the clamps act on its base, and the modifiers apply on top again.
Applying, removing and querying
Section titled “Applying, removing and querying”Apply Effect takes a Target Handle, an Effect Class and a Source Handle. Called from an ability or any other simulation callback, it does not apply at once. It queues the effect for the start of the next tick and returns 0. The effect lands one tick later. Do not wait on the returned ID there.
To end an effect early, use Remove Effects With Tag with its Effect Tag. It reaches the target’s Instance effects and its owner’s Class and Player effects. Remove Effect and Remove Effect by ID need an effect ID, which Apply Effect returns only when it applies at once, during match setup. Effects applied during play are removed by tag. An effect can also list Remove Effects With Tag, which removes matching effects when it applies, as an anti-poison removes poison.
Has Effect With Tag and Get Effect Stacks read an entity’s Instance effects. Has Effect With Tag for Player and Get Effect Stacks for Player read a player’s Class or Player effects.
Tags and abilities from an effect
Section titled “Tags and abilities from an effect”Granted Tags are given while the effect is active: to the target for Instance scope, to the owning player for Class and Player scope. Class and Player effects also give the player their own Effect Tag. Overlapping grants are counted, so a tag stays until every source releases it. Gameplay Tags covers this.
Granted Abilities adds abilities while the effect is active. For Instance scope they go to the target. For Class and Player scope, set Ability Target Class Tag; they go to every unit the player owns with that tag, including later ones. Without the tag, a Class or Player effect grants nothing. This is how “research Motor Pool unlocks Build Factory” can grant the ability itself instead of gating a button.
For research, the effect’s Forbidden Prerequisite Tags and its Can Research event decide whether the tech can be researched. Economy covers research.
Effect events
Section titled “Effect events”An effect has On Apply, On Tick, On Expire and On Removed events. They run on the effect class’s defaults, so they carry entity handles and not a world. Do gameplay logic in an ability; the common effects need no events at all, because modifiers, tags and granted abilities cover them.
A unit’s Blueprint can react to what an effect changed. On Attributes Changed on the Sein Actor fires when effects change the value of any of the entity’s fields, including when a modified value reaches a unit as it spawns. Swap a weapon model or rescale a health bar there.
A worked example: an upgrade and a slow
Section titled “A worked example: an upgrade and a slow”Veteran Rifles
Section titled “Veteran Rifles”Every Soldier a player owns deals 20% more damage, including Soldiers built later. The Soldier’s SC_Combat component, from Add Combat, has a Fixed Point Damage of 10.
Create SE_VeteranRifles:
| Setting | Value |
|---|---|
| Scope | Class |
| Default Target Class Tag | SeinARTS.Unit.Soldier |
| Duration Mode | Persistent |
| Granted Tags | SeinARTS.Tech.VeteranRifles |
Add one modifier: Target Component, Component SC_CombatData, Field Damage, Operation Multiply, Value 1.2.
Attach it to a research item as in Add Production and Research. When it completes, every Soldier reads Damage as 12, and a Soldier built a minute later spawns at 12. An enemy Soldier of another player stays at 10. A Soldier now needs nine hits to kill a 100-health target instead of ten.
For a tooltip that shows both numbers before any Soldier exists, use Get Class Data for SC_CombatData: Class SU_Soldier, Player the local player. Default reads 10 and Value reads 12.
Concussion
Section titled “Concussion”A grenade slows every enemy it hits by 20% for four seconds. Hits stack up to three times.
Create SE_Concussed:
| Setting | Value |
|---|---|
| Scope | Instance |
| Duration Mode | Timed |
| Duration | 4 |
| Stacking Rule | Stack |
| Max Stacks | 3 |
One modifier: Component Sein Movement Data, Field Speed, Operation Multiply, Value 0.8.
In the grenade’s On Activate, Apply Effect with Target Handle the candidate’s Target, Effect Class SE_Concussed, Source Handle Owner Entity.
A Soldier at Speed 350 drops to 280 after one hit, 210 after two (the percentages add, 1 - 0.2 - 0.2 = 0.6) and 140 after three. A fourth hit changes nothing but the timer, which refreshes to four seconds. Four seconds after the last hit, the Soldier is back at 350.
Common mistakes
Section titled “Common mistakes”- Reading the effective value and writing it back. Reading
455, adding 10 and writing the result with a Set node makes465the new base, and the effect multiplies it again. Change a stat with Apply Field Delta or Set Base Attribute. - A Class or Player effect applied to the wrong owner. The effect belongs to the owner of the target entity. A target owned by Neutral gives Neutral the upgrade.
- Applying research to a building with an Instance effect. The research effect applies to the producing building, so an Instance effect would modify the Barracks. Use Class or Player scope.
- Expecting the effect in the same tick. Apply Effect from a simulation callback lands on the next tick.
- Stacking with Max Stacks 1. A Stack effect with the default does not stack. It only refreshes.
- Two effects fighting over one field with Override. The most recently applied wins, and removing it reveals the other.
- A field path that does not exist. A typo skips the modifier. Watch for the compile warning and the log error.
Related
Section titled “Related”- Add Production and Research: Training as a Class effect, Motor Pool as a tag.
- Abilities
- Gameplay Tags
- Economy
- Balance Tables: tune authored values in bulk.
- SeinARTS Effect, Sein Modifier and SeinARTS Effect Library