FreeCNC

FreeCNC - Linux Software and Games reviews

Map Format

admin @ 8:43 am

The map formats for Tiberian Dawn and Red Alert differ slightly. Where TD uses a .bin file for terrain data and a .ini file for all other data, RA uses a .ini file similar to TD’s, but with the terrain data included in it, encoded using Format80 and Base64 (see MapPack for more info).

Important Note: Most of the research for this document was done using the Tiberian Dawn and Red Alert versions of the The First Decade (TFD) compilation pack. Because of this:

  • Some .mix files were slightly different from the non-TFD versions. If you can’t find a file in the mixfile this document speaks of, try looking in the other mixfiles!
  • All expansion packs for Tiberian Dawn and Red Alert were installed during the research, and thus the appendices at the end of this document will also contain information about data only found in the Covert Operations, Counterstrike or The Aftermath expansion packs

Written by Stijn Gijsen.

Bin Files

Bin files contain information about the terrain.

Although only TD actually uses bin files, data similar to the data contained herein is still being used by RA. The only difference is that the data is stored (in an encoded format) in the MapPack section in the ini file.

Maps consist of templates (’blocks’ of terrain), which in turn consist of individual tiles.

File Layout

All bin files are 8192 bytes large – 2 bytes for every tile, which define the image to be placed there:

Data Type Field Name Description
byte template The template from which to take the image for this tile.
byte index The index inside the template of the image for this tile.

Please refer to the template format page for a list of available templates.

Ini files

The ini files contain information about:

  • The map’s boundaries and settings
  • Sides (money, allies, …)
  • Units & Structures
  • Overlay (ore, walls, …)
  • Terrain Objects (trees, rocks, farmland, …)
  • Triggers and teamtypes
  • Red Alert only
    • Adjustments to rules.ini settings

Naming conventions

Depending on the game, there are various naming conventions for maps:

Tiberian Dawn

These naming conventions also apply to TD’s .bin files (i.e. the .bin file has the same name as the .ini file)

What Pattern ## Range
GDI Campaign scg<##><e|w><a|b|c|…>.ini 01-15
NOD Campaign scb<##>e<a|b|c|…>.ini 01-13
Multiplayer scm<##>ea.ini 01-99
Covert Ops same as GDI/NOD campaign maps Starts at 20, non-linear increment
Cover Ops hidden funpark missions scj<##>ea.ini 01-05

Red Alert

What Pattern ## Range
Allied Campaign scg<##>e<a|b|c|…>.ini 01-14
Soviet Campaign scu<##>e<a|b|c|…>.ini 01-14
Multiplayer maps (incl. Counterstrike/Aftermath) scm[d|e|f|g|h|i|j|k|l|m]<#<#|##>>ea.ini 1-9 or 01-99 or 100-999
Counterstrike/Aftermath Scenarios Same as Allied/Soviet maps CS Allied: 20-28
CS Soviet: 31-38
Aftermath: 40-48
Counterstrike/Aftermath Hidden “It Came From Red Alert” missions sca##ea.ini 01-04

Format

The format of Red Alert’s ini files differs slighty (and in some places not so slightly) from Tiberian Dawn’s format. The best way to find out which ini format is being used (and thus which game the ini is from) is by looking at a key/value pair in the Basic section: NewIniFormat, which appears to be set to 3 for Red Alert maps (and will probably not even be present in TD’s files).

Sections

What follows is a list of the various sections of ini files. If a section is not listed here it is either not known, or it is probaly a rules.ini adjustment, in case of a Red Alert ini file (see below).

Section and key descriptions may be ‘tagged’ with the following tags:

  • Tiberian Dawn only for sections or keys that are only found in Tiberian Dawn maps. This does not necessarily mean that RA will not use them, but it is likely.
  • Red Alert only for sections or keys that are only found in Red Alert maps. This does not necessarily mean that TD will not use them, but it is very likely.
  • Unknown for sections or keys of which their meaning is not known at this time. If you have more information regarding a key with this flag, please let us know so that we may add this information to this document.
  • Probably means that a section’s or key’s meaning is not entirely clear, but there’s a chance that the description is correct.
  • Most probably means that a section’s or key’s meaning is not entirely clear, but there’s a high chance that the description is true for this key. This tends to go hand-in-hand with the unverified tag.
  • Possibly means that a section’s or key’s meaning is unknown and that the description is a mere guess at the key’s meaning. Unless you know better (please tell us!) or have other reasons not to, it’s a safe bet to go with the description.
  • Unverified means that a key or a value may not be (entirely) correct. The descriptions will be based on educated guesses, but are yet to be verified in-game.

Furthermore, some keys have special values. Here’s a list of some of the common special values:

  • Coordinates: Coordinates are the number of a cell, counting from left to right, top to bottom (the topleft cell is numbered 0). X and Y coordinates can be derived from these values like so:
    x = (coord % mapwidth) + 1
    y = (coord / mapwidth) + 1

    Mapwidth is 64 for TD and 128 for RA.

  • Red Alert only:
    • House number – Instead of the name, a number is used to specify a house.
      House Number
      Spain 0
      Greece 1
      Ussr 2
      England 3
      Ukraine 4
      Germany 5
      France 6
      Turkey 7
      Goodguy 8
      Badguy 9
      Special 10
      Neutral 11
      Multi1 12
      Multi2 13
      Multi3 14
      Multi4 15
      Multi5 16
      Multi6 17
      Multi7 18
      Multi8 19
    • Teamtype number – Instead of it’s name, a number is used to specify a teamtype. This is actually the ‘index’ of the teamtype, starting at 0. E.g. In the example below, teamtype ‘tank’ would have number 2, because counting starts at 0:
      [TeamTypes]
      drop=....
      heli=....
      tank=....
      rifl=....
    • Trigger number – Similar to the example above, the trigger number is the index of the trigger in the Trigs section, starting at 0.

Basic

