Creating a .veh file

Here is the current list of possible options for any vehicle in MBII. Much of this is confusing. I suggest looking at examples in Official, CMP, uM or Powerbattles to get a feel for how things work.

`NAMEOFVEHICLE  // This is the vehicle name, spawned with /npc spawn vehicle NAMEOFVEHICLE`

`{`

`name namehere //unique name of the vehicle (this is what is read in the .mbch file!)`

`type VH_SPEEDER //what kind of vehicle, VH_SPEEDER VH_WALKER VH_ANIMAL VH_FIGHTER VH_DEKA`

`numhands # //if 2 hands, no weapons, if 1 hand, can use 1-handed weapons, if 0 hands, can use 2-handed weapons`

`lookPitch #.# //How far you can look up and down off the forward of the vehicle`

`LookYaw #.# //How far you can look left and right off the forward of the vehicle`

`length # //how long it is - used for body length traces when turning/moving?`

`width # //how wide it is - used for body length traces when turning/moving?`

`height # //how wide it is - used for body length traces when turning/moving?`

`centerOfGravity   "#.# #.# #.#" //offset from origin: {forward, right, up} as a modifier on that dimension (-1.0f is all the way back, 1.0f is all the way forward)`

`// Speed`

`SpeedMax #.# //Top speed`

`TurboSpeed #.# //Turbo speed`

`SpeedMin #.# //If < 0, can go in reverse`

`SpeedIdle #.# //What speed it drifts to when no accel/decel input is given`

`accelIdle #.# //If speedIdle > 0, how quickly it goes up to that speed`

`acceleration #.# //When pressing on accelerator`

`decelIdle #.# //When giving no input, how quickly it drops to speedIdle`

`throttleSticks 0/1 //If true, speed stays at whatever you accel/decel to, unless you turbo or brake`

`strafePerc #.# //Multiplier on current speed for strafing.  If 1.0f, you can strafe at the same speed as you're going forward, 0.5 is half, 0 is no strafing`

`// Handling`

`bankingSpeed #.# //How quickly it pitches and rolls (not under player control)`

`pitchLimit #.# //How far it can roll forward or backward`

`rollLimit #.# //How far it can roll to either side`

`braking #.# //when pressing on decelerator`

`mouseYaw #.# //The mouse yaw override.`

`mousePitch #.# //The mouse yaw override.`

`turningSpeed #.# //How quickly you can turn`

`turnWhenStopped 0/1 //Whether or not you can turn when not moving`

`traction #.# //How much your command input affects velocity, only VH_Speeder makes use of this`

`friction #.# //How much velocity is cut on its own`

`maxSlope #.# //The max slope that it can go up with control`

`speedDependantTurning 0/1 //Vehicle turns faster the faster it's going`

`landingHeight #.# // The max height before this ship (?) starts (auto)landing.`

`// Durability`

`mass # //For momentum and impact force (player mass is 10)`

`armor # //Total points of damage it can take`

`shields # //Energy shield damage points`

`shieldRechargeMS # //Energy shield milliseconds per point recharged`

`toughness #.# //Modifies incoming damage, 1.0 is normal, 0.5 is half, etc.  Simulates being made of tougher materials/construction`

`malfunctionArmorLevel # //When armor drops to or below this point, start malfunctioning`

`surfDestruction 0/1 //Can this vehicle be broken apart`

`// Misc`

`gravity # //Controls rate of desent when not moving, default gravity is 800`

`hoverHeight #.# //If 0, it's a ground vehicle`

`hoverStrength #.# //How hard it pushes off ground when less than hover height... causes "bounce", like shocks`

`waterProof 0/1 //Can drive underwater if it has to`

`bouyancy #.# //when in water, how high it floats (1 is neutral bouyancy)`

`fuelMax # //How much fuel it can hold (capacity)`

`fuelRate # //How quickly is uses up fuel`

`turboDuration # //How long turbo lasts`

`turboRecharge # //How long turbo takes to recharge`

`visibility # //For sight alerts`

`loudness # //For sound alerts`

`explosionRadius #.# //Range of explosion`

`explosionDamage # //Damage of explosion`

`maxPassengers 0-10 //The max number of passengers this vehicle may have (Default = 0), (Max = 10)`

`hideRider 0/1 //Rider (and passengers?) should not be drawn`

`killRiderOnDeath 0/1 //If rider is on vehicle when it dies, they should die`

`flammable 0/1 //Whether or not the vehicle should catch on fire before it explodes`

`explosionDelay # //How long the vehicle should be on fire/dying before it explodes in msec`

`// MB2 additions, first 3 used mostly only for Deka`

`//  Vehicle states: CROUCHING = 32, TURNING = 16, STILL = 8,  BACKWARDS = 4, WALKING = 2, RUNNING = 1,`

