FBI Unitinfo Tags

FBI Unitinfo Tags

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

FBI Unitinfo Tags

Post by Ash »

What main the fbi unit tags and default values?
I am working on an fbi editor and I have search the Spring code but would like to ensure I am not missing any tags and there default values.
The tags I found in the code with their default values are attatched below as a rtf file in a zipped folder.
I would be more than glad to share the glory of the project with any who would like a copy. :-)
Thank you to any who have the time to help me research this.
Attachments
Tags.zip
FBI Tags abd default values striped from spring code.
(12.36 KiB) Downloaded 28 times
Release.zip
FBI Editer Sample (Not 100% yet. Still in development but it is working.)
(68.36 KiB) Downloaded 24 times
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: FBI Unitinfo Tags

Post by lurker »

Looked at the wiki?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: FBI Unitinfo Tags

Post by Forboding Angel »

the wiki is a bit disjointed, would be kinda nice having them all in a file.
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

thank you guys very much for the prompt resopnse. I am new to spring so not sure about the wiki. I will try to find it to check. i have done about 2 weeks of searching. I would like to make a list of the tages used by spring and not custom tags which it seems every mod uses. Once the list is done I will be sure to post it for any others who need the info. For pepole like me it is useful to know all the options avalible to spring and what are custom that would not be used if making a new mod from scratch. I think just the list alone would be nice to have avalible. :)
Once more thank you guys very much for helping.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: FBI Unitinfo Tags

Post by imbaczek »

the definitive list of engine tags is in the engine source, here:

http://github.com/spring/spring/tree/ma ... tDef.h#L91
http://github.com/spring/spring/tree/ma ... r.cpp#L240

not much docs there on what each tag does, though. you'd have to grep the source and/or check the wiki.
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

That was where I got the Tags I have but I did not see the "Side" tag there. So is it correct in assuming that it is in truth a custom tag that is not required? Some Tags I found like Side, canLand, canStop I would think are hard coded into spring but I am not seeing them and I am not the best with C#.
Thank you for the info anyway, I will review the code once more and see if I can find any thing I missed.
Also as far as the Wiki, I would like to ensure there are no custom tags in the list and the Wiki if i am correct, is mostly moders filling their tags including custom ones. I will still check none the less on the chance I am wrong in thinking this.

Thank you for the response imbaczek.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FBI Unitinfo Tags

Post by smoth »

bear in mind that some of us are using lua as an fbi format.
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

I will, I have not learned LUA as of yet just trying to understand the basic fbi requirements first. I plan to change the UI some more once I have all the tags to make the layout a little more organized and adding help for each tag with info on the default value assigned from spring if tag is missing and the upper and lower limits. There are a number of improvements I would like to make and I am sure I will add LUA as well to it. But for now I am just trying to get a frame to work with. :) Thank you all for checking it out though.
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

As far as I can decode the source this is what Tags and default values I could find. Anyone who would like to add to this list is more than welcome. This list is not to include custom tags, only the tags read in by spring.

Thank you to all who contribute.

Unit.fbi Template

