Logo
Spacer News Wiki Features F.A.Q. Team members Screenshots Download Messageboard Bug tracker Submit files
Top divider

Units:FBI

Nearly all information about a unit is stored in an FBI file. The FBI file is a simple text file with the following format:

[UNITINFO]
{
	Variable = Value;     
	Variable2 = Value2;     
    ...     
}

As the FBI file contains most of the core data for a unit, there is a minimum amount of information you must include. The colors are specified as:

Red - Mandatory tags for all units
Blue - Mandatory tags for mobile units only, though some may be usable by buildings
Purple - Mandatory tags for buildings only, though some may be usable by mobile units
Green - Mandatory tags for construction units, both mobile and non-mobile
Plain text - Tags which are not required but may be used

Remember, optional tags are just that--optional--so there will be no harm if you do not include them. You can click a tag name to jump down to a detailed description of it.

Pay attention to the descriptions of the variables listed below, as some of them are quite important to defining the look, feel, and behavior of the unit. The variables that are always either true or false use booleans to designate their status: 1 for true, 0 for false. All values are assumed to be NULL or 0 if they are not defined, except in some special cases such as SelfDestructCountdown.

All FBI-tags load by the spring engine can be found here.
All FBI-variable values: min, max, default, type can be found here.

All variable names are case insensitive

[edit] Example FBI File

[UNITINFO]

{ //Internal settings BuildPic=filename.bmp; Category=CORE TANK LEVEL2 WEAPON NOTAIR NOTSUB; ObjectName=InternalName; Side=ARM; TEDClass=TANK; UnitName=InternalName;


//Unit limitations and properties ActivateWhenBuilt=1; BuildDistance=100; BuildTime=1000; Corpse=corpsename; DamageModifier=0.5; Description=Obvious; MaxDamage=100; Name=Unit Name; RadarDistance=200; RadarDistanceJam=200; SightDistance=200; SonarDistance=200; SonarDistanceJam=200; SoundCategory=CORE_TANK; Upright=1; WorkerTime=100; levelground=1;


//Energy and metal related BuildCostEnergy=100; BuildCostMetal=100; EnergyMake=1.0; EnergyStorage=0; EnergyUse=1.0; ExtractsMetal=0.003; MakesMetal=1; MetalMake=1.0; MetalStorage=0; MetalUse=1.0; TidalGenerator=1; WindGenerator=1;


//Pathfinding and related Acceleration=0.05; BrakeRate=0.05; FootprintX=2; FootprintZ=1; MaxSlope=15; MaxVelocity=1.0; MaxWaterDepth=20; MinWaterDepth=20; MovementClass=TANKBH3; TurnRate=300; Waterline=20; YardMap=cccccc ccoocc ccoocc;


//Abilities Builder=1; Airhoverfactor=0; CanAttack=1; CanCapture=1; CanFly=1; CanGuard=1; CanHover=1; CanMove=1; CanPatrol=1; CanStop=1; CantBeTransported=1; CloakCost=100; CloakCostMoving=100; CruiseAlt=50; Floater=1; HighTrajectory=2; HoverAttack=1; Init_Cloaked=1; IsFeature=1; IsTargetingUpgrade=1; LeaveTracks=1; MinCloakDistance=100; OnOffable=1;

       Reclaimable=0;

Stealth=1;


//Abilities new to Spring LeaveTracks=1; TrackOffset=x; TrackStrength=x; TrackStretch=1; TrackType=StdTank; TrackWidth=x; CanDropFlare=1; FlareDelay=0.3; FlareDropVector=0 0 -1; FlareEfficiency=0.3; FlareReload=5;


//Weapons and related BadTargetCategory=NOTAIR; ExplodeAs=BIG_UNITEX; Kamikaze=1; KamikazeDistance=50; NoChaseCategory=NOTAIR; SelfDestructAs=BIG_UNIT; SelfDestructCountdown=5; Weapon1=WeaponName; Weapon2=WeaponName; Weapon3=WeaponName; wpri_badTargetCategory=NOTAIR; wsec_badTargetCategory=NOTAIR; wspe_badTargetCategory=NOTAIR;

}

