its pretty hard to explain and although I set out the basic template of the current tracked vehicle settings I can't even remember quite what I did other than I can remember changing the amount of gears was the main thing for getting the reverse speed to be good again
The main thing thou is the engine settings. If we take a look at the Landy's .tweak file, located in "\objects\Vehicles\Land\gb_jep_landrover\gb_jep_landrover.tweak" (which you can open with any text editor such as notepad) and if I just take the engine bit from it and post it here it looks like this:
Code: Select all
ObjectTemplate.activeSafe Engine gb_jep_landrover_zMotor
ObjectTemplate.modifiedByUser "sofad"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
rem -------------------------------------
ObjectTemplate.addTemplate S_gb_jep_landrover_zMotor_RotationRpm
ObjectTemplate.addTemplate S_gb_jep_landrover_zMotor_Idle
ObjectTemplate.setPosition -0.00564072/0.293306/3.10078
ObjectTemplate.addTemplate S_gb_jep_landrover_zMotor_Rpm1
ObjectTemplate.setPosition -0.0442194/0.26975/3.02822
ObjectTemplate.addTemplate S_gb_jep_landrover_zMotor_Rpm2
ObjectTemplate.setPosition -0.0514412/0.174205/3.04479
ObjectTemplate.addTemplate S_gb_jep_landrover_zMotor_Load
ObjectTemplate.setPosition -0.0555691/-0.196902/2.05611
ObjectTemplate.addTemplate e_exhaust_small
ObjectTemplate.setPosition 0.755737/1.34734/2.15664
ObjectTemplate.addTemplate e_exhaust_small_startup
ObjectTemplate.setPosition 0.769479/1.34607/2.18111
ObjectTemplate.setRotation 0.2/30.7/0
rem -------------------------------------
[b]ObjectTemplate.setMinRotation 0/0/-1
ObjectTemplate.setMaxRotation 0/0/1
ObjectTemplate.setMaxSpeed 0/0/10000
ObjectTemplate.setAcceleration 0/0/10
ObjectTemplate.setInputToRoll PIThrottle
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setEngineType c_ETNewCar2
ObjectTemplate.setTorque 400
ObjectTemplate.setDifferential 4
ObjectTemplate.setNumberOfGears 4[/b]
[color=RoyalBlue]ObjectTemplate.setGearUp 0.85
ObjectTemplate.setGearDown 0.4
ObjectTemplate.setGearChangeTime 0.7
ObjectTemplate.setGearRatios 2.25 1.25 1 0.6 0.6 [/color]
ObjectTemplate.spinWhenNoEngineInAir 1
[color=Red]ObjectTemplate.newCar2.minRpm 1000
ObjectTemplate.newCar2.maxRpm 4000
ObjectTemplate.newCar2.useClutchedTorque 0
ObjectTemplate.newCar2.wheelInertia 100
ObjectTemplate.newCar2.engineFeedbackMod 0.6
ObjectTemplate.newCar2.brakeTorque 2500
ObjectTemplate.newCar2.engineBrakeTorque 2000
ObjectTemplate.newCar2.frictionTorque 100
ObjectTemplate.newCar2.frictionMod 1.5
ObjectTemplate.newCar2.slopeTorqueMod 0.5
ObjectTemplate.newCar2.wheelLongFrictionMod 1
ObjectTemplate.newCar2.wheelLongDriveFrictionMod 1.5
ObjectTemplate.newCar2.wheelLongPeakAt 0.1
ObjectTemplate.newCar2.wheelLongMinDynamicFriction 0.7
ObjectTemplate.newCar2.wheelLongScale 0.05
ObjectTemplate.newCar2.wheelLatFrictionMod 2
ObjectTemplate.newCar2.wheelLatDriveFrictionMod 0.3
ObjectTemplate.newCar2.wheelLatPeakAt 0.1
ObjectTemplate.newCar2.wheelLatMinDynamicFriction 0.7
ObjectTemplate.newCar2.wheelLatScale 0.1[/color]
ObjectTemplate.audio.newStyleAudio 1
I've put in bold the most critical settings for the vehicle's performance. The settings in red I have no idea about, didn't see them on any tracked vehicles at all thou guessing by the code they are only for car/wheeled vehicles

The settings in blue are more of an audio thing I think, when changing them they didn't do anything for performance for tracked vehicles.
I seriously can't remember what each one dose excatly now its been a few months since I last did any work on these settings but the ones I can remember are:
Min/Max Rotation: basically the min amount the engine can spin forwards or backwards, different values means different things sometimes has no effect, sometimes has a large effect. iirc also the first (x, as in x/y/z ie 0/0/0) setting controls the amount you can turn left and right while z controls the amount you can go forwards and backwards.
For a little example on how this can be used for the Warrior by changing the code from:
Code: Select all
ObjectTemplate.setMinRotation -1/0/-1000
ObjectTemplate.setMaxRotation 1/0/1000
To:
Code: Select all
ObjectTemplate.setMinRotation -1/0/-1000
ObjectTemplate.setMaxRotation 1/0/0
I managed to crate a runaway warrior that if a player got in it would drive forwards and there was nothing you could do about it other than turn left or right, you couldn't stop it apart from getting out of it
[xfire]194a5c[/xfire]
MaxSpeed: Can't really remember what this setting did excatly but iirc it dosen't really control the vehicles speed in most cases
Acceleration: Affects the vehicles speed, very trial and error and some settings are pretty rubbish. Set it to low and the vehicle wont even move, with low settings we have it like we have the tanks now where you have to hold the button down for a little bit before the vehicle starts moving.
Torque: Basic power of the engine iirc.
Differential: iirc this is the thing that actually controls the vehicles speed.
NumberOfGears: This was the item that was confusing most of us coders for years as to why we couldn't increase the reverse speed. It turns out that the Gears really dont do a lot more (if nothing more) than really determine the reverse speed of a vehicle. Its a little hard to explain so I'll use some examples.
If you have 1 gear, the reverse speed is basically the same speed as the forwards speed.
If you have 2 gears, the reverse speed is basically 1/2 the speed of the forward speed, give or take a little.
If you have 3 gears the reverse speed is around 1/3 of the reverse speed, give or take a bit.
And so on.
The difference between the forwards and reverse speed iirc can be tweaked a little more by the Min/Max Rotation setting but there isn't that much you can control with that, its more down to the gears.
I think that's the main stuff about the coding.
Also when coding these vehicles try and match there r/l performance specs. If you want to try and do one vehicle for seeing if you can get to grips with this I might be able to get a MA to post all the data on the vehicle and have you try and match that (basically what we did with the tracked vehicles as best we can). Its unrealistic to match them excatly with the BF2 engine but you can get pretty close in some areas we found
I also made this map here to help testing vehicles on ingame, mainly there performance on different materials, gradient testing, fording testing and time trials. The only really way to test a vehicles speed accurate in BF2 is to test its max speed between two set points and time it. IIRC the track I have set out is 100m long and there is simple online distance/time conversions for speed so you dont need to work it out yourself and its really a matter of trial and error from there. You can also do it a bit in the editor by timing by the grid distance thou I can't remember how far the grid goes out in the editor but it aint 100m, something like 120m or something from the centre, can find out if you need. Then you just need to drive from one point to the other with a stop watch in your hand.
Anyways here's the map if you want it:
Test Track - Vehicle Testing Map - Official BF Editor Forums
Good luck with this, would be good if someone can do all this