`// Bit flag varibles: 5  = 000101 which tranlates to BACKWARDS and RUNNING`

`// Bit flag varibles: 49 = 110001 which translates to CROUCHING TURNING and RUNNING`

`// (disabling for running and walking would be 3 (000011) as an example`

`MBFstopprimaryfiring 0   //Stop primary firing in the above-listed mode`

`MBFstopaltfiring 0 //Stop alt firing in these modes`

`MBFdisableshields 0 //Disable shields in these modes`

`CantKnockoutShields 0/1 // Used for Deka shield toggle (Deka?)`

`AllWeaponsDoDamageToArmor 0/1 // If damage do direct damage to Health (Deka?)`

`AllWeaponsDoDamageToShields 0/1         // If damage do direct damage to Shields (Deka?)`

`ResistsMarking 0/1 // Whether to paint damage marks on vehicle`

`SpeedMultiplierForRamDamage #.# // Damage multiplyer for Ramming, (Default is 10.0)`

`RamDamage # // Base Line ramming damage, may override SpeedMultiplierForRamDamage if non 0`

`VehicleScale # // Override size of vehicle, default = 100`

`NoDamageWalls 0/1 // Whetehr this vehicle suffers damage on wall impacts (?)`

`// Visuals`

`model modelname //What model to use - if make it an NPC's primary model, don't need this?`

`skin skin_name //What skin to use - if make it an NPC's primary model, don't need this?`

`g2radius # //Render radius (really diameter, but...) for the ghoul2 model`

`riderAnim BOTH_VS_IDLE //What animation the rider uses`

`droidNPC npc_name //NPC to attach to *droidunit tag (if it exists in the model), used only for VH_FIGHTER (R2D2)`

`// Hud and Radar`

`radarIcon "directory/nameoffile" //What icon to show on radar in MP`

`dmgIndicFrame "directory/nameoffile" //What image to use for the frame of the damage indicator`

`dmgIndicShield "directory/nameoffile" //What image to use for the shield of the damage indicator`

`dmgIndicBackground "directory/nameoffile" //What image to use for the background of the damage indicator`

`icon_front "directory/nameoffile" //What image to use for the front of the ship on the damage indicator`

`icon_back "directory/nameoffile" //What image to use for the back of the ship on the damage indicator`

`icon_right "directory/nameoffile" //What image to use for the right of the ship on the damage indicator`

`icon_left "directory/nameoffile" //What image to use for the left of the ship on the damage indicator`

`crosshairShader "directory/nameoffile" //What image to use as the crosshair`

`shieldShader "directory/nameoffile" //What shader to use when drawing the shield shell`

`// Sounds`

`soundOn "sound/directory/nameofsound.mp3" //Sound to play when get on it`

`soundOff "sound/directory/nameofsound.mp3" //Sound to play when get off`

`soundLoop "sound/directory/nameofsound.mp3" //Sound to loop while riding it`

`soundTakeOff "sound/directory/nameofsound.mp3" //Sound to play when ship takes off`

`soundEngineStart "sound//nameofsound.mp3" //Sound to play when ship's thrusters first activate`

`soundSpin "sound/directory/nameofsound.mp3" //Sound to loop while spiraling out of control`

`soundTurbo "sound/directory/nameofsound.mp3" //Sound to play when turbo/afterburner kicks in`

`soundHyper "sound/directory/nameofsound.mp3" //Sound to play when hits hyperspace`

`soundLand" "sound/directory/nameofsound.mp3" //Sound to play when ship lands`

`soundFlyBy "sound/directory/nameofsound.mp3" //Sound to play when they buzz you`

`soundFlyBy2 "sound/directory/nameofsound.mp3" //Alternate sound to play when they buzz you`

`soundShift1 "sound/directory/nameofsound.mp3" //Sound to play when changing speeds`

`soundShift2 "sound/directory/nameofsound.mp3" //Sound to play when changing speeds`

`soundShift3" "sound/directory/nameofsound.mp3" //Sound to play when changing speeds`

`soundShift4" "sound/directory/nameofsound.mp3" //Sound to play when changing speeds`

`// Effects`

`exhaustFX "directory/nameofeffect" //Exhaust effect, played from "*exhaust" bolt(s)`

`turboFX "directory/nameofeffect" //Turbo exhaust effect, played from "*exhaust" bolt(s) when ship is in "turbo" mode`

`turboStartFX "directory/nameofeffect" //Turbo start effect, played from "*exhaust" bolt(s) when ship is in "turbo" mode`

`trailFX "directory/nameofeffect" //Trail effect, played from "*trail" bolt(s)`

`impactFX "directory/nameofeffect" //Impact effect, for when it bumps into something`

`explodeFX "directory/nameofeffect" //Explosion effect, for when it blows up (should have the sound built into explosion effect)`

