The TDF file within the download directory contains information that tells the game which construction unit's build menu to put your unit in. The file is a text file that is typcially given a name like unitname.tdf, where "unitname" is the unit's short name. However, the filename doesn't matter, since the unitname is defined inside the TDF. This way, you could put all the units built in a single factory in one .TDF if you wanted.
Within the TDF file in the download directory are (possibly) multiple occurrances of blocks of statements like the following example:
[MENUENTRY0]
{
UNITMENU=CORAVP; // Who Builds It?
MENU=4; // Which Menu?
BUTTON=2; // Which Button?
UNITNAME=CORGOL; // Unit To Be Built
}
Within a TDF file in the download subdirectory, the following variables have meaning:
| Variable | Description | Examples |
|---|---|---|
| [MENUENTRYX] | Set to a value of "MENUENTRY0", "MENUENTRY1", etc. depending on how many blocks of information you have in this particular file. It simply ennumerates the entries within the file. | [MENUENTRY0] |
| BUTTON | Set to a value of 0-5, depending on which position on the build menu "page" does the button appear in. | button=2; |
| MENU | Set to the number of the menu you wish the unit's build menu button to appear (i.e. which build menu "page" does it appear on). The only confusing thing about this variable is that the first menu is actually menu #2. The second is #3, and so on. This still applies in Spring, since the game subtracts 2 from the value in the source to get to the first page. | menu=4; |
| UNITMENU | Set to the short name of the construction unit that is able to build your unit (e.g. ARMALAB for the ARM Advanced Kbot Lab). | unitmenu=CORAVP; |
| UNITNAME | The short name of your unit. | unitname=CORGOL; |
Build menu locations for units must be unique. That is, each build menu location for each unit that can build other units must be occupied by only one unit. Later Spring versions will probably feature auto build menu sorting to resolve any conflicts, however.
Note: That was for TA. In Spring, it seem to works like that:
Spring calculate order=menu+6*button. Then to make the ingame menu it sorts all things built by the same builder in increasing order, skipping gap, and using only unit if two have the same order. For instance, if you have a unit with (menu=0 button=12 it will use the same slot as menu=2 button=0, and only one of the two may appear). By tradition, buildmenus starts at menu=2 button=0. Note: I found that by trial in error, not by looking at the source.