The Basic section contains general information about the map/level. The following keys are known:

  • Name – Name of the map. Mainly/only used for multiplayer/skirmish maps.
  • Intro – Video played before the briefing. See the Video Lists for possible values.
  • Brief – Video played to brief the player about the mission. If this is empty, missing or if the video does not exist, the briefing text is displayed. See the Video Lists for possible values. See the Briefing section for more information on briefing texts. for more information on briefing texts.
  • Action – Video played after the briefing. See the Video Lists for possible values.
  • Win – Video played if the player has won the mission. See the Video Lists for possible values.
  • Lose – Video played if the player has lost the mission. See the Video Lists for possible values.
  • Player – The name of the side (or house) the player will be controlling.
  • Theme – The name of the level’s theme song. This song will be played during the mission, unless the player selects a different song in the playlist. See the Score List for possible values.
  • CarryOverMoneyProbably defines the amount (or possibly minimum amount) of money carried over to the next map. In TD this value is the amount of money divided by 100. In RA, this value is a fraction of the player’s money. The games might accept both formats. Note: After extensive experimenting I’ve not found any combination of options where this key has any effect.
  • CarryOverCapProbably defines a limit to the amount of money to be carried over. Doesn’t seem to be used anywhere; Seems to always set to -1 for TD, always set to 0 for RA.
  • PercentUnknown, no effects found after extensive experimenting.
  • Tiberian Dawn only
    • BuildLevel – Defines the tech level of the player(s). Possible values: A number, starting at 1. All buildings and units have a minimum techlevel specified which is required for the unit to be available in the build menu. (Red Alert defines this individually for each house under the house sections)
  • Red Alert only
    • ToCarryOver – Defines whether or not the map will be re-used in later missions. Possible values: yes and no.
    • ToInherit – Defines whether or not the map will re-use a previous mission’s map. Possible values: yes and no.
    • TimerInheritMost probably defines whether or not the mission timer is to be inherited from the previous mission. Possible values: 0 or 1.
    • CivEvacUnknown. Clearly has something to do with the evacuation of civilians, although it is unknown what the consequences of this option being set to yes would be. Possible values: yes and no.
    • NewIniFormat – Defines the ini format for this map. Is always set to 3 for Red Alert maps. Possible values are:
      Value Meaning
      1 Use Triggers section instead of Trigs, use Overlay section instead of OverlayPack
      2 Use Overlay section instead of OverlayPack
      3 Default Red Alert behaviour

      This key can be used to check whether or not this ini file was made for Red Alert, because this key should not appear in TD maps.

    • EndOfGame – Defines whether this mission is the last mission of the campaign. Effects of this being set to yes include that the campaign’s final video should be played and the game credits are shown. Possible values: yes and no.
    • NoSpyPlane – Defines whether the spy plane special power is available in this mission or not. Possible values: yes and no.
    • SkipScore – Defines whether the score screen is to be skipped or shown. Possible values: yes and no.
    • OneTimeOnly – Defines whether the mission is part of a series (e.g. a campaign) or not. If set to yes, the player is taken to the main menu after completing the mission. For example, this is used in the new missions in Counterstrike and Aftermath to prevent the game from opening the next in a series mission. Possible values: yes and no.
    • SkipMapSelect – Defines whether the map selection screen is shown after this mission. Important to know is that this will not make the game advance to a new level, but will go to the next map of the current level instead, without showing the ‘Mission Accomplished’ text. A good example of this is Allied mission 10, where you have to infiltrate the Soviet command center before they can launch their nukes. Mid-game, a video is played to tell you that the nukes have in fact been launched and need to be disengaged before they reach their targets, after which the game goes from scg10ea to scg10eb. This doesn’t seem to be possible indefinately and is likely to depend on the amount of maps in the official missions. Possible values: yes and no.
    • OfficialProbably defines whether or not the map was created by Westwood or not, although the consequences (if any) are unknown. Possible values: yes and no.
    • FillSilosProbably defines whether AI player’s silos should ever look filled or not. Possible values: yes and no.
    • TruckCrate – Defines whether trucks should drop a crate (which giving cash when picked up by a unit) when blown up. Possible values: yes and no.

Map

The Map section contains information about the type of terrain and the size of the map.

Note that all maps are 64 x 64 tiles in the case of Tiberian Dawn and 128 x 128 in the case of Red Alert, but the Map section defines the boundaries of the actual playing area. The area outside of these boundaries are still accessible by units so that units can be scripted to enter or leave the map.

The following keys are known:

  • Theater – The type of terrain for this map. Possible values:
    • Tiberian Dawn: TEMPERATE, WINTER, DESERT
    • Red Alert: TEMPERATE, SNOW, INTERIOR
  • X – The X coordinate of the top-left corner of the map’s boundaries.
  • Y – The Y coordinate of the top-left corner of the map’s boundaries.
  • Width- The width of the map’s playable terrain (i.e. the offset of the right boundary from the left boundary defined by X)
  • Height- The height of the map’s playable terrain (i.e. the offset of the bottom boundary from the top boundary defined by Y)

MapPack

The MapPack section only appears in Red Alert files. The data contained in this section is identical to the data contained in Tiberian Dawn’s .bin files

The data is encoded using Format80, and the resulting data is encoded using Base64 encoding. For information on Format80, see the SHP Format page. For more information about Base64, see RFC 3548.

The encoded data is spread over multiple key-value pairs. The key is simply a line number, the value is a part of the Base64 encoded data. To decode the data, first concatenate all the lines.

The Base64 encoded data can now be decoded. The resulting data consists of 6 format80 encoded chunks of data, with 4 byte headers before each chunk. The first 3 bytes of this header contain the length of the chunk, the fourth byte always seems to be 0×20. After this header comes the chunk itself.

These chunks of Format80 can then be decoded. Every chunk should decode into exactly 8192 bytes of data. Afterwards, these chunks can be appended to each other to create a 49152 byte file.

The resulting data has 3 bytes for every tile:

Data Type Field Name Description
short int template The template from which to take the image for this tile.
byte index The index inside the template of the image for this tile.

See the Template List for a table of the available templates.

Overlay

