/* =this inform about the start of an neutral zone for spring that will not read and allow comments
this text is extract from the changelog76b1 with all new *.fbi tags and some others from the tutorials
inform about the end of an neutral zone for spring */
/* the file is a .txt renamed to a .fbi all lines finish by a ; and an enter/return key alls: { need a: } same for: [ need a: ] this file is a plane transport with weapon in turet and work corectly , it can be used so or with removing all text after the // to the end of line and all text between /* */
*/
//inform about the end of this line is neutral zone for spring
[UNITINFO]{
UnitName=Anhur;//name is the same as .cob file
//file names tags= SoundCategory=manu; //name of the spring\gamedata\sounds.tdf containing the file name of the .wav or .ogg related at each action //sounds={ok='oksound',cancel={'cancel1','cancel2',},select ={{ file = 'selsound1',volume = 2.0 },{ file = 'selsound2',volume = 2.5 },etc...},}//this line replace or complete souncategory=*; Objectname=Anhur; //name of the model 3d in spring\objects3d\ *.3do corpse=anhur_dead; //name of the death corpse data in spring\features\corpses\*.tdf ExplodeAs=obusf; //name of the weapon data efect when dead in spring\weapons\*.tdf SelfDestructAs=obusf; //name of the weapon data efect when suicid or kamikaz attack in spring\weapons\*.tdf buildpic=Anhur.jpg; //name of menu picture in spring\unitpics\*.jpg *.pcx *.png *.bmp weapon1=gecal; //name of the weapon 1 data efect attack in spring\weapons\*.tdf //(1 to 16 weapons related to the .cob where the total_annihilation compatibility allow only 3 weapons nammed: wpri=*; wsec=*; wspe=*;
//free tags
Category=gun load air ;
//NoChaseCategory=air;//dont folow the unit hav this cathegory
//badtargetCategory=air;//dont atack the unit hav this cathegory
//onlytargetCategory=air;
Name=Anhur;//menu name
Description=aero transp gun; //menu text
//tedclass=vtol;//related to map speed modifier
//side=walker;//?
//on|off true|false 1|0 :tags
canmove=1;
canpatrol=1;
canstop=1;
canguard=1;
canattack=1;
Canfly=1;
canload=1;
HoverAttack=0;
shownanoframe=1;
immunetoparalyzer=0;
collide=1; canSelfDestruct =1;
//value tags
SelfDestructCountdown=0;
FootprintX=6;
FootprintZ=6;
MaxWaterDepth=5;
MaxSlope=30;//Units on a slope steeper skid down it.
BadSlope=15;//slow itself relative to the angle of the slope.
MaxWaterSlope=35; BadWaterSlope=25; CrushStrength=100; mass=30;//900 is very heavy and nuc can just push it,500 will rebound 3 or times Upright=0;//always vertical cruisealt=120; MaxVelocity=16;//max speed BrakeRate=.9; Acceleration=.1; TurnRate=3000; SightDistance=700;//visibility //stealth=1;//not see on radars //InitCloaked=1;// Changed init_cloaked to initcloaked. //invisible at born //decloakSpherical=1;//(defaults to true).
//CloakCost=500;//energy drained when cloack on //MinCloakDistance=200;//ennemy near than disable invisibility //RadarDistance=1500;//radius view & sight ennemy air & ground icon inacuratly //SonarDistance=500;//radius view & sight ennemy sub water icon inacuratly //RadarDistanceJam=300;//radius disable the radars //SonarDistancejam=200;//radius disable the sonars EnergyStorage=30; MetalStorage=1; BuildCostEnergy=3000; //1,025 bv BuildCostMetal=600; BuildTime=3000;//millisecond for born when builder have workertime=100; nanocolor=245 045 145;//Red Green Blue WeaponMainDir1=0 -1 0.5;//-1 -1 -1 left low rear x:0 y:0 z:0 for MaxAngleDif1=*; MaxAngleDif1=180 ;//conic freedom =use only if the *.cob have not //WeaponSlaveTo3=2;//weapon sight the same target than (only lower number) //MaxFuel=180;
// RefuelTime=2;
// WeaponFuelUsage1=3;
// WeaponFuelUsage2=3;
// MinAirBasePower=660;
MaxDamage=500;//life count related to damage in weapon AutoHeal=50;//ever life/second added idleTime=3000; //millisecond after atack idleAutoHeal=200;//life/second added after idletime HoldSteady=1;//- Removed the check for Air movetype for holdSteady FBI tag, so now ground
transports can use it too.
transportmass=800; TransMaxUnits=1; transportsize=3; transportcapacity=1; transportUnloadMethod = 2; // 0 - land unload, 1 - flyover drop, 2 - land flood
fallSpeed = 10;// speed of all units it drops unitFallSpeed = <float>;//unitFallSpeed is used on each transported unit to override fallSpeed.
minTransportSize=2;//the smallest size footprint can load
minTransportMass=300;//smallest mass unit can load.
unloadSpread=2;// spacing between
units in an area unload , multiple, default is 1.
factoryHeadingTakeoff=0;//(default=1)planes start matching factory's heading after taking off from the pad, false maintain the heading of the pad until reaching wantedHeight.
}
//the end is here
/*inform about the start of an neutral zone for spring that will not read it and allow comments
others tags can be used for various units
frontToSpeed=0.07;
speedToFront=0.07;
maxAileron=0.005;
maxElevator=0.0075;
maxRudder=0.0075;
airhoverfactor=0;
AirStrafe=0;
//BankScale=1; Isairbase=1;
//shownanospray=1;
SmoothAnim=1;
UnitRestricted=1;
Reclaimable=1; HighTrajectory=2; TransportByEnemy=0; //SeismicDistance=1600; SeismicSignature=3.5; BMcode=1; onoffable=1; activatewhenbuilt=1; leaveTracks=1; trackWidth=32; trackOffset=1; trackStrength=2; trackStretch=1; trackType=manuTrack; CanBeAssisted=1; //ID=6; //height=2;
Builder=1; canBuild=1; canRepair=1; canRestore=1; canReclaim=1; canAssist=1; CanCapture=1; buildRange3D=1; WorkerTime=30000; //RepairSpeed=1000;
// ReclaimSpeed=2000;
// TerraformSpeed=1000;
// capturespeed=2500;
Builddistance=250; myGravity=10; isfeature=1; //Commander=1; WindGenerator=50; ExtractsMetal=0.9; //HideDamage=1; LevelGround=0;//Disabled the ground flattening when building mobile units.
YardMap=ooGGoo ooGGoo ooGGoo ooGGoo ; //iconType=commandericon; //ArmorType=LIGHT; MovementClass=roller4; cantBeTransported=0|1; if set to 1 no transport can load this unit.
pushResistant=1;
- Transporters can carry hovers and ships now.
- Transporters now check ground slope before unloading.
- Loaded air transports no longer land on stop command .
- Mobile units under hold position in a temporary attack order don't move away
from their patrol route anymore.
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: NaodW29-pre7c7d73555f6cd7ee00000001 All variable names are case insensitive
footprintx=1;(1 = 16 pixels) Unit Speed : 1 Unit Speed =12 m/second Unit acceleration : 1 Unit acceleration = 12 m/second/second peed….. 1 unit speed = 30 pixel/second…. Unit Turn Rate : The formula is : 6.0975 Unit Turn Rate = 1 degree/second Maximal unit turnrate = 999 = 999/6.0975 = about 163 degree/second The TA missile turnrate is calculated in 64k degree/second. 360 degree/second=64000. If you have TA based objects you should know it already. A 1x1 base = 16 x 16 meters in Lightwave.
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.</div> 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; 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 <i>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; 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; 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; 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; 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; 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; 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; 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. What makes building be built on ground, water surfaace, or sea floor, are the tags: MaxWaterDepth MinWaterDepth YardMap If the yardmap is made of y, o, c, g, G, O, f, then the building is either ground, underwater, or both. If the yardmap is made of Y, w, C, then the building is floating. Ground and underwater yardmaps: - y=left free - o=always occupied - c=open when open and closed when closed - O=ground, closed when open and open when closed - G= geothermal vent - g=geothermal vent - f=feature(????) Floating yardmaps: - Y=left free - C=open when open and closed when closed - w= part above water
What is new in Spring? Using very special transport, buildings can be moved. Mobile units can build others mobile units. No weapon ID conflict, no unit limit, not unit size limit! (But size of all combined texture limit :( ) Units can clear down trees and wreckages. The pushing strenght of a unit is determined by a tag such as CrushStrength=30; The resistance of a feature is determined by its mass calculated by Mass=0.4*Metal+0.1*Health.
Save trees which have a mass of 20.
-HighTrajectory now requires a HighTrajectory tag in the unit file (0=only low, 1=only high,2=choose) For instance, if you want your Primary Weapon to have a 90° fire arc forward, you'd write: WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward! MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction
To make a unit leave tracks on the map,
you must add five lines to the unit's .FBI file:
leavetracks=1; //this is a boolean. It must be '1' for tracks to work at all. trackwidth=x; //how wide the tracks are. '50' will give roughly the right size for a Goliath tank track. trackoffset=x; //this is how far forward from the middle the track should be created.
Experiment with it until you can't see the track being created.
trackstrength=x; //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.
trackStretch=1; //this is how far the track is stretched on the forward direction (z axis) compared to the side direction (x axis). It can probably be left at 1 tracktype=StdTank; //this refers to a picture in bitmaps/tracks, can probably be left at stdtank if you don't want one with thinner/thicker tracks compared to the tank width or another pattern of the tracks. 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.
Planes can be made to drop flares with FBI tags such as: CanDropFlare=1; FlareReload=5; FlareEfficieny=0.3; FlareDelay=0.3; FlareDropVector=0 0 -1; You can specify what builpic to use, with a FBI tag such as: BuildPic=MyUnit_Spring_Special_BP.bmp; The picture must still be put into /UnitPics/, and can be any image format currenly supported by Spring:
- .bmp (up 16 millions color)
- .pcx (only 256 colors but custom palette accepted)
- .jpg
- .dds (nvdia format used by map tiles)
Units have the option to fire weapons at a high trajectory using the new HighTrajectory tag in the unit .fbi file.
Use the following values when applying this tag: (0=only low, 1=only high,2=choose)
Spring allows the use of animation interpolation which is enabled with the tag SmoothAnim=1;. It is disabled by default. It is intended to make kbot walk animations that use move-now followed by sleep commands look smoother. It works like this: When a move-now or a turn-now command is detected, it is saved to a list of delayed animations, instead of updating the piece coordinates directly. When the script is finished, if the script finished because of a call to sleep with a 30 < sleeptime < 300,
these delayed animations are translated into interpolated ones for the duration of the sleep. Otherwise the values are updated directly.
The following checks are made to make sure these interpolatations are transparent: If a move/turn on the same piece and axis is done later during the same tick, the delayed animation is commited first. Also, an interpolation is not allowed to overwrite a turn or move in progress (unless it originated from a previous interpolation),
if one is running the values are updated directly instead.
if(ud->type == string("Fighter")){if(ud->hoverattack == true){//gunship}else{// fighter}} if (ud->canhover) {//it is a hovercraft} if (ud->minWaterDepth > 0) {//it is a water-only unit or building
if (ud->floater || ud->waterline) {if (ud->waterline > 10) {//it is a sub} else {//it is a ship}}else{//it is something like underwater mex and stays at the bottom}}
if (ud->minWaterDepth <= 0) {//it is a ground unit or building if (ud->floater) {//unit can float, like Pelican for example } else if (ud->maxWaterDepth > 30) {//unit can move underwater}else {//unit is ground only }}
There are parameters related to Transport. 1. Transportsize=X;
X is the maximum footprint of the unit. If you assign transportsize=6 to a transportship than the transportship will be able to carry another transport ship
(except if in the unit there is a CantBeTransported=1; parameter). 2. TransportCapacity=XX; The maximum number of units it can takes. 3. TransportMaxUnits=XX; !!!!!?????? "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 where 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 doesnt affect them at all.
WeaponMainDirX is the coordinate of the vector showing the axis of the cone. For instance, if you want your Primary Weapon to have a 90° fire arc forward, you'd write: WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward! MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction If you want to precisely choose the WeaponMainDir, you could run UpSpring, create a new piece, move it around until the line, from the origin, to your piece, is along the line you want your weapon to fire, then write down the coordinate in WeaponMainDir. Keep in mind UpSpring invert the sign of the axis x and z. [edit]WeaponMainDir: The lowdown After so many months, I finally figured out how to get the angles I want in WeaponMainDir! It defines the position of a point that the engine gets the vector of from the weapon origin, like so: o---->o First o is the weapon origin, defined in the query function of your script. The second is defined by the coordinates of WeaponMainDir. So, to figure out your numbers (still using o's as the two points): Draw a triangle DistanceX OR DistanceY
o _____________
\ |
\ |
\ |
\ | DistanceZ
\ |
\ | <--- This is your desired angle.
\|
o <--- Weapon origin
Ignore the DistanceY for now.
Lets say you want your gun to aim in a forward facing, 12 degree cone. Well, the degrees in MaxAngleDif start at the vector, and go around clockwise (for X/Z, not certain about Y/Z, but I think it is counter-clockwise) from there, so the default value of straight forward, 0 0 1, will aim straight forward and 12 degrees to the unit's right). Looking like so: (0 to 12 degrees) __ |/ You need to have that vector be 6 degrees to the left so the cone is actually centered on 0: (-6 to 6 degrees) __ \|/ Now, if you're comfortable with trigonometry, you can look at the big diagram above and see that the distance you need is opposite the angle/ adjacent the angle = TAN(of the angle). Pull out your handy dandy scientific calculator (or change the one in windows to scientific mode) and plug in TAN(6), getting 0.105104.... Now start trying out fractions of X/Z using the "guess then narrow it down" method (thats the first number and last number of the three defined in MaxAngleDif), to try to get them close (3rd or 4th decimal place should be close enough accuracy) to that decimal number. They have to be whole numbers! (Why? Because I'm not testing it) If your a trig wizz, which I am not, you may have picked the best numbers just by looking at it. You should find 2/19 produces a good value of 0.105264... Check your values by doing arctan(X/Z) (may be tan(superscript)-1 on your calculator, not to be confused with 1/tan, so don't try that if you can't find it). This should give a number very close to your angle, if you went to the 3rd decimal place in accuracy when picking your X/Z, then the value will be about that accurate as well. In our case, arctan(2/19)=6.009006... If you want that 12 degree cone to be centered around 90 degrees left of the unit, you'd take your 6 degree angle, and add it to 90, so you'd do the process on 96 degrees. You'll find tan(96) comes out negative, thats because your Z value is going to be negative. Go ahead and graph it on a piece of paper if you don't see why its negative. Now, that DistanceY I told you to ignore! Lets look at it now. You work it the same as for DistanceX. Lets just say when working out your numbers for X you were looking top-down at your unit, for Y your looking at the side. If your using X/Z already, you'll have to use that same Z value in your Y/Z. Well, at least it makes figuring out Y easier, just multiply the value from tan(angle) by Z. Problem is it will probably be a decimal that you can't round without it being horribly inaccurate. If it is (which is very likely), you might try finding your Y/Z values as when you found X/Z, then use "Least Common Denominators" to have equal Z values and still the desired accuracy on X and Y.
Unit FBI tags: - Added boolean FBI tag AirStrafe. Only effective if HoverAttack=1.
If AirStrafe=1, gunships and construction aircraft will strafe in a circle around the target. If AirStrafe=0, they will not strafe, they will sit stationary in the air firing their weapons. If set to 0 they sit at one place.
- Added string FBI tag Gaia. - Added string FBI tag DecoyFor: the name of the unit this one is a decoy for. - Added boolean FBI tag CanBeAssisted. (default: 1)
- Disabling assists to factories should work well. - Builders have to die to release their hold on a unit being built, and once the unit is released, multiple builders can repair the unit.
- Added boolean FBI tag CanSelfRepair. (default: 0) - Added boolean FBI tag TransportByEnemy. (default: 1) - Added boolean FBI tag HoldSteady, causes transports to hold units such that
their updirs are always aligned.
- Added boolean FBI tag ReleaseHeld for transports. When set to 1, the units
carried by the transport will survive the destruction of the transport itself.
- Added float FBI tag 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. (default: 0)
- Added float FBI tag MinCollisionSpeed, indicating the minimum net impact speed
that will cause damage to a unit.
- Added vector FBI tag CollisionSphereOffset - Added float FBI tag LoadingRadius - Added boolean FBI tag FullHealthFactory, controls whether or not a unit can
leave the factory if it is not at full health. (default: 0)
- Added float FBI tag RepairSpeed (default: WorkerTime) - Added float FBI tag ReclaimSpeed (default: WorkerTime) - Added float FBI tag ResurrectSpeed (default: WorkerTime) - Added float FBI tag CaptureSpeed (default: WorkerTime) - Added float FBI tag TerraformSpeed (default: WorkerTime) - Added boolean FBI tag DecloakOnFire (default: 1) - Up to 8 ok, select and arrived sounds can now be defined.
(use tags ok1, ok2, etc.)
- Added float FBI tag CollisionSphereScale, this is a scaling factor for the
unit's collision sphere. (default: 0.5 for aircraft, 1 for other units)
- Fixed FBI tag floater for planes, - Added FBI tag canSubmerge for planes. The following rules apply:
1) If a plane only has the 'floater' tag set to 1, it will land on the ocean surface. 2) If a plane only has the 'canSubmerge' tag set to 1, it will land on the ocean floor. 3) If a plane has both tags set to 1, it will obey rule 2.
- Added unit FBI tag UnitRestricted to limit the number of a unit type allowed in a game. canPatrol=1; Can the unit go on patrol canGuard=1; Can the unit guard things canAttack=1; Can the unit attack other units Reclaimable=1; Determines if a unit can be reclaimed by other units noAutoFire=0; (if set to 1, unit will fire once then switch to next target, and needs to be told to fire manually) canBuild (can the unit start new construction projects) canRepair (can the unit repair other things) canRestore (can the unit restore deformed ground) canReclaim (can the unit reclaim other things) canAssist (can the unit assist construction projects already started) - new fbi tag shownanoframe: set to 0 to disable nanoframe while the unit is being built. - new fbi tag shownanospray: set to 0 to disable nanospray. - new fbi tag nanocolor: color of the nanospray and the nanoframe in red green blue format (white = 1 1 1).
(These three fbi tags apply to the unit itself; not to the unit it's building.)
- Added limited fuel settings for units (only work for aircrafts so far, need a good mechanism for refueling other stuff) - New fbi tag MaxFuel, max fuel in seconds that the unit can carry, default 0 = unlimited - New fbi tag RefuelTime, how long time it takes to fully refuel the unit, default 5 - New fbi tag MinAirBasePower, minimum build power an airbase unit must have for the aircraft to land on it, default 0 - New fbi tag WeaponFuelUsage<1-16>, how much fuel in seconds that firing the weapon takes from the owning unit, default 0 - New fbi tag SeismicDistance, give the unit a seismic sensor for detecting movement through the ground. - New fbi tag SeismicSignature, The magnitude of seismic disturbance when this unit is moving, default sqrt(mass/100). - Added new fbi tag "levelground" set this to 0 to prevent a building from leveling ground beneth it.
Make sure that the model continue some way below ground so that they dont look like they float in air.
- New fbi tag UseBuildingGroundDecal, set to 1 to enable decals for building - New fbi tag BuildingGroundDecalType, name of a bitmap in unittextures folder - New fbi tag BuildingGroundDecalSizeX,BuildingGroundDecalSizeY, size of decal (same scale as footprint for unit) - New fbi tag BuildingGroundDecalDecaySpeed, how fast the decal will fade out after the building has died, default 0.1 (fades out in 10s) - New fbi tag ShowPlayerName, if set to 1 the tooltip shows the player name instead of the unit description - Fbi tag HideDamage now actually works: set it to 1 to hide most details in the unit's tooltip from enemies - Added new fbi variable CanLoopbackAttack, only affects fighter aircrafts,
if 1 this will enable the player to set the aircraft to do an immelman turn after firing instead of overflying the target.
- Added "dontland" unit tag, to specify aircraft that should not land. Don't use this on transport units!
autoHeal - health per second that a unit allways will be autohealed for (default 0) idleAutoHeal - health per second that a unit will be autohealed for whenever its idling (default 10) idleTime - time in ticks without any action before a unit is considered idling (default 600) -Added new FBI tag TransportMass, this is the maximum weight a tranporter can transport, default 100000 -Added new FBI tag Mass, this is the weight of the unit, default is metalcost of unit -Added new FBI tags to set the control variables for aircrafts -Added new FBI tag 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
-Added tag "isAirBase" to unit FBI file, sets if the units that are being transported will be stunned or not, defaults to 0. -Spring can now use up to 16 weapons, use Weapon<1-16> and BadTargetCategory<1-16> in fbi file and QueryWeapon<1-16> AimWeapon<1-16> AimFromWeapon<1-16> FireWeapon<1-16> functions in scripts. Primary,secondary etc is aliased to weapon 1-3 but try not to mix old and new names in the same unit. -Added new fbi tag 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. -Added new fbi tags WeaponMainDir<1-16> and MaxAngleDif<1-16>. WeaponMainDir is a vector and defines the center direction of a cone in which the weapon can aim while MaxAngleDif defines how broad the cone is. Default WeaponMainDir = 0 0 1; (forward) and MaxAngleDif=360; (can fire everywhere) -Added tag SmoothAnim=0/1 to the fbi. If it is 1, unis will use animation interpolation -CanCapture tag for units now works -HighTrajectory now requires a HighTrajectory tag in the unit file (0=only low, 1=only high,2=choose) -Changed default DamageModifier to be 1 instead of 0
- added AreaAttack command queue area display
inform about the start of an neutral zone for spring */
