Skip to content

Gameplay Tags

SeinARTS uses Unreal’s Gameplay Tags as its shared vocabulary. A tag says what an entity is (SeinARTS.Unit.Soldier), what it is doing (SeinARTS.Ability.Attack), what state it is in (SeinARTS.State.UnderConstruction), what a player has unlocked (SeinARTS.Tech.MotorPool) and what a player just clicked (SeinARTS.Command.Context.Target.Enemy).

Systems that never meet each other agree through tags. An effect reaches “all Soldiers” by the Soldier tag. An ability refuses to run while the unit carries a blocking tag. A right-click picks Attack because the target is tagged Enemy. None of it needs a shared enum or a reference between Blueprints.

The simulation keeps a tag set for every entity, including each player’s entity and the match’s. This is not Unreal’s Actor Tags array, which the simulation never reads.

An entity holds the union of several sources.

Source Tags Lasts
Base Tags on the SeinARTS Entity Bridge component Authored on the Blueprint The entity’s life
Identity Tag in Sein Identity The entity’s own type tag. It joins the Base Tags at spawn. The entity’s life
An active ability’s Granted Tags SeinARTS.Ability.Attack while attacking While the ability is active
An active Instance effect’s Granted Tags The target gains them While the effect is active
An unfinished construction job SeinARTS.State.UnderConstruction Until the job completes
Add Base Tag, Remove Base Tag, Replace Base Tags Your graph edits the authored set Until changed
Grant Tag, Ungrant Tag Your graph adds or removes one reference Until ungranted

Base Tags are the entity’s permanent identity. Grants are temporary. Use Add Base Tag for “this unit is now a veteran for good” and Grant Tag for “this unit is suppressed until something clears it”.

Every tag on an entity has a count. The tag is present while its count is above zero.

Two abilities that both grant SeinARTS.State.Busy give it a count of 2. When the first ends, the count falls to 1 and the unit is still Busy. The tag disappears when the last source lets go. This is why overlapping grants from abilities, effects and your own graphs never remove each other’s tags.

Add Base Tag also grants, and Remove Base Tag releases that one reference.

Ungrant Tag removes one reference but does not know whose it is. An Ungrant with no matching Grant of your own takes away a reference an ability or effect is holding. Pair every Ungrant Tag with a Grant Tag you made.

A tag name is a path, and a tag matches its own name and everything below it. An entity carrying SeinARTS.Unit.Infantry.Rifleman also counts as carrying SeinARTS.Unit.Infantry and SeinARTS.Unit.

Query Matches
Has Tag The entity has the tag or a child of it
Has Any Tag It has at least one of the listed tags. An empty list is false.
Has All Tags It has every listed tag. An empty list is true.
A tag requirement on an ability, producible or effect Each required tag is matched this way
A modifier’s Target Class Tag Matched against the unit’s tags this way

The direction matters. The entity’s tags are expanded to include their parents, and the requirement is a tag you name. Require SeinARTS.Unit.Infantry and a Rifleman qualifies. Require SeinARTS.Unit.Infantry.Rifleman and a plain Infantry-tagged unit does not.

Lookup Entities By Tag, Lookup First Entity By Tag, Count Entities By Tag and Has Any Entity With Tag read an index that counts only the exact tag. Count Entities By Tag on SeinARTS.Unit returns 0 even with a hundred Soldiers, because no entity carries that exact tag. Look up the leaf tag, or walk Get Player Entities and test each with Has Tag.

Abilities, effects and entity Blueprints each have an identity tag: Ability Tag, Effect Tag, and Identity Tag in Sein Identity. The editor generates it from the asset’s name, so you do not type it.

The name is split at its underscores. The first part is the prefix, and a Prefix Category Mapping turns it into a category.

Prefix Category Example asset Generated tag
SA Ability SA_Attack SeinARTS.Ability.Attack
SU Unit SU_Soldier SeinARTS.Unit.Soldier
SE Effect SE_Training SeinARTS.Effect.Training
SR Research SR_Training SeinARTS.Research.Training
ST Tech ST_MotorPool SeinARTS.Tech.MotorPool
SBP Entity SBP_MineralRock SeinARTS.Entity.MineralRock

A mapping only names the tag; it does not change what the asset does. An asset whose prefix has no mapping gets no tag. Set one by hand, or add a mapping.

The settings are in Project Settings > Plugins > SeinARTS, in the Tag Semantics group of the Editor Preferences category:

Setting Effect
Enable Auto Tag Generation Turns generation on or off.
Tag Prefix The root of every generated tag. SeinARTS by default.
Prefix Category Mappings The table above. Add rows for your own prefixes.
Allow Tag Layering On: SU_Infantry_Officer becomes SeinARTS.Unit.Infantry.Officer, a child of SeinARTS.Unit.Infantry. Off: SeinARTS.Unit.Infantry_Officer.

Changing a setting does not rewrite tags that already exist. Layering is what turns a naming convention into a hierarchy you can query: name your riflemen and medics SU_Infantry_Rifleman and SU_Infantry_Medic, and one SeinARTS.Unit.Infantry requirement reaches both.

Generated tags are saved in a tag source named SeinAutoGeneratedTags.ini, in Config/Tags, which Project Settings > Gameplay Tags lists. Commit it with your project.