The Overlay section contains information about overlay, e.g. Tiberium, Walls, etc.

This section applies to Tiberian Dawn only. Red Alert defines overlay in a way similar to the way it defines the actual terrain information: in an encoded format in a section called OverlayPack.

Similar to the Terrain section, the keys in this section are coordinates of the overlay and the value is the name of the overlay to be placed there. For a list of possible values, see the Overlay List.

OverlayPack

The OverlayPack section only appears in Red Alert files. The data in OverlayPack is very similar to the MapPack data. The only differences are that there are only 2 chunks of data, and that there are only 1 byte per tile. The data is encoded using Format80, and the resulting data is encoded using Base64 encoding. For information on Format80, see the SHP Format page. For more information about Base64, see RFC 3548.

The encoded data is spread over multiple key-value pairs. The key is simply a line number, the value is a part of the Base64 encoded data. To decode the data, first concatenate all the lines.

The Base64 encoded data can now be decoded. The resulting data exists of 2 format80 encoded chunks of data with 4 byte headers on each chunk. The first 3 bytes contain the length of the chunk, the fourth byte always seems to be 20. After this header comes the chunk itself.

These chunks of Format80 can then be decoded. Every chunk should decode into exactly 8192 bytes of data, which can then be concatenated.

The resulting data has 1 byte for every tile:

Data Type Field Name Description
byte overlay The overlay item to place on this tile. See the overlay list for a list of possible values.

Terrain

The Terrain section contains information about the trees and rocks on the map. It is not to be confused with the .bin file or MapPack section, which contain the actual terrain data for the map.

The keys in this section are the Coordinates of the object, the value is the object to be placed there. For possible values, see the Terrain Objects List.

Note: TD maps have terrain values that are comma-seperated lists of two values: The object to be placed there, and a value that appears to always be ‘None’. This second value’s meaning is unknown, but it might be the object’s owner or action.

Smudge

The Smudge section contains information about the scorch marks and craters that are initially on the map.

The keys in this section are a list of numbers starting from 0. Although the original game’s ini files use keys that are the smudge’s coordinate, the game does not use the key. The value is a comma seperated list of values:

  • Name of the smudge. For a list of possible values, see the Smudges section of the Overlay List.
  • The smudge’s coordinate.
  • The ’state’ of the smudge. Craters have ‘progressions’ of how much of the terrain has been destroyed. This value has to be in the range of 0-4. Always 0 for scorch marks, because these do not have these progressions.

House sections

Each ‘house’ or side in a map has it’s own section in which their settings are defined. The section names are the house names (e.g. [GoodGuy]). In campaign maps and Tiberian Dawn multiplayer, the houses mainly define the colors of the units (and whether the side is GDI or NOD, Allies or Soviet). In Red Alert’s multiplayer, houses come with their own bonuses, which are defined in rules.ini.

The following houses are available in Tiberian Dawn:

House Side Color
GoodGuy GDI Gold
BadGuy NOD Red structures, silver units
Special None Gold
Neutral None (Civilians) Gold
Multi1 Choosable Teal
Multi2 Choosable Orange
Multi3 Choosable Lime
Multi4 Choosable Silver
Multi5 Choosable Gold
Multi6 Choosable Red

Note that there are exceptions to BadGuy’s colors. E.g. the Harvester has structure colors even though it is a unit.

The following houses are available in Red Alert:

House Side Color
Greece Allies Blue
GoodGuy Allies Blue
England Allies Light green
Spain Allies Gold
Germany Allies Light Brown
France Allies Teal/Green
Turkey Allies Brownish Red
USSR Soviet Red
BadGuy Soviet Red
Ukraine Soviet Orange
Special None Gold
Neutral None (Civilians) Gold
Multi1 Choosable Choosable
Multi2 Choosable Choosable
Multi3 Choosable Choosable
Multi4 Choosable Choosable
Multi5 Choosable Choosable
Multi6 Choosable Choosable
Multi7 Choosable Choosable
Multi8 Choosable Choosable

The following keys are known:

  • Credits – Defines the amount of credits a house starts with, multiplied by 100 (e.g. a value of 50 would mean 5000 credits).
  • Edge – Defines the side of the map from which the air strike, spy plane and paradrop/bomber come flying into the map (unless scripted otherwise). Possible values: North, East, South, West
  • MaxUnit – Defines the maximum amount of units (excl. infantry) a side may build, although it’s not certain if this is actually used.
  • MaxInfantry – Defines the maximum amount of infantry a side may train, although it’s not certain if this is actually used.
  • MaxBuilding – Defines the maximum amount of structures a side may build, although it’s not certain if this is actually used.
  • Allies – A comma-seperated list of sides this house is allied with. (This only means the side can not attack these sides – not the other way around unless they both define each other as allies!)
  • Tiberian Dawn only
    • FlagHomeTiberian Dawn only, Defines the location of the flag-base for Capture the Flag multiplayer mode. This mode is still in the Red Alert engine but was disabled through rules.ini. Possible values: Coordinates
    • FlagLocationTiberian Dawn only, Defines the location of the flag for Capture the Flag multiplayer mode. This mode is still in the Red Alert engine but was disabled through rules.ini. Possible values: Coordinates
  • Red Alert only
    • MaxVesselRed Alert only, Defines the maximum amount of ships a side may build, although it’s not certain if this is actually used.
    • TechLevelRed Alert only, Defines the tech level of the side, which in turn defines which units and structures the side may produce (as defined in rules.ini). TD defines this in the Basic section.
    • IQRed Alert only, Defines the IQ of the AI for this side.
    • PlayerControlRed Alert only, Defines whether or not the player can control this side (aside from the player’s own side, which the player can always control)

Briefing

This section contains the mission briefings. Lines start with a numeric key, although spanning the message over multiple lines will not change it’s appearance ingame.

The briefings contained in the ini files do not appear to be used at all, because the briefings from the mission.ini file (in GENERAL.MIX) are used instead. When briefings are not defined in miossion.ini, this briefing is used.

