Component File Format


Component.txt
(standard text file)

parameter = value

  • Standard values
  • Power values
  • Sound values
  • Miscellaneous values
  • Motors and Pistons
  • Car Steering
  • Wheels
  • Weapons
  • Standard values

    parameterdescription
    namename for the BotLab
    descriptiondescription for the BotLab
    dirdirectory to find the gmf and preview
    previewpreview image for BotLab
    typepower, extenders, mechanics, mobility, weapons, extras
    baseC++ base class (for component's logic)
    values: AirTank, Battery, BurstMotor, BurstPiston, Chassis, ControlBoard, ServoMotor, ServoPiston, SpinMotor, Weapon, Wheel
    modelGMF filename
    mastername of "master" rigid body primitive that attachment points are oriented toward, etc.
    passthruname of display collision mesh (if any) that can pass through chassis
    attachingname of display body that accepts attachments (for components with multiple parts)
    stylesAdditional components of this kind
    default style-name, filename.txt, short description, filename.txt, ...
    material()name of material (damage scalar)
    values: rubber, arenium, metal
    Note: Wheels default to rubber
    contactname of primitive object
    For wheel traction zones only
    sortinteger value to determine the order of components in the botlab; low to high (default is zero); sorted first by this value, then by name of component. See Component Ordering.
    hitpointscomponent's undamaged hitpoint value (integer)
    fracturedamage amount (float) that will cause this component to break off after it has 0 hitpoints (default is 0 -- ie, does not fracture)
    hidden"true" or "false" (default) to hide this component from the user

    Power values

    elecMaxInOutRate?amount of electrical power produced or used (+ means produced, - means used)
    airMaxInOutRate?amount of air power produced or used (+ means produced, - means used)
    electotalstarting amount of total electric power for an electric generator (battery)
    airtotalstarting amount of total air power for an air generator (airtank)

    Sound values

    damagesoundscomma-separated pathnames for sounds that will play when component is damaged
    runsequence2 or 3 comma-separated pathnames for sounds that should play sequentially (start sound, looping sound, stop sound) when a servomotor or servopiston is running
    motorsoundpathname of sound that a spinmotor should play when running
    firesoundpathname of sound to be played when a burst motor or piston is fired
    attachsoundpathname of sound to be played when a component is attached in the botlab

    Miscellaneous values

    prismaticname of body, name of slider, (body's slide vector) x, y, z, start limit, end limit, artificial tensor scale
    only works for Pistons
    tensor scale: sets attachment's inertia tensor to the base object's scaled by this amount; set to 0 to leave tensor unchanged

    Motors and Pistons

    powermax_velocity gain
    (separated by spaces)
    motor defaults: 5.0 1.0
    piston defaults: 1.0 60.0
    burstforce max_velocity gain
    force to apply once; max velocity and gain to use briefly (uses normal motor power to retract)
    burst motor only
    defaults: 300 20.0 2.0

    Car Steering

    powergain
    default: 1.0

    Wheels

    resistanceTire resistance(affects maximum speed and turning angle)
    Default Value: 120.0
    Note: As values are decreased, the turning angle for the bot will become wider
    gripThe amount of grip the tire has during turning
    Default Value: 0.05
    Decreasing the grip will cause the bot to slide more during and coming out of turns

    Weapons

    normallocal direction in which this weapon does damage
    bidirectional x y z x y z
    bidirectional: normals damage in both directions
    second normal is optional
    if no damaging normal is entered, weapon defaults to damage in all directions
    decalgraphic this weapon will apply to opponent chassis
    filename rx ry rz sx sy type
    rx ry rz: right-vector of weapon, so decal has correct orientation
    sx sy: size of decal
    type: 0 = alpha, 1 = additive