[edit] Detailed Description of FBI Tags

 </tr>
Variable Description Examples
Airhoverfactor Less then zero 0 means it can land and greater then or equal to zero 0 indicates how much the unit will move during hovering on the spot. airhoverfactor=-0.3;
Acceleration How fast the unit accelerates. Acceleration=0.5;
ActivateWhenBuilt Is the default state of this unit ACTIVATED (or ON) when built. ActivateWhenBuilt=1;
Autoheal health per second that a unit allways will be autohealed for (default 0). Autoheal=1;
BadTargetCategory The type of target which the unit will not shoot at if there are other targets available. The value specified identifies all units that have that value specified in their own Category settings. BadTargetCategory=VTOL;
BrakeRate The rate at which the unit can slow down. BrakeRate=9;
BuildCostEnergy How much energy the unit costs. BuildCostEnergy=985;
BuildCostMetal How much metal the unit costs. BuildCostMetal=120;
BuildPic The buildpic which is displayed in buildmenus, an image located in the UnitPics directory. If this is not defined, it will default to UnitName.pcx. See Units:Buildpics for supported filetypes. BuildPic=CorKrog.bmp;
BuildTime The time it takes to build the unit. On average, 10000 is medium time, things like fusion plants are more like 100000, and Krogoth like 300000. This value isn't alone in calculating build times, however; it also depends on the workertime of the factory and any assisting units. Use this formula: Time to build = BuildTime / WorkerTime, where WorkerTime is the WorkerTime value of the factory BuildTime=9894;
BuildDistance The distance at which a unit can build if it is a builder. BuildDistance=80;
Builder Can this unit build other units. Builder=1;
CanAttack Can the unit attack. Spring will ignore this and give an orders button and allow the unit to fire anyway if Weapon1 or other weapon tags are set. CanAttack=1;
CanCapture Can this unit capture other units. CanCapture=1;
CanDropFlare Can this aircraft drop flares, which can shake missiles off its tail CanDropFlare=1;
CanFireControl Determins if this unit has the fire control toggle. CanFireControl=0;
CanFly Can this unit fly. Note that you can not turn off flying dynamically; the unit either flies or it doesn't, not both. CanFly=1;
CanGuard Can this unit guard other units. If not set to 1, it will disable both the button and the ability. CanGuard=1;
CanHover Is this unit a hovercraft? CanHover=1;
CanMove Can this unit move. All mobiles require this. If it is not set, the unit will not be able to move at all (out of the factory, for example), and the button will not appear. CanMove=1;
CanPatrol Can this unit have patrol routes. If not set to 1, it will disable both the button and the ability. CanPatrol=1;
CanStop Can this unit stop. Spring ignores this and gives all units a Stop button and function. CanStop=1;
CantBeTransported This tag will make a unit unable to be transported by any transport, unless zwzsg has a hand in scripting it ;) CantBeTransported=1;
Category A category class. Essentially, this places the unit in several named catagories that can be named in other variables such as wpri_badTargetCategory described below. The Ctrl shortcuts don't seem to work in Spring. Category=ARM TANK LEVEL2 CONSTR NOWEAPON NOTAIR NOTSUB CTRL_B;
CloakCost The energy cost of this unit remaining cloaked when standing still. CloakCost=7;
CloakCostMoving The energy cost of this unit remaining cloaking while moving. CloakCostMoving=800;
Corpse The name of the corpse of this unit (Defined in the TDF file in the corpses directory) (12/29/98)  From Draconious: The name of the feature the unit turns into when the unit dies. If the unit has IsFeature set to true, such as Dragons Teeth, the unit instantly turns into this feature, when it is finished being built. (this is not the 3do file of the feature, the feature entry tells the 3do file to use in the feautres OBJECT variable). Corpse=fortification_core;
CruiseAlt The altitude at which the unit flies CruiseAlt=90;
DamageModifier This is a percentage in decimal form. When the Damage modifer is turned on (via script, or ActivateWhenBuilt), damage will be multiplied by this modifier. So to make a unit take half damage from all weapons, set this to 0.5. DamageModifier=0.7;
Description The description of the unit seen at the bottom of the screen when you hold the cursor over it in the game. Description=Very Heavy Assault Tank;
EnergyMake The energy this unit produces when ACTIVE (turned on). EnergyMake=9;
EnergyStorage The amount added to the maximum amount of energy you can store while the unit is alive. EnergyStorage=80;
EnergyUse The amount of energy the unit uses while it is ACTIVE (turned on) and/or moving. EnergyUse=9;
ExplodeAs The type of explosion the unit will explode as when destroyed by external forces. ExplodeAs=LARGE_BUILDINGEX;
ExtractsMetal The rate at which the unit extracts metal. The values are very small, for example the Moho Mines only have a value of 0.01. ExtractsMetal=0.003;
FireState The starting fire state of the unit. -1 indicates it should inherit from its factory. 0, 1 and 2 indicate Hold Fire, Return Fire and Fire at Will respectivly. FireState=2;
FlareDelay Presumably the time between the individual flare releases in a burst release of flares, like a burst weapon FlareDelay=0.3;
FlareDropVector Presumably the direction the flares will fire relative to the unit's origin. FlareDropVector=0 0 -1;
FlareEfficieny Presumably how likely the flare will succeed in distracting missiles FlareEfficieny=0.3;
FlareReload Presumably the reload time between flares FlareReload=5;
Floater Does this unit float on water (used for boats and floating buildings alike). Floater=1;
FootprintX The X axis footprint. The X-axis goes to the left and right of the unit. This should generally correlate with the unit model's groundplate in the 3DO file. This, in conjunction with FootPrintZ, determines the size of the selection square below the unit in game. FootPrintX=9;
FootprintZ As with FootPrintX, but the Z axis (forward and backwards relative to the unit's orientation). Should correlate with the unit model's groundplate. This, in conjunction with FootPrintZ, determines the size of the selection square below the unit in game. FootPrintZ=9;
HoldSteady Used by transports. Units trasported by a transport with HoldSteady=1 will always have their up direction the same as the transport's. HoldSteady=0 will cause transported units to either remain upright, or conform to the terrain, depending on their upright tag. HoldSteady=1;
HoverAttack Used for air units. This will make them strafe back and forth, constantly firing at their target rather than making fly-bys to attack, like a Brawler. HoverAttack=1;
HideDamage Used to hide a unit's health from the enemy, like fusions. 1 hides health and 0 shows health. HideDamage=1;
HighTrajectory For use with artillery units. This allows (or forces) artillery to fire in a high arc, rather than shooting low and fast. The advantage to this is that the artillery will fire over friendly units rather than getting on the front lines to fire, and it will also fire over hills. 0=only low, 1=only high, 2=user can choose (a GUI button appears for the unit) HighTrajectory=1;
idleAutoHeal health per second that a unit will be autohealed for whenever its idling (default 10) idleAutoHeal=10;
idleTime time in ticks without any action before a unit is considered idling (default 600) idleTime=600;
Init_Cloaked When finished building, the unit will automatically cloak. Init_Cloaked=1;
IsAirbase sets if the units that are being transported will be stunned or not, defaults to 0. IsAirbase=1;
IsFeature Is this unit a feature, for example, Dragons Teeth. Features do not appear on radar. IsFeature=1;
IsTargetingUpgrade Does this unit upgrade the targeting so that units shoot at things on radar like at things seen by that unit. In Spring, this will make auto radar targetting far more accurate. IsTargetingUpgrade=1;
Kamikaze Does this unit kill itself to attack its target, for example, the Roach/Invader. Kamikaze=1;
KamikazeDistance How far from the target must the unit be to do a kamikaze attack. KamikazeDistance=80;
LeavesTracks Does this unit leave tracks on terrain. LeavesTracks=1;
Levelground set this to 0 to prevent a building from leveling ground beneth it. Levelground=1;
MakesMetal Does this unit make metal, for example, Metal Makers. MakesMetal=1;
Mass Does this is the weight of the unit, default is metalcost of unit Mass=1024;
MaxAngleDif<1-16> defines how broad the cone is MaxAngleDif=360; (can fire everywhere)
MaxDamage Amount of damage unit can take before dying (i.e "Hit Points"). MaxDamage=992;
MaxSlope What is the maximum slope this unit can go on. This value is not overriden by the corresponding value in the MovementClass. Currently MaxSlope is in degree, but I'm lobbying to get it back to height difference. MaxSlope=8;
MaxVelocity What is the maximum speed of this unit. For reference, a Commander is 1.07, a Core Storm is 1.25, and an Arm Hawk is 12. MaxVelocity=9;
MaxWaterDepth What is maximum depth of water this unit can go in. This value is not overriden by the corresponding value in the MovementClass. MaxWaterDepth=35;
MetalMake How much metal the unit make on its own. MetalMake=1;
MetalStorage The amount added to your maximum metal storage while this unit is alive. MetalStorage=900;
MetalUse The amount of metal per tick the unit will use while turned on MetalUse=2;
MinCloakDistance The distance the unit must have on every side to remain cloaked. If another unit moves into this area, the unit uncloaks. MinCloakDistance=90;
MinCollisionSpeed The minimum net impact speed that will cause damage to the unit. MinCollisionSpeed=1;
MinWaterDepth The minimum depth of water this unit can be in. MinWaterDepth=8;
MovementClass How the unit moves. It is used as a shortcut way of setting certain parameters (such as those listed here) by grouping them and giving them a name. See MOVEINFO.TDF in the GameData directory. MovementClass=TANKSH3;
MoveState The starting move state of the unit. -1 indicates it should inherit from its factory. 0, 1 and 2 indicate Hold Pos, Maneuver and Roam respectivly. MoveState=-1;
Name The name of the unit you actually see in game. Also used by the multiplayer lobby. Name=Zipper;
NoChaseCategory Category the unit will not pursue. The value specified identifies all units that have that value specified in their own Category settings. NoChaseCategory=VTOL;
ObjectName Name of 3DO file for this unit. Generally the same as UnitName. ObjectName=CORWIN;
OnlyTargetCategory<weaponnum> sort of like badtargetcategory but the weapon can only target units with these categories,toairweapon in weaponfile is the same as OnlyTargetCategory=VTOL; default is all categories ;
OnOffable Can this unit be turned on and off. On is ACTIVE, OFF is INACTIVE OnOffable=1;
RadarDistance The radius of radar coverage the unit will provide. RadarDistance=700;
RadarDistanceJam The radius of radar coverage the unit will jam. It will also jam friendly radar. RadarDistanceJam=730;
Reclaimable If this unit can be reclaimed or not. Reclaimable=0;
SelfDestructAs The explosion that happens when a unit self desctructs. This is also what is used for kamikaze explosions, if the unit successfully kamikazes (otherwise it will explode as the explosion defined in ExplodeAs). SelfDestructAs=SMALL_UNIT;
SelfDestructCountdown The number the self-destruct count down starts at. Usually 5, but generally 2 for mines and kamikaze units. Can be whatever, though. SelfDestructCountdown=2;
Side Which side does the unit belong to ARM, or CORE. You can also define your own sides in your mod. I actually don't think this one matters too much, but it can't hurt. Side=CORE;
SightDistance The LOS radius of the unit. SightDistance=90;
SmoothAnim Don't update instantly the piece after move/turn now; instead wait till the next sleep, and move the piece smoothly if that sleep is between 30 and 300ms. Not only this is useless since any good script will know to use move/turn .. speed ...; when needed, but it also breaks any script that expect a move/turn now; not to take ages, for it is buggy and can take several minutes to finish a movement that should have been instant. SmoothAnim=1;
SlideTolerance Multiplies the the max slope for determining when skidding should begin due to slope. Values less than 1 will cause the unit to never start skidding due to slope. SlideTolerance=2;
SonarDistance The radius of sonar coverage the unit will provide. SonarDistance=650;
SonarDistanceJam The radius of sonar coverage the unit will jam. Presumably jams friendly sonar, much like radar jammers. SonarDistanceJam=650;
SoundCategory The sound category the unit uses. Sound categories are typically described in the SOUND.TDF file in the GameData folder. It is used to describe a group of sounds to associate with a unit, such as what sounds does it make when it starts, stops, arrives at a destination, is activated, is deactivated, etc. SoundCategory=VIPE;
Stealth Is this unit inivisible on sonar and radar. Stealth=1;
TEDClass Defines what type of unit the unit is. This may be used rather than the Category part in Spring for things like BadTargetCategory. TEDClass=WATER;
TidalGenerator Is the unit a Tidal generator? TidalGenerator=1;
TrackOffset This is how far forward from the middle the track should be created, experiment with it till you cant see the track being created TrackOffset=2;
TrackStrength This is how visible the track should be and how far it should stay on the ground, some example values could be goliath=10,bulldog=8,stumpy=6,flash=4. TrackStrength must not be greater than 10. TrackStrength=5;
TrackStretch This is how far the track is stretched in forward direction compared to the side direction, can probably be left at 1 TrackStretch=1;
TrackType This refers to a picture in bitmaps/tracks, can probably be left at stdtank if you dont want one with thinner/thicker tracks compared to the tank width or another pattern of the tracks (maybe one pattern for core and one for arm ?). Inside the picture the red channel refer to the brightness and the green channel to the alpha (how visible it is) of the track. Blue channel is unused. Maybe someone should improve the stdtank one also. TrackType=StdTank;
TrackWidth How wide the tracks are. '50' will give roughly the right size for a Goliath tank track. TrackWidth=50;
TransportCapacity The number of units the transport can carry
If this tag is not present, then any attach-unit and drop-unit command in the script will be ignored.
transportcapacity=5;
TransportMass this is the maximum weight a tranporter can transport, default 100000 transportmass=100000;
TransportSize The size of units that the transport can pick up, based on the unit-to-be-loaded's FootPrintX and FootPrintZ. transportsize=3;
TurnRate How quickly the unit turns. (Speed in degree per seconds = 0.16 * TurnRate(smoth)) TurnRate=999;
UnitName This is the internal name of your unit. It must not contain spaces, and probably shouldn't contain any special characters. UnitName=CORWIN;
Upright Is the unit upright? For kbots - this keeps the unit upgright when climbing hills. Can also be used to solve flipping problems when planes land. Upright=1;
Waterline How high up the 3d model to put the water line. For ships. Basically how deep in the water the ship sits. WaterLine=43;
Weapon1 The unit's primary weapon. The name specified is the name of a weapon described in any of the number of TDF files found in the weapons subdirectory. Weapon1=crblmssl;
Weapon2 The unit's secondary weapon. The name specified is the name of a weapon described in any of the number of TDF files found in the weapons subdirectory. Weapon2=coramph_weapon2;
Weapon3 The unit's tertiary weapon. The name specified is the name of a weapon described in any of the number of TDF files found in the weapons subdirectory. Weapon3=CORSEAP_WEAPON3;
WeaponMainDir<1-16> This is a vector and defines the direction of a cone in which the weapon can aim. See Units:WeaponMainDir for more information. Default WeaponMainDir = 0 0 1; (forward)
WeaponSlaveTo<x>=y this will force the weapon x to use the same target as weapon y (y must be a lower numbered weapon than x). Might be usefull for say a mech like unit with many different weapons that should target in the same direction. ;
WindGenerator The amount of energy generated by the wind by the unit. WindGenerator=30;
WorkerTime How quickly the unit nanolathes. WorkerTime=80;
wpri_badTargetCategory A bad target (lower chance of hitting) for the primary weapon. The value specified identifies all units that have that value specified in their own Category settings. wpri_badTargetCategory=VTOL;
wsec_badTargetCategory A bad target for the secondary weapon. wsec_badTargetCategory=VTOL;
wspe_badTargetCategory A bad target for the tertiary weapon. wspe_badTargetCategory=VTOL;
YardMap Defines in more detail the "footprint" of a construction yard (or any stationary building).  As an example, the ARM Adv. Air Plant data at the right has 6 groups of 7 values defining an X-Z coordinate "footprint" for the construction yard.  The following values are available:
  • "f" indicates the space is occupied by a feature (e.g. Dragons teeth)
  • "o" indicates occupied points on ground where a unit may not pass.  By default, all values are "o".
  • "O" - Occupied when building is open - never used.
  • "c" defines the "hole" (typically in construction plant units) where the units are built and where they enter or exit.  closed yard - "Openyard/Closeyard" on land.
  • "C" - closed yard - "Openyard/Closeyard" on water.
  • "w" seems to indicate those parts of a ship yard that are above water.
  • "g" (or "G") indicates that the space can operate over a geothermal vent.   Otherwise, operates just like an "O".  Created specifically for the geothermal plant.
  • "y" - standard yard - no footprint on land.
  • "Y" - standard water yard - no footprint on water.  "Y" is simply a location that will never have a footprint, no matter what.

As you know, footprints are square, but your units aren't always. This allows you to shape the footprint a little.  (i.e. ARMLAB, the corners are always "footprintless")

If the unit doesn't use "OpenYard"/"CloseYard" you can simply state "YardMap=o" no matter the size of the footprint.  You could also do the opposite by stating "YardMap=c", and the whole footprint will appear and disappear no matter the footprint size.

// For ARM Adv. Air Plant // FootprintX=7; // FootprintZ=6; YardMap=ooooooo ooooooo occccco occccco occccco occccco; // Thus, the "South" end of the plant is open

// while the other sides are blocked.

[edit] Control Variables for Aircrafts

With Spring 0.65b1 new FBI tags to set the control variables for aircrafts were added, there is not a really good description of those but SJ explained a bit on the forums:


"0.07", "UNITINFO\\WingDrag"); //drag caused by wings
"0.08", "UNITINFO\\WingAngle"); //angle between front and the wing plane
"0.005", "UNITINFO\\Drag"); //how fast the aircraft loses speed (see also below)
"0.1", "UNITINFO\\frontToSpeed"); //fudge factor for lining up speed and front of plane
"0.07", "UNITINFO\\speedToFront");//fudge factor for lining up speed and front of plane
"0.4", "UNITINFO\\myGravity"); //planes are slower than real airplanes so lower gravity to compensate


"0.8", "UNITINFO\\maxBank"); //max roll
"0.45", "UNITINFO\\maxPitch"); //max pitch this plane tries to keep
"500", "UNITINFO\\turnRadius"); //hint to the ai about how large turn radius this plane needs


"0.015", "UNITINFO\\maxAileron"); //turn speed around roll axis
"0.01", "UNITINFO\\maxElevator"); //turn speed around pitch axis
"0.004", "UNITINFO\\maxRudder"); //turn speed around yaw axis

Those were the ones added, dont really have any better descriptions of them than that. The numbers are the defaults.

Gunships use an entirely movement model so these values don't affect them at all.

Retrieved from "http://spring.clan-sy.com/wiki/Units:FBI"

This page has been accessed 5,734 times. This page was last modified 17:47, 12 June 2008.