Also note a Red Alert only feature: An at-sign (@) will be replaced with a newline, allowing you to split a message up into paragraphs.

Units

The units section defines the location, owner and type – amongst other things – of units on the map. Units are vehicles, ships and planes (i.e. not infantry).

The keys in this section are simply a list of numbers starting from 0 – the first defined unit’s key is 0, the second unit’s key is 1, etc. The values are a comma-seperated list:

  • House – The owner of the unit
  • Type – The type of the unit. For a list of possible values, see the Unit List.
  • Health – The health of the unit. Has to be a numeric value in the range 1-256, where 256 is full health.
  • Coordinate – The coordinate of the unit’s location.
  • Direction – The direction in which the unit is facing. 0 = N, 32 = NE, 64 = E, 96 = SE, 128 = S, 160 = SW, 192 = W, 224 = NW
  • Action – The action which the unit is currently undertaking. For a list of possible values, see the Action List.
  • Trigger – The name of the trigger that is attached to this unit. This is used to allow for events such as ‘Unit attacked by player’.

Infantry

The Infantry section is similar to the Units section, but for infantry.

The keys in this section are simply a list of numbers starting from 0 – the first defined infantry’s key is 0, the second infantry’s key is 1, etc. The values are a comma-seperated list:

  • House – The owner of the infantry
  • Type – The type of the infantry. For a list of possible values, see the Unit List.
  • Health – The health of the infantry. Has to be a numeric value in the range 1-256, where 256 is full health.
  • Coordinate – The coordinate of the infantry’s location.
  • Place- Every cell on the map can contain 5 infantry units. This value defines the position within the cell. 0 = center, 1 = Top-left, 2 = top-right, 3 = bottom-right, 4 = bottom-left (values not verified)
  • Action – The action which the infantry is currently undertaking. For a list of possible values, see the Action List.
  • Direction – The direction in which the infantry is facing. 0 = N, 32 = NE, 64 = E, 96 = SE, 128 = S, 160 = SW, 192 = W, 224 = NW
  • Trigger – The name of the trigger that is attached to this infantry. This is used to allow for events such as ‘Unit attacked by player’.

Structures

The Structures section is similar to the Units section, but for structures.

The keys in this section are simply a list of numbers starting from 0 – the first defined structure’s key is 0, the second structure’s key is 1, etc. The values are a comma-seperated list:

  • House – The owner of the structure
  • Type – The type of the structure. For a list of possible values, see the Structure List.
  • Health – The health of the structure. Has to be a numeric value in the range 1-256, where 256 is full health.
  • Coordinate – The coordinate of the structure’s upper-left cell’s location.
  • Direction – The direction in which the structure is facing, mainly/only used for gun turrets. 0 = N, 32 = NE, 64 = E, 96 = SE, 128 = S, 160 = SW, 192 = W, 224 = NW
  • Trigger – The name of the trigger that is attached to this structure. This is used to allow for events such as ‘Building captured’.
  • Sellable – Defines whether or not the building can be sold (by the AI(?)). Possible values: 0 or 1
  • Rebuild – Defines whether or not the AI should attempt to rebuild this building if it is destroyed. Possible values: 0 or 1

Base

The Base section contains information about structures that are to be built by the AI, once the apropriate settings are set through triggers.

The keys in this section define the order in which structures are to be built, starting from 000, where 000 is the highest priority. If an already built structure is destroyed during this ‘chain’ it is first rebuilt before the other structures with a lower priority (i.e. a high number) are created.

The other keys and the values are different in Tiberian Dawn and Red Alert maps.

Tiberian Dawn

The section contains one special key:

  • Count – The number of structures in the list.

The normals key’s values have the following syntax:

  • Type – The type of the structure. For a list of possible values, see the Structure List.
  • Coordinate – A very special number. This defines the coordinate of the structure, but not in the same way it is done in other sections. Instead, this number is calculated as follows:
    number = y << 24 | x << 8

    Or the other way around:

    y = number >> 24
    x = (number & 0xFFFFFF) >> 8

Red Alert

The Base section contains these special keys:

  • Player – The (AI controlled) house that is to build the structures.
  • Count – The number of structures in the list.

The values for the normal keys are a comma-seperated list:

  • Type – The type of the structure. For a list of possible values, see the Structure List.
  • Coordinate – The coordinate of the structure’s upper-left cell’s location. Unlike Tiberian Dawn, this is a normal coordinate value.

Waypoints

Most waypoints are used by scripted teams, pointing them where to go. However, some waypoints have special meanings. A map can contain up to 100 waypoints: 00 through 99.

The key for the waypoints is the waypoint number, the value is it’s coordinate.

Special waypoints are:

  • Waypoint 98 is the initial location of the player’s view during a singleplayer mission.
  • Waypoint 99 is said to have a special meaning as well, although it is unclear which meaning that is
  • Waypoints 0-7 are the starting locations of players in multiplayer games. (98 also appears in multiplayer maps, although it’s unknown whether it actually has any effect)

These waypoints can still be used for triggers and scripted teams, they just have hard coded effects as well.

Triggers

Triggers are ways to script certain events in a mission. There are two kinds of triggers – ‘normal’ triggers and celltriggers. Celltriggers have one or more locations on the map, allowing for events such as ‘Entered by GoodGuy’. Triggers can also be attached to units and buildings, allowing for events such as ‘Unit dies’.

As with most things, Red Alert triggers are a good bit more complex (and powerful) and differ in syntax from their Tiberian Dawn counterparts.

In Tiberian Dawn maps, triggers and celltriggers are defined in the Triggers section in the ini file. In Red Alert maps, they’re defined in the Trigs section. Celltriggers are placed on the map via the Celltriggers section. The key of each trigger is the trigger’s name, which is 4 characters long. The value is a comma-seperated list:

Tiberian Dawn syntax

… TODO …

