Red Alert 2 Map Editing Guide - Part 2
Sections Covered
A Note On Structure Numbers
[Events]
[Actions]
[Triggers]
[Tags]
[VariableNames]
[Waypoints]
[CellTags]
[AITriggerTypesEnable]
NOTE: for information pertaining to the TeamTypes, TaskForces, ScriptTypes and AITriggerTypes sections, please refer to the AI.INI Guide which offers full and conclusive descriptions of what these sections are and how they can be edited. Those sections are parsed and used in an identical way when added to a map file.
A Note On Structure Numbers
When used in an Event, the structure number takes any of several formats and is derived by finding the structure in the [BuildingTypes] list of the RULES file and subtracting ONE from this structures' number in that list (equivalent to renumbering the list from 0) - this is the explicit number of that structure and is the number to use as the second parameter of the action. Any one of several amendments can be made to this number;-
add 131072 to the number, so GAPOWR (number 1 in RULES thus number 0 for this purpose) becomes 131072
add 196608 to the number, so GAPOWR (number 1 in RULES thus number 0 for this purpose) becomes 196608
add 65534 to the number, so GAPOWR (number 1 in RULES thus number 0 for this purpose) becomes 65534
It has not been determined what significance or effect the different numbering systems have (if any). Changing them at random appears to have no effect although it is thought that there is additional logic attached to them.
[Events]
Events are the fundamental backbone of Red Alert 2. The game engine constantly performs tests to see if certain conditions are met, and by specifying an Event matched to one of those conditions, you can tell the game what to do when that Event occurs.
When specifying an Event, you are telling the game to do something when something happens (a condition is met). If that condition is met, then a Trigger is fired which in turn tells the game to carry out an Action. A Tag is used to tie the whole process together and can be used to attach the Event to an object (structure or unit). A CellTag can be used to attach the Event to a particular cell (kind of a special Waypoint). An Event entry takes the following format;-
ID=N,A,B,A1,B1...
ID=
Is the hexadecimal numbered string which is the unique identifier for this Event. For convention, it is wise to stick to this hex numbering system although this is not strictly necessary. NOTE: this ID should match the ID for the corresponding Trigger= and also the corresponding Action=. The associated Tag= (see later) is what strings the whole process together.
N
Is the number of events to be tested. The game will expect this number of Events followed by their parameters in the list.
A,B,A1,B1...
This is a list of each Event - as you can see, several can be strung together to specify Actions which will fire a Trigger when every event in that list is satisfied. The 'A' parameters are the Event numbers which specify which condition has been met. Each of the Events require a 'B' parameter which provides information for the Event - they mean different things for different Events. Here's an example of an Event entry;-
06117B60=2,13,0,5,36,0,3
In the example you can see that we have 2 events (number of events to satisfy is set to '2') and the data for each of those events follows - the first event is 13,0,5 and the second event is 36,0,3. Using the guide below, that line means that when 5 seconds have expired (13,0,5) AND Local Variable number 3 is set (36,0,3) then the associated Trigger= will be fired.
A full list of available events and a more detailed description of each follows. TIP: during the detailed descriptions, you will find many references to RULES file entries and sections. These are mentioned since they can also be included in your map file to provide a further degree of customization to the map and gain more control over the events themselves - refer to the RULES.INI Guide for more details.
0 = No Event - eg 0,0,0
Used to define a trigger which will never be activated by any Event= in the game. This is useful if you want to make some sort of 'once only' special Action= in the game, and you use the 'force trigger' Action= (see later) to activate it. Both parameters should be set to 0. This is a null event. There is no need to ever use this in a real trigger.
1 = Attached Object/CellTag Entered - eg 1,0,0
Used to fire a trigger when the object to which this Event= has a Tag= attached is entered by the House number specified in parameter 2. If you attach the Tag= for this Event= to a structure in the [Structures] section of the map file, the Trigger is fired if the building is entered by any unit which has Infiltrate=yes set. The same applies for the use of a CellTag which should point to this Event=. The second parameter specifies the number of the House= which will trigger this Event=. Triggers when an infantry or vehicle enters the attached object. Typically this trigger is attached to a building or a cell.
2 = Attached Structure Spied - e.g. 2,0,0
If you attach the Tag= for this Event= to a structure in the [Structures] section of the map file, the Trigger= is fired if the building is entered by any [InfantryType] which has Infiltrate=yes and Agent=yes set. Note that for this to have any effect, the structure should also have Spyable=yes set as the Spy functionality is structure specific in Red Alert 2.
3 = Attached Structure Thieved - e.g. 3,0,0
If you attach the Tag= for this Event= to a structure in the [Structures] section of the map file, the Trigger= is fired if the building is entered by any [InfantryType] which has Thief=yes set and belongs to the House number specified by parameter 2. Note that for this to work, the structure should also have a Storage= value and Spyable=yes set as the thief functionality is related to the Spy logic and thus is structure specific in Red Alert 2.
4 = Attached Object Is Discovered By Player - e.g. 4,0,0
Fired when an object to which this is attached is discovered by a human player. Discovered is defined as being revealed from under the shroud when the object falls within the Sight= range of a player owned object. You can only add the Tag= to infantry, units, aircraft or structures in the objects' entry in the relevant section of your map file, and you cannot associate it with a specific side because only human players (houses with PlayerControl=yes set) can activate this Event.
5 = House Discovered By Player - e.g. 5,0,
Fired when any object owned by the House number specified in parameter 2 is discovered by a human player. Discovered is defined as being revealed from under the shroud when the object falls within the Sight= range of a player owned object. Note
...