[UNITINFO]
{
acceleration=0.5;
airHoverFactor=-1;
airSightDistance=-1;
airStrafe=0;
autoHeal=0;
bankingAllowed=1;
brakeRate=3;
buildAngle=0;
buildCostEnergy=10;
buildCostMetal=10;
buildDistance=128;
builder=0;
buildingGroundDecalDecaySpeed=0.1;
buildingGroundDecalSizeX=4;
buildingGroundDecalSizeY=4;
buildRange3D=0;
buildTime=10;
canAssist=0;
canAttack=1;
canBeAssisted=1;
canBuild=0;
canCapture=0;
canCrash=1;
canDGun=0;
canDropFlare=0;
canFight=1;
canFireControl=1;
canFly=0;
canGuard=1;
canHover=0;
canLoopbackAttack=0;
canMove=0;
canPatrol=1;
canReclaim=0;
canRepair=0;
canRepeat=1;
canRestore=0;
canResurrect=0;
canSelfDestruct=1;
canSelfRepair=0;
canSubmerge=0;
cantBeTransported=0;
capturable=1;
captureSpeed=10;
cloakCost=-1;
cloakCostMoving=-1;
collide=1;
collisionVolumeOffsets=0 0 0;
collisionVolumeScales=1 1 1;
commander=0;
crashDrag=0.005;
cruiseAlt=0;
damageModifier=1;
decloakOnFire=1;
decloakSpherical=1;
description=These are the default settings for spring units.;
energyMake=0;
energyStorage=0;
energyUse=0;
extractsMetal=0;
extractSquare=0;
factoryHeadingTakeoff=1;
fallSpeed=0.2;
fireState=2;
flankingBonusDir=0 0 1;
flankingBonusMax=1.9;
flankingBonusMin=9;
flankingBonusMobilityAdd=0.01;
flankingBonusMode=0;
flareDelay=0.3;
flareDropVector=-1 0 0;
flareEfficiency=0.5;
flareReload=5;
flareSalvoDelay=0;
flareSalvoSize=4;
flareTime=3;
floater=0;
FlotrackOffsetat=0;
footprintX=1;
footprintZ=1;
frontToSpeed=0.1;
fuelUsage1=0;
fuelUsage2=0;
fuelUsage3=0;
fullHealthFactory=0;
hideDamage=0;
highTrajectory=0;
holdSteady=1;
hoverAttack=0;
iconType=default;
idleAutoHeal=10;
idleTime=600;
initCloaked=0;
isAirBase=0;
isFeature=0;
isFirePlatform=0;
isTargetingUpgrade=0;
kamikaze=0;
kamikazeDistance=-25;
leaveTracks=0;
levelGround=1;
loadingRadius=220;
mainDir1=1.0 0.0 0.0;
mainDir2=1.0 0.0 0.0;
mainDir3=1.0 0.0 0.0;
makesMetal=0;
mass=1;
maxAcc=0.065;
maxAileron=0.015;
maxAngleDif1=360;
maxAngleDif2=360;
maxAngleDif3=360;
maxBank=0.8;
maxDamage=0;
maxElevator=0.01;
maxFuel=0;
maxPitch=0.45;
maxRepairSpeed=100000000000000000000;
maxRudder=0.004;
maxSlope=0;
maxVelocity=0;
maxWaterDepth=10000000;
metalMake=0;
metalStorage=0;
metalUse=0;
minAirBasePower=0;
minCloakDistance=0;
minCollisionSpeed=1;
minTransportMass=0;
minTransportSize=0;
minWaterDepth=-10000000;
moveState=1;
myGravity=0.4;
name=Default;
nanoColor=0.2 0.7 0.2;
noAutoFire=0;
onoffable=0;
power=16;
pushResistant=0;
radarDistance=0;
radarDistanceJam=0;
reclaimable=1;
reclaimSpeed=10;
refuelTime=5;
releaseHeld=0;
repairSpeed=10;
resurrectSpeed=10;
seismicDistance=0;
seismicSignature=-1;
selfDestructCountdown=5;
showNanoFrame=1;
showNanoSpray=1;
showPlayerName=0;
sightDistance=0;
slaveTo1=0;
slaveTo2=0;
slaveTo3=0;
slideTolerance=0;
smoothAnim=0;
sonarDistance=0;
sonarDistanceJam=0;
sonarStealth=0;
speedToFront=0.07;
stealth=0;
strafeToAttack=0;
TEDClass=0;
terraformSpeed=10;
tidalGenerator=0;
trackStrength=0;
trackStretch=1;
trackType=StdTank;
trackWidth=32;
transportByEnemy=1;
transportCapacity=0;
transportMass=100000;
transportSize=0;
transportUnloadMethod=0;
turnInPlace=1;
turnRadius=500;
turnRate=0;
unitFallSpeed=0;
unitRestricted=1000;
unloadSpread=1;
upright=0;
useBuildingGroundDecal=0;
verticalSpeed=3;
waterline=0;
windGenerator=0;
wingAngle=0.08;
wingDrag=0.07;
yardMap=c;
}
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: FBI Unitinfo Tags

Post by Pxtl »

Lua is no harder than the FBI/TDF formats, just a different syntax. You don't have to actually write script, you can just define objects in much the same way you'd be defining objects in FBI/TDF.
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

Correct me if I am wrong and forgive my lack of knowledge if so. Lua is used to script actions and options for mods and uses different custom tags per mod from the unit.fbi files. This would mean that each mod would have different tags, or "custom" tags used by Lua for that mod. Is this correct, or am I just way off base on this thought? I am trying to create an FBI Editor that would have the "Basic" tags and then allow the user to add more for his/her Lua scripts to use. Could you please give an example of what you are saying? I am still new at Cpp and have never worked with Lua, but I am a quick learner if I see code examples.

Thank you for your time.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FBI Unitinfo Tags

Post by smoth »

Code: Select all

-- UNITDEF -- GMSNIPERCUSTOM --
--------------------------------------------------------------------------------