Red Alert syntax

  • Existance – Defines if and when the trigger is destroyed (i.e. deactivated):
    Value Meaning
    0 Temporary – Fires when the events happen and destroys the trigger
    1 Semi-constant – Fires when all instances of the trigger (e.g. celltriggers, triggers attached to units, etc.) have their events happen, then destroys the trigger.
    2 Constant – Fires every time the events happen; Never destroys itself.

    Apart from this option, triggers can always be destroyed by other triggers.

  • House number – Affects some events and actions (such specifying the house for ‘Give special weapon’). See the Trigger Event and Trigger Actions lists.
  • Behaviour – Defines how the trigger behaves and (indirectly) how many events there are: There are four known ways triggers behave:
    Value Name Number of events Meaning
    0 Simple 1 When the event is true, execute the action(s)
    1 AND 2 When event 1 and event 2 are true, execute the action(s)
    2 OR 2 When either event 1 or event 2 are true, execute the action(s)
    3 Complex 2 When event 1 is true, execute action 1; When event 2 is true, execute action 2
  • Number of actions – Defines how many actions there are. 0 for one action, 1 for two actions.
  • Event 1 – A number denoting the first event or condition. For a list of possible values, see Trigger Event list.
  • Unknown – Appears to always be -1.
  • Event 1 Parameter – The parameter for the first event. Possible values differ per event. See the Trigger Event list.
  • Event 2 – A number denoting the second event or condition, or 0 if there is no second event. For a list of possible values, see the Trigger Event list.
  • Unknown – Appears to always be -1.
  • Event 2 Parameter – The parameter for the second event, or 0 if there is not second event. For a list of possible values, see the Trigger Event list.
  • Action 1 – A number denoting the first action. For a list of possible values, see the Trigger Actions list.
  • Action 1 Teamtype Number – If the first action’s parameter is a teamtype, this is it’s number, else it’s -1.
  • Action 1 Trigger Number – If the first action’s parameter is a trigger, this it’s number, else it’s -1.
  • Action 1 Other Parameter – If the first action’s parameter is neither teamtype nor trigger, this is the parameter. Else it’s -1.
  • Action 2 – A number denoting the second action. For a list of possible values, see the Trigger Actions list.
  • Action 2 Teamtype Number – If the second action’s parameter is a teamtype, this is it’s number, else it’s -1.
  • Action 2 Trigger Number – If the second action’s parameter is a trigger, this it’s number, else it’s -1.
  • Action 2 Other Parameter – If the second action’s parameter is neither teamtype nor trigger, this is the parameter. Else it’s -1.

Teamtypes

Teamtypes are groups of units that are used for scripted events such as patrols, reinforcements, AI-built troops, etc. These teams can be created from existing units on the map (by giving them the orders of the team) or they can be reinforced from a waypoint, in which case the units are spawned. The key for a teamtype defines it’s name which is used to refer to it (e.g. create them via a trigger). The syntax for the values differs slightly between TD and RA. Below is a list of the various values of the comma-seperated list:

Tiberian Dawn syntax

  • House name – The house which already owns the units or will own the units when they are spawned or built.
  • Always take the safest route, even if it’s a detour – Unverified, Possible values: 0 = no, 1 = yes.
  • Charge at target ignoring enemy units/enemy fire – Unverified, Possible values: 0 = no, 1 = yes.
  • Team is only used by autocreate AI (produced/trained taskforces) – Unverified, Possible values: 0 = no, 1 = yes.
  • Prebuild teammembers before creating team. – Unverified, The effect of this option is currently unknown, Possible values: 0 = no, 1 = yes.
  • Automatically reinforceUnverified, The effect of this option is currently unknown. Possible values: 0 = no, 1 = yes.
  • Priority – The priority of the team. It’s not entirely certain what this means, but it probably means that if more than one teamtype could be created from a group of units, the teamtype with the highest priority gets created first. Or it possibly has something to do with the likelyhood of this team being produced by the AI.
  • MaxUnknown, Possibly the maximum amount of concurrent instances of this team for the autocreate AI
  • AmountUnknown, Possibly how many times the team should be created (by the autocreate AI, possibly).
  • Waypoint – Waypoint at which this team gets created, reinforced or paradropped, depending on the teamtype and trigger (see below).
  • Trigger numberUnverified, The number of the trigger that is to be attached to the units. This number is the index of the trigger as defined under the Trigs section, starting at 0. E.g. in the example below, if the team should have trigger ‘died’ attached to them, the trigger number would be 1 (because trigger numbers start at 0):
    [Triggers]
    foo=......
    died=......
    bar=.....
  • Unittype count – The amount of unit types in this team. If a team consists of 10 rifle soldiers and 3 grenadiers, this number would be 2 because two types of of units are being used in the team.
  • Unit list – The next <unittype count> values use this syntax: ‘unittype:amount’. Using the previous example (10 riflemen, 3 grenadiers), the unittype list would be defined as ‘E1:10,E2:3?. For a list of possible values, see the Unit List.
  • Order count – The amount of orders for this team. Orders are simple commands that are followed sequentially, one at a time.
  • Order list – Similar to the Unit list, the next <order count> values are the orders, defined like this: ‘order:parameter’. For a list of possible values, see the Action List.
  • Unknown value, usually 0.
  • Unknown value, usually 0.