Things worth knowing:

  • Renaming an asset in the Content Browser migrates its tag, its sub-tags and every reference to them.
  • Moving an asset without renaming it changes nothing.
  • Copying an asset gives the copy a tag from its new name. Two assets can never share an identity tag, and validation fails on a clash.
  • Editing the tag by hand makes you its owner, and renames stop moving it. Select the asset and use the Auto Tag row in its Details panel: Initialize Tag returns it to the generated name, and Rename Tag… renames a tag and everything under it across the project.
  • A field that needs a tag no one has made offers to add it when you type it. Tags you add this way, such as SeinARTS.Resource.Minerals or SeinARTS.Tech.MotorPool, are yours to name.

A player is an entity, so it has tags too. Player tags are the usual home for unlocked tech.

Source Tags
A Class or Player effect Its Effect Tag and Granted Tags, while it is active
A research item that completes Whatever its tech effect grants
A passive ability on the Player State Its Granted Tags while it runs
Grant Tag, called on the player entity by a Player State ability Until ungranted
The match SeinARTS.Player.Defeated, once the player is defeated

Player tags are counted the same way, so two techs that grant the same tag keep it until both are gone.

Three things read them. Required Player Tags on an ability and Prerequisite Tags on a producible refuse the order until the player has every tag. A tech effect’s Forbidden Prerequisite Tags refuse research once the player has any of them, which is how two upgrade branches exclude each other. In graphs, use Player Has All Tags, Player Has Any Tag, Player Has Tech Tag and Get Player Tech Tags; each takes a player ID, which Get Entity Owner gives you from any unit.

When a player right-clicks, the controller builds a set of tags for the click, and the selected unit’s Default Commands pick an ability from them. The controller adds:

Tag Added when
SeinARTS.Command.Context.RightClick Always, for a right-click
SeinARTS.Command.Context.Target.Ground The click hit empty ground
SeinARTS.Command.Context.Target.Friendly The clicked entity belongs to the clicking player
SeinARTS.Command.Context.Target.Neutral The clicked entity belongs to Neutral
SeinARTS.Command.Context.Target.Enemy The clicked entity belongs to another player
The clicked entity’s own tags Its identity and any state, for example SeinARTS.State.UnderConstruction
SeinARTS.Command.Context.AbilityTriggered The order came from a button or targeter, so the ability is already chosen and no mapping runs

A mapping matches when all of its Required Context tags are present, and the highest Priority wins. A more specific row gets a higher priority. The Soldier in Build Production Buildings maps Right Click, Target Friendly and SeinARTS.State.UnderConstruction to Build at priority 10, so a right-click on your own unfinished building sends Soldiers to help, and a right-click on a finished one falls to a lower row.

Relation is decided by ownership: your own units are Friendly, Neutral’s are Neutral, and everyone else’s are Enemy, teammates included. For a game with allies, override Build Command Context on your Player Controller and use Should Present Player As Friendly to decide.

A computer opponent builds the same tag set by hand and passes it as the Command Context of Issue Broker Order For Player. See Computer Opponents.

A Medic heals any Infantry unit you own, once the player has researched Field Medicine. A right-click on a friendly Infantry unit heals it.

  1. Names. Create SU_Infantry_Rifleman and SU_Infantry_Medic. With layering on, they carry SeinARTS.Unit.Infantry.Rifleman and SeinARTS.Unit.Infantry.Medic, both children of SeinARTS.Unit.Infantry. A Truck, SU_Truck, is outside the hierarchy.
  2. The ability. Create SA_Heal with Target Type Entity. Set Valid Target Tags to match SeinARTS.Unit.Infantry; a Rifleman and a Medic pass, a Truck does not. Set Required Player Tags to SeinARTS.Tech.FieldMedicine and Granted Tags to SeinARTS.Ability.Heal.
  3. The tech. Create SE_FieldMedicine, Persistent, Scope Player, Granted Tags SeinARTS.Tech.FieldMedicine. Attach it to a research item. Until it completes, ordering Heal is rejected as BlockedByTag; the button greys out.
  4. The click. On SU_Infantry_Medic, add a Default Command: Required Context SeinARTS.Command.Context.RightClick, SeinARTS.Command.Context.Target.Friendly, SeinARTS.Unit.Infantry; Ability Tag SeinARTS.Ability.Heal; Priority 20.

The click on a Rifleman builds the context RightClick, Target.Friendly and the Rifleman’s tags. Those tags include SeinARTS.Unit.Infantry through the hierarchy, so the row matches. A click on a friendly Truck lacks the Infantry tag, so the row fails and a lower row, such as Move, applies.

  • Counting a parent tag. Count Entities By Tag and the lookup nodes match one exact tag. Has Tag matches the hierarchy. Pick the node that matches your intent.
  • Ungranting a source you do not own. Ungrant Tag cannot tell sources apart. Only release what your own Grant Tag added.
  • Requiring a child. A requirement for SeinARTS.Unit.Infantry.Medic does not match a plain Infantry unit. Require the broadest tag that is still correct.
  • Allies as Enemy. The default click context treats a teammate as an Enemy. Override Build Command Context.
  • Editing a generated tag by hand. The asset then stops following renames. Rename the asset, or use Rename Tag…, so every reference follows.
  • A prefix with no mapping. SX_Thing gets no tag, and the validation fails for an empty identity. Add a mapping or set the tag by hand.
  • Using a tag as a number. A tag is on or off. Keep counts and amounts in a component.