local unitName = "gmsnipercustom"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 1,
  bmcode             = "1",
  brakeRate          = 10,
  buildCostEnergy    = 0,
  buildCostMetal     = 0,
  builder            = false,
  buildTime          = 20,
  canAttack          = true,
  canGuard           = true,
  canMove            = true,
  canPatrol          = true,
  canstop            = "1",
  category           = "ARM NOTAIR",
  corpse             = "sniperII_dead",
  defaultmissiontype = "standby",
  description        = "long or short range mech",
  energyMake         = 5,
  explodeAs          = "MEDMECHPOP",
  firestandorders    = "1",
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = "fed",
  idleAutoHeal       = 0,
  maneuverleashlength = "50",
  mass               = 2000,
  maxDamage          = 3500,
  maxSlope           = 37.50,
  maxVelocity        = 2,
  maxWaterDepth      = 5,
  minCloakDistance   = 70.627418518066,
  minCollisionSpeed  = 15,
  mobilestandorders  = "1",
  movementClass      = "POWERED",
  name               = "GM Sniper custom",
  objectName         = "gmsnipercustom.s3o",
  power              = 45,
  pushResistant      = true,
  radarDistance      = 1883.716916400000,
  reclaimable        = false,
  scale              = "1.5",
  selfDestructAs     = "MEDMECHPOP",
  shootme            = "1",
  side               = "renpou",
  sightDistance      = 900.00,
  smoothAnim         = true,
  standingfireorder  = "2",
  standingmoveorder  = "1",
  steeringmode       = "2",
  TEDClass           = "KBOT",
  threed             = "1",
  transportByEnemy   = false,
  turnRate           = 1000,
  turnInPlace        = 0,
  unitname           = "gmsnipercustom",
  unitnumber         = "413",
  upright            = true,
  version            = "1",
  zbuffer            = "1",
  customparams = {
    costrefined        = "200",
    costexotic         = "70",
  },
  sfxtypes = {
    explosiongenerators = {
      "custom:kampfertail",
    },
  },
  sounds = {
    canceldestruct     = "cancel2",
    underattack        = "fedwarning1",
    arrived = {
      "feddyok1",
    },
    cant = {
      "cantdo4",
    },
    count = {
      "count5",
      "count4",
      "count3",
      "count2",
      "count1",
      "count0",
    },
    ok = {
      "mechstep1",
    },
    select = {
      "gundamstart1",
    },
  },
  weapons = {
    [1]  = {
      badTargetCategory  = "AIR",
      mainDir            = "0 0 1",
      maxAngleDif        = 180,
      name               = "sniperbeam",
    },
  },
}


--------------------------------------------------------------------------------

local featureDefs = {
  rubble = {
    blocking           = false,
    category           = "arm_corpses",
    damage             = 300,
    description        = "Wreckage",
    footprintX         = 2,
    footprintZ         = 2,
    height             = "5",
    hitdensity         = "50",
    metal              = 10,
    object             = "rubble",
    reclaimable        = true,
    seqnamereclamate   = "tree1reclamate",
    world              = "All Worlds",
  },
  sniperII_dead = {
    blocking           = true,
    category           = "arm_corpses",
    damage             = 2800,
    description        = "Wreckage",
    featureDead        = "sniperII_heap",
    footprintX         = 2,
    footprintZ         = 3,
    height             = "20",
    hitdensity         = "30",
    metal              = 1200,
    object             = "sniperII_dead",
    reclaimable        = true,
    seqnamereclamate   = "tree1reclamate",
    world              = "All Worlds",
  },
  sniperII_heap = {
    blocking           = false,
    category           = "arm_corpses",
    damage             = 1800,
    description        = "Wreckage",
    featureDead        = "rubble",
    footprintX         = 3,
    footprintZ         = 3,
    height             = "10",
    hitdensity         = "30",
    metal              = 500,
    object             = "sniperII_heap",
    reclaimable        = true,
    seqnamereclamate   = "tree1reclamate",
    world              = "All Worlds",
  },
}
unitDef.featureDefs = featureDefs


--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

Thank you smoth, well noted. A much more efficient definition for units indeed. Wow, guess that could mean back to the designing board for me. Thank you greatly for clearing that up. Is there a tutorial on the available tags for the lua units that are a constant in all mods and what is the acuricy of it? I know spring is an ever changing project. I would imagine that most of the tags listed in your post are used by spring and only a few are custom tags for lua scripts, correct?

[Edit]
Never mind about the custom tags part, Dua, I see the customparams section. :roll:
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FBI Unitinfo Tags

Post by smoth »

yep you got it. I figured what you needed was an example. Using lua in the fbi file is a new thing. they are saved as .lua files btw. I am not sure who is using unit lua files but lua&fbi are bot fine formats one way or another and I still call the tags fbi tags :P
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: FBI Unitinfo Tags

Post by trepan »