Red Alert syntax

  • House number – The house which already owns the units or will own the units when they are spawned or built.
  • Options – There are 5 known extra options for teams. Every option has a number associated with it, and combinations of options can be defined by adding up the associated numbers, like flags. Currently the effects of options 8 and 16 are unclear.
    Option Flag
    Always take the safest route, even if it’s a detour 1
    Charge at target ignoring enemy units/enemy fire 2
    Team is only used by autocreate AI (produced taskforces) 4
    Prebuild teammembers before creating team 8
    Automatically reinforce 16
  • Priority – The priority of the team. It’s not entirely certain what this means, but it probably means that if more than one teamtype could be created from a group of units, the teamtype with the highest priority gets created first. Or it possibly has something to do with the likelyhood of this team being produced by the AI.
  • MaxUnknown, Possibly the maximum amount of occurences at the same time of this team
  • AmountUnknown, Possibly how many times the team should be created.
  • Waypoint – Waypoint at which this team gets created, reinforced or paradropped, depending on the teamtype and trigger (see below).
  • Trigger numberUnverified, The number of the trigger that is to be attached to the units. This number is the index of the trigger as defined under the Trigs section, starting at 0. E.g. in the example below, if the team should have trigger ‘died’ attached to them, the trigger number would be 1 (because trigger numbers start at 0):
    [Trigs]
    foo=......
    died=......
    bar=.....
  • Unittype count – The amount of unit types in this team. If a team consists of 10 rifle soldiers and 3 grenadiers, this number would be 2 because two types of of units are being used in the team.
  • Unit list – The next <unittype count> values use this syntax: ‘unittype:amount’. Using the previous example (10 riflemen, 3 grenadiers), the unittype list would be defined as ‘E1:10,E2:3?. For a list of possible values, see the Unit List.
  • Order count – The amount of orders for this team. Orders are simple commands that are followed sequentially, one at a time.
  • Order list – Similar to the Unit list, the next <order count> values are the orders, defined like this: ‘order:parameter’. For a list of possible values, see the Action List.

Waypoint value

The waypoint value has a slightly different meaning depending on the teamtype

and it’s location:

  • If the team contains a transport, the function of the waypoint differs per transport type:
    • Red Alert’s Badger bombers (BADR) will fly into the game from the owner’s map edge and drop the other teammembers at the waypoint. After landing, these teammembers will execute the team’s orders, if any.
    • For chinook transports the waypoint does not appear to have any function if the team has no orders. The chinook will simply fly off the map again (at a random location). If the team does have orders, the chinook will land at the waypoint, unload and fly away again.
    • APCs, Hovercraft and other transport-enabled vehicles (such as the convoy truck) will behave just like normal vehicles, but other units will be inside. E.g. if a team’s orders are to patrol an area, the transport itself will do so with the other units in it.
  • The behaviour of reinforced teams depends on the location of the waypoint and on the units in the team:
    • If the waypoint is on clear ground (or water), the team will move into the mission area from the edge of the map that is closest to the waypoint, without moving towards this waypoint. Instead the team will immidiately do whatever it’s first order is.
    • If the waypoint is on a cell that is occupied by a building, the unit will spawn at the waypoint. Examples of this are Einstein walking out of the tech center in Allied mission 1 and the spy running away from churches in Soviet mission 3.
  • A team that is to be created out of existing units will be created out of the needed units closest to the waypoint.

Appendices

Appendix A: Terrain Object List

Appendix A.1: Tiberian Dawn

The values used in the ini file are the names of the SHP file for the terrain object, without the .tem, .win or .des extension. Note that these names are case insensitive.

Object Name Description Temperate Winter Desert
T01 Tree Yes Yes No
T02 Tree Yes Yes No
T03 Tree Yes Yes No
T04 Cactus No No Yes
T05 Tree Yes Yes No
T06 Tree Yes Yes No
T07 Tree Yes Yes No
T08 Tree Yes Yes Yes
T09 Cactus No No Yes
T10 Tree Yes Yes No
T11 Tree Yes Yes No
T12 Tree Yes Yes No
T13 Tree Yes Yes No
T14 Tree Yes Yes No
T15 Tree Yes Yes No
T16 Tree Yes Yes No
T17 Tree Yes Yes No
T18 Tree No No Yes
TC01 Tree Cluster Yes Yes No
TC02 Tree Cluster Yes Yes No
TC03 Tree Cluster Yes Yes No
TC04 Tree Cluster Yes Yes No
TC05 Tree Cluster Yes Yes No
ROCK1 Rocks No No Yes
ROCK2 Rocks No No Yes
ROCK3 Rocks No No Yes
ROCK4 Rocks No No Yes
ROCK5 Rocks No No Yes
ROCK6 Rocks No No Yes
ROCK7 Rocks No No Yes
SPLIT1 Tiberium Tree No No Yes
SPLIT2 Tiberium Tree Yes Yes No
SPLIT3 Tiberium Tree Yes Yes No

Note: Tiberium Trees are the trees in Tiberium fields that grow new Tiberium. These trees look like normal trees until Tiberium grows on the tree’s tile: Then the tree mutates into a tiberium tree.

Appendix A.2: Red Alert

The values used in the ini file are the names of the SHP file for the terrain object, without the .tem, .sno or .int extension. Note that these names are case insensitive.

Object Name Description Temperate & Snow Interior
T01 Tree Yes No
T02 Tree Yes No
T03 Tree Yes No
T04 Tree Yes No
T05 Tree Yes No
T06 Tree Yes No
T07 Tree Yes No
T08 Tree Yes No
T09 Tree Yes No
T10 Tree Yes No
T11 Tree Yes No
T12 Tree Yes No
T13 Tree Yes No
T14 Tree Yes No
T15 Tree Yes No
T16 Tree Yes No
T17 Tree Yes No
TC01 Tree Cluster Yes No
TC02 Tree Cluster Yes No
TC03 Tree Cluster Yes No
TC04 Tree Cluster Yes No
TC05 Tree Cluster Yes No
ICE01 Ice Floe Yes No
ICE02 Ice Floe Yes No
ICE03 Ice Floe Yes No
ICE04 Ice Floe Yes No
ICE05 Ice Floe Yes No
MINE Ore mine Yes No
BOXES01 Wooden Boxes No Yes
BOXES02 Wooden Boxes No Yes
BOXES03 Wooden Boxes No Yes
BOXES04 Wooden Boxes No Yes
BOXES05 Wooden Boxes No Yes
BOXES06 Wooden Boxes No Yes
BOXES07 Wooden Boxes No Yes
BOXES08 Wooden Boxes No Yes
BOXES019 Wooden Boxes No Yes

Notes:

  • For some reason the ICE## objects are present also in TEMPERAT.MIX
  • Ore mines are the objects in ore fields that grow new ore around them.

Appendix B: Overlay List

Appendix B.1: Tiberian Dawn

The values used in the ini file are the names of the SHP file for the overlay object, without the .shp, .tem or .sno extension (Note that there are no Desert specific overlays). Note that these names are case insensitive.

