Spring only requires three TDF files in the gamedata directory: Mod_Development:Gamedata#MOVEINFO.TDF, Mod_Development:Gamedata#SIDEDATA.TDF, and Mod_Development:Gamedata#SOUND.TDF. Yes, only three, but the game will not function without them.
Contents |
MOVEINFO.TDF
The movement properties of units are not defined individually for pathfinding reasons. Instead, their movement properties are specified in terms of "it moves like a unit of this type."
Within a unit's FBI file, the movement class is specified through the use of the MovementClass variable (for example, a unit may specify its MovementClass as "MovementClass=TANKBH3;"). The MOVEINFO.TDF file defines these "movement classes" as the following exerpt shows:
[CLASS0]
{
Name=KBOTSS2;
FootprintX=2;
FootprintZ=2;
MaxWaterDepth=12;
MaxSlope=32;
CrushStrength=30;
}
[CLASS1]
{
Name=KBOTSF2;
FootprintX=2;
FootprintZ=2;
MaxWaterDepth=12;
MaxSlope=11;
CrushStrength=30;
}
Here's a rundown of what the tags mean:
| Variable | Description | Examples |
|---|---|---|
| [CLASSX] | Just a counter, basically. Start at 0 and increment the number by one for each new entry. | [CLASS0] |
| CrushStrength | The amount of power this unit has for running things like trees over. | CrushStrength=30; |
| FootPrintX | The general size of the units in this category. Used for pathfinding. The entries in the FBI file for this and FootPrintZ take priority for the groundplate size at the very least. | FootPrintX=2; |
| FootPrintZ | The general size of the units in this category. Used for pathfinding. The entries in the FBI file for this and FootPrintX take priority for the groundplate size at the very least. | FootPrintZ=3; |
| Name | The name of the movement class. This is what <a href='fbi.html#movementclass'>MovementClass</a> in the FBI file references. | Name=KBOTSF2; |
| MaxSlope | The highest angle slope a unit in this class can go over. | MaxSlope=15; |
| MaxWaterDepth | The deepest water a unit in this class can wade in. | MaxWaterDepth=20; |
SIDEDATA.TDF
The SIDEDATA.TDF file is the file that tells the game which teams are active and which commander units to use.
The information in this file can be broken down into two parts: Side Information, and Can-Build Information:
[SIDE0]
{
name=Arm; //Must always be Arm or Core
commander=ARMCOM; //Can point to whatever your commander's internal name is
}
[SIDE1]
{
name=Core; //Must always be Arm or Core, opposite of what you put in SIDE0
commander=CORCOM; //Can point to whatever your commander's internal name is
}
[CANBUILD]
{
}
Side Information
The "side information" tells the game what the team's faction name is and what commander unit it uses. The faction name can be whatever you like, and the commander tags can be whatever you please as well.
Canbuild Information
[CANBUILD] can be used as an alternative method to define your mod's build tree. Just make it look something like this:
[CANBUILD]
{
[ARMCOM]
{
canbuild1=ARMSOLAR;
canbuild2=ARMWIN;
canbuild3=ARMESTOR;
canbuild4=ARMMSTOR;
canbuild5=ARMMEX;
canbuild6=ARMMAKR;
canbuild7=ARMLAB;
canbuild8=ARMVP;
canbuild9=ARMAP;
canbuild10=ARMSY;
canbuild11=ARMLLT;
canbuild12=ARMRAD;
canbuild13=ARMSONAR;
canbuild14=ARMTIDE;
canbuild15=ARMUWES;
canbuild16=ARMUWMS;
canbuild17=ARMUWMEX;
canbuild18=ARMFMKR;
canbuild19=ARMTL;
}
[ARMLAB]
{
canbuild1=ARMCK;
canbuild2=ARMPW;
canbuild3=ARMROCK;
canbuild4=ARMHAM;
canbuild5=ARMJETH;
canbuild6=ARMWAR;
canbuild7=ARMFLEA;
}
}
Within the [CANBUILD] section, each unit is listed by its short name (for example, the ARM Commander is "ARMCOM"), followed by an ennumerated list of what units it can build. Each build menu item is numbered and represents one of the buttons on each build menu page. Thus, you must increment the number for each new line.
SOUND.TDF
Just as unit movement classes are defined by the MOVEINFO.TDF file, sound categories are defined in a similar manner in the SOUND.TDF file. A unit is assigned a particular sound category in its FBI file using the SoundCategory variable. Here's an example from SOUND.TDF:
[ARM_KBOT]
{
select1=kbarmsel;
ok1=kbarmmov;
arrived1=kbarmstp;
cant1=cantdo4;
underattack=warning1;
canceldestruct=cancel2
}
Each variable within the SOUND.TDF file represents a different sound that the unit makes when it is selected, when it arrives at its destination, when it can't do something, etc. The value that is assigned to each sound variable represents a WAV file within the sounds subdirectory that contains the sound that is to be made. Spring does not support the countdown beeps like Total Annihilation.
