Robots

Tutorial (Component File Format)

Component File Format


Component.txt
(standard text file)

parameter = value

Standard values

parameter
description
name
name for the BotLab
description
description for the BotLab
dir
directory to find the gmf and preview
preview
preview image for BotLab
type
power, extenders, mechanics, mobility, weapons, extras
base
C++ base class (for component's logic)
values: AirTank, Battery, BurstMotor, BurstPiston, Chassis, ControlBoard, ServoMotor, ServoPiston, SpinMotor, Weapon, Wheel
model
GMF filename
master
name of "master" rigid body primitive that attachment points are oriented toward, etc.
passthru
name of display collision mesh (if any) that can pass through chassis
attaching
name of display body that accepts attachments (for components with multiple parts)
styles
Additional 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
contact
name of primitive object
For wheel traction zones only
sort
integer 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.
hitpoints
component's undamaged hitpoint value (integer)
fracture
damage 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)
electotal
starting amount of total electric power for an electric generator (battery)
airtotal
starting amount of total air power for an air generator (airtank)

Sound values

damagesounds
comma-separated pathnames for sounds that will play when component is damaged
runsequence
2 or 3 comma-separated pathnames for sounds that should play sequentially (start sound, looping sound, stop sound) when a servomotor or servopiston is running
motorsound
pathname of sound that a spinmotor should play when running
firesound
pathname of sound to be played when a burst motor or piston is fired
attachsound
pathname of sound to be played when a component is attached in the botlab

Miscellaneous values

prismatic
name 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

power
max_velocity gain
(separated by spaces)
motor defaults: 5.0 1.0
piston defaults: 1.0 60.0
burst
force 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

power
gain
default: 1.0

Wheels

resistance
Tire 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
grip
The 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

normal
local 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
decal
graphic 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