Object Name Description Mixfiles
BARB Barbwire fence CONQUER.MIX
BRIK Concrete wall CONQUER.MIX
CYCL Chainlink fence CONQUER.MIX
FPLS CTF flagbase CONQUER.MIX
SBAG Sandbag wall CONQUER.MIX
SCRATE Steel crate (Heal) CONQUER.MIX
WCRATE Wooden crate (Credits) CONQUER.MIX
WOOD Wooden fence CONQUER.MIX
TI1 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI2 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI3 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI4 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI5 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI6 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI7 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI8 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI9 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI10 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI11 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
TI12 Tiberium TEMPERAT.MIX, DESERT.MIX, WINTER.MIX
V14 Farmland TEMPERAT.MIX, WINTER.MIX
V15 Farmland TEMPERAT.MIX, WINTER.MIX
V16 Farmland TEMPERAT.MIX, WINTER.MIX
V17 Farmland TEMPERAT.MIX, WINTER.MIX
V18 Farmland TEMPERAT.MIX, WINTER.MIX

Appendix B.2: Red Alert

Red Alert stores it’s overlay information in a packed format. The decoded data has one byte for every tile of the map, describing the overlay object to be placed there.

Object Name Byte value Description Mixfiles
None 0xFF No overlay here N/A
SBAG 0×00 Sandbag wall CONQUER.MIX
CYCL 0×01 Chainlink fence CONQUER.MIX
BRIK 0×02 Concrete wall CONQUER.MIX
BARB 0×17 Barbwire fence (Tiberian Dawn) CONQUER.MIX
WOOD 0×04 Wooden fence CONQUER.MIX
GOLD01 0×05 Ore TEMPERAT.MIX, SNOW.MIX
GOLD02 0×06 Ore TEMPERAT.MIX, SNOW.MIX
GOLD03 0×07 Ore TEMPERAT.MIX, SNOW.MIX
GOLD04 0×08 Ore TEMPERAT.MIX, SNOW.MIX
GEM01 0×09 Gems TEMPERAT.MIX, SNOW.MIX
GEM02 0x0A Gems TEMPERAT.MIX, SNOW.MIX
GEM03 0x0B Gems TEMPERAT.MIX, SNOW.MIX
GEM04 0x0C Gems TEMPERAT.MIX, SNOW.MIX
V12 0x0D Haystacks TEMPERAT.MIX, SNOW.MIX
V13 0x0E Haystack TEMPERAT.MIX, SNOW.MIX
V14 0x0F Farmland TEMPERAT.MIX, SNOW.MIX
V15 0×10 Farmland TEMPERAT.MIX, SNOW.MIX
V16 0×11 Farmland TEMPERAT.MIX, SNOW.MIX
V17 0×12 Farmland TEMPERAT.MIX, SNOW.MIX
V18 0×13 Farmland TEMPERAT.MIX, SNOW.MIX
FPLS 0×14 CTF flagbase CONQUER.MIX
WCRATE 0×15 Wooden crate (Credits) CONQUER.MIX
SCRATE 0×16 Steel crate (Heal) CONQUER.MIX
FENC 0×17 Barbwire fence (Soviet) CONQUER.MIX
WWCRATE 0×18 Water crate CONQUER.MIX

Appendix B.3: Smudges

The first value of the comma-seperated list in the Smudge section of the INI file is the name of the SHP file, without the .tem, .des, .win or .sno (Red Alert) extension.

These craters and scorch marks are only available in the Temperate, Desert and the Winter/Snow theaters, and are identical in shape in all theaters (except for Red Alert’s CR1 and CR2, see the note below). However, the smudges do not look the same in Tiberian Dawn as they do in Red Alert. Red Alert’s INTERIOR.MIX file does not contain any of the smudge graphics, so craters and scorch marks shouldn’t appear on Interior maps.

  • Craters
    • CR1
    • CR2
    • CR3
    • CR4
    • CR5
    • CR6
  • Scorch marks
    • SC1
    • SC2
    • SC3
    • SC4
    • SC5
    • SC6

Note: Red Alert: CR1 in TEMPERAT.MIX is CR2 in SNOW.MIX, while CR2 in TEMPERAT.MIX is CR1 in SNOW.MIX

Appendix C: Unit List

Appendix C.1: Tiberian Dawn

Units internally have 4 letter long names. These names are used in the INI file and are also used for the .shp filename in CONQUER.MIX.

Units consist of 32 sprites. Every sprite has a slightly rotated version of the unit, in steps of -11.25 degrees. Hence, you can figure out the sprite to draw using the following formula:

(360 - rotation) / 11.25     // Rotation is in degrees

If the ‘Turret’ field below says yes, the unit has an independently moving turret. In this case the shpfile contains 64 sprites as opposed to 32. The last 32 sprites are the turret’s graphics.

Name Description Turret Notes
A10 A10 Warthog No Airplane used for the GDI airstrikes.
APC APC No Has 6 extra sprites for the (un)loading animations.
ARTY Artillery No
BGGY NOD Buggy Yes
BIKE NOD Recon Bike No
BOAT GDI Gunboat Yes Has 192 sprites: Only has a 90 or 270 degree rotation but the launcher can fully rotate, and the boat has graphics for all 3 levels of damage (like structures do), in both directions. 2 directions * 32 turret rotations * 3 levels of damage = 192 sprites. wake.shp has to be drawn behind it for the wake animation.
C17 Cargo Plane No Drops NOD units off at the airfield.
FTNK NOD Flame Tank No
HARV Harvester No Has 2 sprites per direction, for the harvesting animation. NOD Harvester is drawn with structurecolors instead of unitcolors.
HELI NOD Apache Helicopter No
HTNK GDI Mammoth Tank Yes
JEEP GDI Hummvee Yes
LST Hovercraft No Only has 4 sprites, for 0, 270, 180 and 90 degree rotations respectively.
LTNK NOD Light tank Yes
MCV MCV No Rotates to 213.75 degrees before deploying.
MHQ Mobile HQ Yes ‘Turret’ is a constantly rotating radar.
MLRS NOD SSM Launcher Yes Has 3 sets of turret sprites. The sets are for the rotations of a turret with two missiles, with one missile and with no missiles, respectively.
MSAM GDI Rocket Launcher Yes Turret has to be raised before launch. Hence there are seperate sets of turret sprites for the lowered and raised states (total sprites: 96).
MTNK GDI Medium Tank Yes
ORCA GDI Orca No The orca banks forward while moving. The file has 32 sprites for the horizontal and the banked state, respectively.
RAPT Velociraptor No Has 184 sprites to allow for walking and attacking animations, but is not infantry.
STEG Stegosaurus No Has 198 sprites to allow for walking and attacking animations, but is not infantry.
STNK Stealth tank No
TRAN Chinook Transport No Has 4 extra sprites for the (un)loading animation.
TREX Tyrannosaurus Rex No Has 194 sprites to allow for walking and attacking animations, but is not infantry.
TRIC Triceratops No Has 196 sprites to allow for walking and attacking animations, but is not infantry.