The Spring C++ code no longer knows anything of FBI files.
FBI files are actually parsed by lua code that is included in
springcontent.sdz (the change came with a significant
speed-up over the engine's boost based TDF parser). The
best term to use would be "unitDef tags".

Note that luadefs are much more flexible than TDF defs.
You probably wont be able to write a tag editor that supports
all possible structures and syntax.

unitDef['n'..'a'..'m'..'e']='chucky' -- probably enough to ruin ya
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

Thank you once more smoth, I have noted the .lua extension. I noticed you have the weapon and sound data included in the unit file does this mean the build data can also be included?

Thank you trepan, that information is most valuable. I will check the springcontent.sdz to understand the "unitDef tags" more clearly before revamping my project.
Note that luadefs are much more flexible than TDF defs.
You probably wont be able to write a tag editor that supports
all possible structures and syntax.
I would like to make a editor to aid newbies in mod creation though and aid vets in making a base to mod from. It is starting to become harder to jump in without prior knowledge of the past development changes. For example little was needed at first I am sure when spring began and moders have simply added to what thay knew of moding over time during the development of spring. Now there are a lot of options and a lot to learn at once for us newbies. I have worked as a database developer and have worked on some large scale projects before and I feel I am up to the challenge at this point or at least to trying. I feel comfortable dealing with a lot of data. It just needs to be handled one small step at a time. :wink:

btw, any suggested layouts or features you guys would like to see in the new project? Some of the basic features I would like to include would be ToolTip pop ups with tag info and the value range accepted. A unit wizard to set starting stats for Ground, Building, Air, Mech, and other units along with formatting and error checking for the values. Please keep in mind only basic features at this point. Spring has given so much to so many I would love to be able to return the favor by helping in any way I can and I thought a unit editor would be useful as they seem to be none that include clear help and information on the tags used.

I guess the best plan of attack would be to review the lua unit format and learn more on it and then the basic tags used universally. Then I feel I will have a good foundation to start on. I am hoping to have the project started by this weekend and all are welcome to the source and the app its self to help lessen the burden of coding the units by hand.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FBI Unitinfo Tags

Post by smoth »

yes here is the relevant part of factory script.

Code: Select all

  buildoptions = {
    "litegm",
    "rgm79",
    "rgm79rl",
    "rgmsniper",
    "rx79rl",
    "rx79zook",
    "rx79plus",
    "rx79beam",
    "ez8",
    "powered",
    "poweredzook",
    "gmsnipercustom",
    "sniperii",
    "aquagm",
    "gmcannon",
    "guncannonii",
  },
  
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

OK, well I have reviewed the gamedata.sdz files and it looks like the primary tags are still only defined in the source code of spring as well they should be. Is there a list of tags used internally by spring somewhere to reference? If not it may take me a while to dig through the spring source to extract all the imported information that spring uses internally.

If I must I will and then at least newbie moders will have a reference sheet of the tags used by spring its self.

Thanks once more smoth. :-) I must say I love the lua option! The ability to include all unit info in one file is very useful. I was not looking foward to makeing the software export pices to mutiple files.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: FBI Unitinfo Tags

Post by smoth »

you could also include the weapon def with the unit. However, since I have many shared weapons I wanted to cut down on redundant definitions.

I am off to bed.

Code: Select all

--------------------------------------------------------------------------------

local weaponDef = {
  areaOfEffect       = 64,
  ballistic          = true,
  explosionGenerator = "custom:RED_EXPLOSION",
  filename           = "weapons/explosions.tdf",
  id                 = 209,
  impulseFactor      = 0,
  name               = "Large building",
  range              = 480,
  reloadtime         = 3.6,
  renderType         = 4,
  shakeduration      = ".3",
  shakemagnitude     = "8",
  soundHit           = "xplolrg4",
  soundStart         = "largegun",
  turret             = true,
  weaponVelocity     = 250,
  damage = {
    default            = 0,
    vtol               = "20",
  },
}
--------------------------------------------------------------------------------

return lowerkeys({["big_boom"] = weaponDef})

--------------------------------------------------------------------------------
User avatar
Ash
Posts: 22
Joined: 09 Sep 2008, 00:05

Re: FBI Unitinfo Tags

Post by Ash »

Worse case on missing some tags, I can always add the ones that seem to be reoccurring on a later version as long as I can locate them in the source code of spring to validate them as being internally used by spring.
I plan on having a simple text window to add custom tags and an option to create multiple templates that can have custom tags saved with them.
The main concept is that when the user checks the "canFly" checkbox the "canMove" will become checked and "cruseAlt" will be auto set to a value set by a config file along with other default info. Of course the user may uncheck canMove after or set the app not to auto calc related settings while he/she are making changes. Also an image of the icon file and build pic and model will be added in a later version.
you could also include the weapon def with the unit. However, since I have many shared weapons I wanted to cut down on redundant definitions.
The option to export for global use as well will be a necessary option of course.

good night smoth, and thanks for all the help. :-)
I have to sleep as well, Thank you all for your help I hope I can return the favor at some point.
Post Reply

Return to “Game Development”