`wakeFX "directory/nameofeffect" //Effect it makes when going across water`

`dmgFX "directory/nameofeffect" //Effect to play on damage from a weapon or something`

`injureFX "directory/nameofeffect" //Effect to play on partially damaged ship surface`

`noseFX "directory/nameofeffect" //Effect for nose piece flying away when blown off`

`lwingFX "directory/nameofeffect" //Effect for left wing piece flying away when blown off`

`rwingFX "directory/nameofeffect" //Effect for right wing piece flying away when blown off`

`armorLowFX "directory/nameofeffect" //Effect to play on damage from a weapon or something`

`armorGoneFX "directory/nameofeffect" //Effect to play on damage from a weapon or something`

`noFireball 0/1 //Whether to play death effects`

`HanHack 0/1 //Special indicator to make boarding the vehicle impossible`

`//Individual "area" health`

`health_front # //Amount of health for VH_FIGHTER parts`

`health_back         # //Amount of health for VH_FIGHTER parts`

`health_right        # //Amount of health for VH_FIGHTER parts`

`health_left         # //Amount of health for VH_FIGHTER parts`

`// Primary Attack`

`weap1 veh_wpn_name //Name of weapon (must be inside ext_data/vehicles/weapons or it won't be read)`

`weap1Aim 0/1 //Whether or not to auto-aim the projectiles at the thing under the crosshair when we fire`

`weap1Delay # //The delay between shots for this weapon, in msec`

`weap1Link 0/1/2 //0 for unlinkable, 1 for linkable, 2 for always linked (linked delay = weapon delay * number of muzzles linked!)`

`weap1AmmoMax # //Max amount of ammo`

`weap1AmmoRechargeMS # //Ammo recharge rate - milliseconds per unit (minimum of 100, which is 10 ammo per second)`

`weap1SoundNoAmmo "sound/directory/nameofsound.mp3" //Sound to play when try to fire weapon 1 with no ammo`

`// Secondary Attack`

`weap2 veh_wpn_name //Name of weapon 2 (must be inside ext_data/vehicles/weapons or it won't be read)`

`weap2Aim 0/1 //Whether or not to auto-aim the projectiles at the thing under the crosshair when we fire`

`weap2Delay # //The delay between shots for this weapon, in msec`

`weap2Link 0/1/2 //0 for unlinkable, 1 for linkable, 2 for always linked (linked delay = weapon delay * number of muzzles linked!)`

`weap2AmmoMax # //Max amount of ammo`

`weap2AmmoRechargeMS # //Ammo recharge rate - milliseconds per unit (minimum of 100, which is 10 ammo per second)`

`weap2SoundNoAmmo "sound/directory/nameofsound.mp3" //Sound to play when try to fire weapon 2 with no ammo`

`// Where the vehicle fires from, must have tags in model. Up to 10 (has to match one of the weapons this vehicle has).`

`weapMuzzle1 veh_wpn_name`

`weapMuzzle2 veh_wpn_name`

`weapMuzzle3 veh_wpn_name`

`weapMuzzle4 veh_wpn_name`

`weapMuzzle5 veh_wpn_name`

`weapMuzzle6 veh_wpn_name`

`weapMuzzle7 veh_wpn_name`

`weapMuzzle8 veh_wpn_name`

`weapMuzzle9 veh_wpn_name`

`weapMuzzle10 veh_wpn_name`

`// Camera`

`cameraOverride 0/1 //Override the third person camera with the below values - normal is 0 (off)`

`cameraRange #.# //How far back the camera should be - normal is 80`

`cameraVertOffset #.# //How high over the vehicle origin the camera should be - normal is 16`

`cameraHorzOffset #.# //How far to left/right (negative/positive) of of the vehicle origin the camera should be - normal is 0`

`cameraPitchOffset #.# //A modifier on the camera's pitch (up/down angle) to the vehicle - normal is 0`

`cameraFOV #.# //Third person camera FOV, default is 80`

`cameraAlph #.# //Fade out the vehicle to this alpha (0.1-1.0f) if it's in the way of the crosshair`

`cameraPitchDependantVertOffset 0/1 //Use the hacky AT-ST pitch dependant vertical offset`

`firstPersonCameraMode # //Enable first person camera, 1 = eyeview, 2 = offset`

`firstPersonCameraRange #.# //How far back the camera should be`

`firstPersonCameraVertOffset #.# //How high over the vehicle origin the camera should be`

`firstPersonCameraHorzOffset #.# //How far to left/right (negative/positive) of of the vehicle origin the camera should be - normal is 0`

`firstPersonCameraPitchOffset #.# //A modifier on the camera's pitch (up/down angle) to the vehicle`

`firstPersonCameraFOV #.# //First person camera FOV, default is 80`