Appendix C.2: Red Alert

Units internally have 4 letter long names. These names are used in the INI file and are also used for the .shp filename in CONQUER.MIX.

Units consist of 32 sprites. Every sprite has a slightly rotated version of the unit, in steps of -11.25 degrees. Hence, you can figure out the sprite to draw using the following formula:

(360 - rotation) / 11.25     // Rotation is in degrees

If the ‘Turret’ field below says yes, the unit has an independently moving turret. In this case the shpfile contains 64 sprites as opposed to 32. The last 32 sprites are the turret’s graphics.

Name Description Turret Notes
1TNK Allied Light Tank Yes
2TNK Allied Medium Tank Yes
3TNK Soviet Heavy Tank Yes
4TNK Soviet Mammoth Tank Yes
APC APC No Has 6 extra sprites for the (un)loading animations.
ARTY Artillery No
BADR Badger Bomber No Used for paradrops and parabombs. Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
CA Cruiser Yes The turret animations for ships are not part of the main shp file. Has two turrets, found in ttur.shp. The ship itself only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
DD Destroyer Yes The turret animations for ships are not part of the main shp file. The turret can be found in ssam.shp. The ship itself only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
FTNK Flame Tank No Tiberian Dawn flame tank sprites.
HARV Harvester No Has 111 sprites. The first 32 are the normal rotations. then there are 8 sets of 8 sprites for the harvesting animation in the 8 main directions. Then there are 15 sprites for the unloading animation (direction: 270 degrees).
HELI Allied Apache No
HIND Soviet Hind No
JEEP Allied Ranger Yes
LST Transport (Hovercraft) No Has 5 sprites. The transport does not rotate and the first sprite is it’s normal/moving state. The last 4 sprites are used for the (un)loading animation.
MCV MCV No
MGG Mobile Gap Generator No Has 8 extra sprites which are it’s gap generator, which constantly rotates.
MHQ Mobile HQ Yes Tiberian Dawn sprites. ?Turret? is a constantly rotating radar.
MIG Soviet MIG No Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
MLRS SSM Launcher Yes Tiberian Dawn sprites. Has 3 sets of turret sprites. The sets are for the rotations of a turret with two missiles, with one missile and with no missiles, respectively.
MNLY Mine Layer No Drops anti-tank or anti-infantry mines depending on owner’s side. Has 16 extra sprites for the laying animations, 2 for each main direction.
MRJ Mobile Radar Jammer Yes Same sprites as MHQ. ‘Turret’ is a constantly rotating radar.
ORCA Orca No Tiberian Dawn Orca sprites, but with the word ‘HIND’ written over them. The orca banks forward while moving. The file has 32 sprites for the horizontal and the banked state, respectively.
PT Gunboat Yes The turret animations for ships are not part of the main shp file. The turret can be found in mgun.shp. The ship itself only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
SMIG Spy Plane No Is not actually used by Red Alert (U2 is used instead).Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
SS Soviet Submarine No Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
STNK Phase Tank Yes Sprites 33-38 are the (un)loading animations. Turret sprites start at sprite 39.
TRAN Chinook Transport No Has 4 extra sprites for the (un)loading animation.
TRUK Supply Truck No
U2 Spy Plane No Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
V2RL V2 Rocket Launcher No Respectively has 32 sprites for rotations with a missile, 32 sprites for rotations without a missle, 8 sprites for the main directions with the launcher raised, and 8 sprites for the main directions with the launcher raised without a missile (80 sprites total).
YAK Soviet Yak No Only has 16 sprites for rotations (Formula: (360 - rotation) / 22.5).
ANT1 Giant Ant No Has 112 sprites to allow for walking and attacking animations, but it’s not infantry.
ANT2 Giant Ant No Has 112 sprites to allow for walking and attacking animations, but it’s not infantry.
ANT3 Giant Ant No Has 112 sprites to allow for walking and attacking animations, but it’s not infantry.
CARR Helicarrier No Does not rotate. Has 9 sprites for the animations
CTNK Chrono Tank No
DTRK Demo Truck No
MSUB Missile Sub No
QTNK M.A.D. Tank No Respectively has 32 normal rotation sprites, and 8 sets of 8 sprites for deployment animations in the 8 main directions (total sprites: 96).
TTNK Tesla Tank Yes

Appendix D: Structure List

Appendix D.1: Tiberian Dawn

… TODO …

Appendix D.2: Red Alert

… TODO …

Appendix E: Unit Action List

… TODO …

Appendix E.1: Tiberian Dawn

Appendix E.2: Red Alert

… TODO …

Appendix F: Trigger Event List

Appendix F.1: Tiberian Dawn

… TODO …

Appendix F.2: Red Alert

… TODO …

Appendix G: Trigger Action List

Appendix G.1: Tiberian Dawn

… TODO …

Appendix G.2: Red Alert

… TODO …



Leave a comment

Name (required)

Mail (will not be published) (required)

Website