Difference between revisions of "Tags"
(Per RA1 source code and evidence from FinalAlert.) |
(Tabulated, and some fixes.) |
||
Line 3: | Line 3: | ||
{{MappingBar}} | {{MappingBar}} | ||
− | + | Tags are responsible for telling the game about the [[Maps/Triggers|triggers]] present on the map. ''Each trigger needs to be referred to by at least one tag to be considered "existant" by the game'', even if the tag isn't attached to anything and thus never used itself. Tags can be simply placed in this section, and objects pre-placed on the map as well as [[AI/TeamTypes/Tag|teams]] can refer to the tags for additional functionality - if they do, those specific tags and their respective triggers will be notified when the objects referring to them are somehow interacted with (detected, attacked, damaged, destroyed, etc.). | |
__TOC__ | __TOC__ | ||
Line 23: | Line 23: | ||
ID=PERSISTENCE,NAME,TRIGGER_ID | ID=PERSISTENCE,NAME,TRIGGER_ID | ||
− | {| style="width: 80%" | + | {| style="width: 80%" class="wikitable" |
|+ Meanings of each string | |+ Meanings of each string | ||
! style="width: 13em; " | String | ! style="width: 13em; " | String | ||
Line 29: | Line 29: | ||
|- | |- | ||
! {{Anchor|ID|ts}} | ! {{Anchor|ID|ts}} | ||
− | | The | + | | The tag's ID. This is used to attach this tag to other objects on the map.<br> |
− | ;What can be achieved by attaching tags? : see <li>[[Events]] and <li> [[Actions]] | + | ;What can be achieved by attaching tags? : see <ul><li>[[Events]] and</li><li>[[Actions]]</li></ul> |
− | ;How should tags be attached? : see <li> | + | ;How should tags be attached? : see <ul><li>[[Structures_(maps)#ts_ATTACHED_TAG|Structures]],</li><li>[[Units_(maps)#ts_ATTACHED_TAG|Units]],</li><li>[[Infantry_(maps)#ts_ATTACHED_TAG|Infantry]],</li><li>[[Aircraft_(maps)#ts_ATTACHED_TAG|Aircraft]], and</li><li>[[TeamTypes]] {{arr|r}} [[Tag]]</li></ul> |
|- | |- | ||
! {{Anchor|PERSISTENCE|ts}} | ! {{Anchor|PERSISTENCE|ts}} | ||
− | | This flag controls if and when the tag should be removed after being triggered. Once a tag has been removed, it cannot be triggered again. Applicable values | + | | This flag controls if and when the tag should be removed after being triggered. Once a tag has been removed, it cannot be triggered again. |
− | + | {| style="width: 90%" class="wikitable" | |
− | + | |+Applicable values | |
− | + | |- | |
− | + | !Value | |
+ | !Meaning | ||
+ | !Description | ||
+ | |- | ||
+ | |0 | ||
+ | |Volatile | ||
+ | |The tag is removed immediately when triggered. If the tag is attached to multiple objects, it's enough to "trip" any one of them to fire the attached trigger. | ||
+ | |- | ||
+ | |1 | ||
+ | |Semi-persistent | ||
+ | |The tag maintains a count of all objects it's attached to, and only actually "springs" after it's been triggered from all the objects; then, it removes itself. | ||
+ | |- | ||
+ | |2 | ||
+ | |Persistent | ||
+ | |The tag is never removed, and will continue to "spring" every time the trigger's conditions ([[events]]) are met. | ||
+ | |} | ||
'''Example:''' a trigger will spring when attached buildings are destroyed: | '''Example:''' a trigger will spring when attached buildings are destroyed: | ||
* {{tt|0}} fires the trigger once when ''any'' of the tagged buildings is destroyed, and never again. | * {{tt|0}} fires the trigger once when ''any'' of the tagged buildings is destroyed, and never again. | ||
Line 45: | Line 60: | ||
|- | |- | ||
! {{Anchor|NAME|ts}} | ! {{Anchor|NAME|ts}} | ||
− | | A plain text string used as a name of this | + | | A plain text string used as a name of this tag. Not used ingame, only in the map editor. Should not contain commas. |
|- | |- | ||
! {{Anchor|TRIGGER_ID|ts}} | ! {{Anchor|TRIGGER_ID|ts}} | ||
− | | Reference to the | + | | Reference to the trigger related to this tag. Again, each trigger needs to be refered to by at least one tag or it will not work. [[FinalSun]] and [[FinalAlert 2]] create tags for you automatically when creating triggers in the Trigger Editor. |
|} | |} | ||
[[Category:Map Information]] | [[Category:Map Information]] |
Revision as of 17:15, 14 September 2022
Tags are responsible for telling the game about the triggers present on the map. Each trigger needs to be referred to by at least one tag to be considered "existant" by the game, even if the tag isn't attached to anything and thus never used itself. Tags can be simply placed in this section, and objects pre-placed on the map as well as teams can refer to the tags for additional functionality - if they do, those specific tags and their respective triggers will be notified when the objects referring to them are somehow interacted with (detected, attacked, damaged, destroyed, etc.).
Contents
Section
Tiberian Dawn
Section does not exist.
Red Alert, Counterstrike, Aftermath
Section does not exist.
Tiberian Sun, Firestorm, Red Alert 2, Yuri's Revenge
The [Tags] section in a map takes this format:
ID=PERSISTENCE,NAME,TRIGGER_ID
String | Meaning | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ID | The tag's ID. This is used to attach this tag to other objects on the map. | ||||||||||||
PERSISTENCE | This flag controls if and when the tag should be removed after being triggered. Once a tag has been removed, it cannot be triggered again.
Example: a trigger will spring when attached buildings are destroyed:
| ||||||||||||
NAME | A plain text string used as a name of this tag. Not used ingame, only in the map editor. Should not contain commas. | ||||||||||||
TRIGGER_ID | Reference to the trigger related to this tag. Again, each trigger needs to be refered to by at least one tag or it will not work. FinalSun and FinalAlert 2 create tags for you automatically when creating triggers in the Trigger Editor. |