`firstPersonHideBone1 # //Hide these bones if in first person.`

`firstPersonHideBone2 #`

`firstPersonHideBone3 #`

`firstPersonHideBone4 #`

`// TURRETS - Rarly used, vehicle must be rigged to use these`

`//Turret 1`

`{"turret1Weap", VFOFS(turret[0].iWeapon), VF_WEAPON},`

`{"turret1Delay", VFOFS(turret[0].iDelay), VF_INT},`

`{"turret1AmmoMax", VFOFS(turret[0].iAmmoMax), VF_INT},`

`{"turret1AmmoRechargeMS", VFOFS(turret[0].iAmmoRechargeMS), VF_INT},`

`{"turret1YawBone", VFOFS(turret[0].yawBone), VF_LSTRING},`

`{"turret1PitchBone", VFOFS(turret[0].pitchBone), VF_LSTRING},`

`{"turret1YawAxis", VFOFS(turret[0].yawAxis), VF_INT},`

`{"turret1PitchAxis", VFOFS(turret[0].pitchAxis), VF_INT},`

`{"turret1ClampYawL", VFOFS(turret[0].yawClampLeft), VF_FLOAT}, //how far the turret is allowed to turn left`

`{"turret1ClampYawR", VFOFS(turret[0].yawClampRight), VF_FLOAT}, //how far the turret is allowed to turn right`

`{"turret1ClampPitchU", VFOFS(turret[0].pitchClampUp), VF_FLOAT}, //how far the turret is allowed to title up`

`{"turret1ClampPitchD", VFOFS(turret[0].pitchClampDown), VF_FLOAT}, //how far the turret is allowed to tilt down`

`{"turret1Muzzle1", VFOFS(turret[0].iMuzzle[0]), VF_INT},`

`{"turret1Muzzle2", VFOFS(turret[0].iMuzzle[1]), VF_INT},`

`{"turret1TurnSpeed", VFOFS(turret[0].fTurnSpeed), VF_FLOAT},`

`{"turret1AI", VFOFS(turret[0].bAI), VF_BOOL},`

`{"turret1AILead", VFOFS(turret[0].bAILead), VF_BOOL},`

`{"turret1AIRange", VFOFS(turret[0].fAIRange), VF_FLOAT},`

`{"turret1PassengerNum", VFOFS(turret[0].passengerNum), VF_INT},//which number passenger can control this turret`

`{"turret1GunnerViewTag", VFOFS(turret[0].gunnerViewTag), VF_LSTRING},`

`//Turret 2`

`{"turret2Weap", VFOFS(turret[1].iWeapon), VF_WEAPON},`

`{"turret2Delay", VFOFS(turret[1].iDelay), VF_INT},`

`{"turret2AmmoMax", VFOFS(turret[1].iAmmoMax), VF_INT},`

`{"turret2AmmoRechargeMS", VFOFS(turret[1].iAmmoRechargeMS), VF_INT},`

`{"turret2YawBone", VFOFS(turret[1].yawBone), VF_LSTRING},`

`{"turret2PitchBone", VFOFS(turret[1].pitchBone), VF_LSTRING},`

`{"turret2YawAxis", VFOFS(turret[1].yawAxis), VF_INT},`

`{"turret2PitchAxis", VFOFS(turret[1].pitchAxis), VF_INT},`

`{"turret2ClampYawL", VFOFS(turret[1].yawClampLeft), VF_FLOAT}, //how far the turret is allowed to turn left`

`{"turret2ClampYawR", VFOFS(turret[1].yawClampRight), VF_FLOAT}, //how far the turret is allowed to turn right`

`{"turret2ClampPitchU", VFOFS(turret[1].pitchClampUp), VF_FLOAT}, //how far the turret is allowed to title up`

`{"turret2ClampPitchD", VFOFS(turret[1].pitchClampDown), VF_FLOAT}, //how far the turret is allowed to tilt down`

`{"turret2Muzzle1", VFOFS(turret[1].iMuzzle[0]), VF_INT},`

`{"turret2Muzzle2", VFOFS(turret[1].iMuzzle[1]), VF_INT},`

`{"turret2TurnSpeed", VFOFS(turret[1].fTurnSpeed), VF_FLOAT},`

`{"turret2AI", VFOFS(turret[1].bAI), VF_BOOL},`

`{"turret2AILead", VFOFS(turret[1].bAILead), VF_BOOL},`

`{"turret2AIRange", VFOFS(turret[1].fAIRange), VF_FLOAT},`

`{"turret2PassengerNum", VFOFS(turret[1].passengerNum), VF_INT},//which number passenger can control this turret`

`{"turret2GunnerViewTag", VFOFS(turret[1].gunnerViewTag), VF_LSTRING},`

`}`