[2.2] Vehicle movement script changes

Discussion in 'Archive' started by Drag, Jun 11, 2008.

  1. Headshotmaster

    Headshotmaster Member

    Messages:
    1,509
    Likes Received:
    0
    Trophy Points:
    0
    In all honesty, the vehicle code my need an overhaul : /

    At least after the first release of 2.2

    Why? Because from what I hear, it's mostly a large hack, and convoluted.
     
  2. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Meh, that would probably be the best. But as far as I know the core of vehicle movements is located in the "valve only" section of the source engine code. I can only guess that changing things there would require a huge amount of work or be impossible.

    By the way:
    Why are there 3 unused sound files for missile launcher reloads in the empires install? I mean I changed 5 lines and got them to work just fine. I find them pleasing to the ear.
     
  3. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
  4. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Kay, testing.
    Edit: Tested, preliminary testing showed no improvement although vehicles drive a tad bit different. What exactly was limited before, the acceleration? Vehicles still lack any grip and slide along like... well the episode 2 jeep if they reach 3phase engine speed. Sometimes even below that.

    Well I'll try some more.
     
    Last edited: Jul 20, 2008
  5. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    When you were driving a tank and your speed was higher than N your tank throttle was limited. (steering left/right made it happen even earlier)
     
  6. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    http://www.myfile.ch/?d=8DD95BEC4

    Edit1: Changes to Arty.

    Brenodi

    CV
    degreesSlow: 40 to 45
    degreesFast: 20 to 30
    faststeeringrate 0.5 to 0.75

    Jeep
    degreesSlow: 40 to 45 //this needs to be done to make standard engine driveable; minimum sensible value is 40, maximum value is 60.
    degreesFast: 20 to 25 //This can be set from 10 to 80 (80 being like a panther)
    faststeeringrate: 0.25 to 0.75 // this is the best variable to use if you want faster turning
    skidallowed: 0 to 0 // NO CHANGE YET: this DISABLES the skid sounds, we might want to turn it on if we want skid sounds for jeeps

    Jeep sounds reverted to 2.12 state (--> Valve standard ATV)
    Changes above that:

    "state"
    {
    "name" "SS_GEAR_0"
    "sound" "ATV_rev"
    "min_time" "0.35" //changed from 0.75, this was set too high creating a gap between "engine revving" and "engine going into first gear"
    }
    "state"
    {
    "name" "SS_GEAR_0_RESUME"
    "sound" "ATV_engine_idle"
    "min_time" "0.2" // changed from 0.75, it is a looping idle sound. If you stop accelerating after "SS_GEAR_0" before it hits the next gear, or after falling back into Gear 0 this sound is played, its a loop sound, no need for a high mintime.
    }

    AFV:
    degreesSlow: 40 to 50 //needed, AFV almost unturnable in vanilla 2.2 RC 2
    degreesFast: 20 to 60 //same
    steeringExponent: 1.4 to 1.3 //gives a more "direct steering" feeling, can be set from <0.8 to 1.4 ; 0.8 being race car
    slowsteeringrate: 2 to 3
    faststeeringrate: 0.5 to 1.0

    APC:
    degreesFast: 20 to 60
    steeringExponent: 1.4 to 1.3
    slowsteeringrate: 2 to 3
    faststeeringrate: 0.25 to 0.5


    Med Tank: // this thing reacts pretty extreme to changes
    faststeeringrate: 0.25 to 0.5

    Heavy Tank:
    degreesSlow: 50 to 45 // it turned way too fast for a heavy tank that nearly always goes slow anyway

    Arty Tank:
    steeringExponent: 1.4 to 1.2 //this fits the artillery tank better, it shouldn't be able to turn a lot, but it should react to small incremental (aiming) turns faster
    slowsteeringrate: 1.5 to
    faststeeringrate: 0.5 to 1

    Northern Faction

    CV
    degreesSlow: 40 to 50
    degreesFast: 20 to 30
    slowsteeringrate 2 to 3 //dearly needed
    faststeeringrate 0.25 to 1.0

    Jeep
    slowsteeringrate: 1.0 to 1.5
    faststeeringrate: 0.25 to 0.75
    skidallowed: 0 to 0 // NO CHANGE YET: this DISABLES the skid sounds, we might want to turn it on if we want skid sounds for jeeps

    Jeep sounds reverted to 2.12 state (--> Valve standard ATV)
    Changes above that:

    "state"
    {
    "name" "SS_GEAR_0"
    "sound" "ATV_rev"
    "min_time" "0.35" //changed from 0.75, this was set too high creating a gap between "engine revving" and "engine going into first gear"
    }
    "state"
    {
    "name" "SS_GEAR_0_RESUME"
    "sound" "ATV_engine_idle"
    "min_time" "0.2" // changed from 0.75, it is a looping idle sound. If you stop accelerating after "SS_GEAR_0" before it hits the next gear, or after falling back into Gear 0 this sound is played, its a loop sound, no need for a high mintime.
    }

    Light Tank:
    degreesSlow: 40 to 45
    steeringExponent: 1.4 to 1.3 //gives a more "direct steering" feeling, can be set from <0.8 to 1.4 ; 0.8 being race car
    slowsteeringrate: 2 to 2
    faststeeringrate: 0.5 to 0.75

    APC:
    degreesFast: 20 to 60
    steeringExponent: 1.4 to 1.3
    slowsteeringrate: 2 to 3
    faststeeringrate: 0.25 to 0.5


    Med Tank: // this thing reacts pretty extreme to changes
    NO changes for now

    Heavy Tank:
    degreesSlow: 50 to 60
    slowsteeringrate 3 to 3.25

    Arty Tank:
    degreesSlow: 40 to 50
    degreesFast: 20 to 60
    steeringExponent: 1.4 to 1.2 //this fits the artillery tank better, it shouldn't be able to turn a lot, but it should react to small incremental (aiming) turns faster
    slowsteeringrate 2 to 2.25
    faststeeringrate: 0.5 to 1
     
    Last edited: Jul 24, 2008
  7. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    Can you upload zipped scripts?
     
  8. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Edit:

    Northern Faction Jeep Changes to minimize spin out (thanks cyberkun)

    addgravity: 0.33 to 0.3 //helps a lot


    changed to

    This helps minimizing spin out as those gears are used when spin out happening.

    steeringexponent : 1.4 to 1.0
    slowsteeringrate : 1 to 2 //to make it turnable with low speeds
    faststeeringrate : 0.25 to 0.5

    turnthrottlereducefast: 0.01 to 0.1 // helps without slowing it down a lot
     
  9. Emp_Recruit

    Emp_Recruit Member

    Messages:
    4,244
    Likes Received:
    0
    Trophy Points:
    0
    Can you reup the dlls with the limiting off?
     
  10. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Thanks sandbag. Improved BE vehicles a bit.

    NF vehicles slightly improved but still not up to par.

    Too tired for changelog.
     
  11. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    any time. it's difficult to get something satisfying. all the features you tweak change every other aspect about the drive, so you can't just say that it's oversteering and correct the max turn speed because that changes the ordinary turn speed.
     
  12. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    I want someone to look at NF jeeps. The problem started happening after porting to OB SDK. I don't know if it's script, model or code.
     
  13. Lollum

    Lollum Tester++

    Messages:
    1,437
    Likes Received:
    1
    Trophy Points:
    0
    I would suspect the code first.
     
  14. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    About the NF jeep, I've already tried to tweak the physics scripts to see if it is a script issue. Used 2.2 vanilla scripts (the ones where the jeep still worked)

    First and accurate description of what happens:
    Jeep gets build, it spawns in the air inside the VF. It falls down normally. The wheels start touching the ground and the suspension "is used". An unknown force (multiplied by suspension values) pushes the right or the left side of the vehicle up. when the other side of the vehicle hits the bottom the same force pushes said side up. This happens 4-5 times until the jeep has so much momentum around the forward axis that it jumps into the air flipping. It is as if the physics force/speed is stacking up like crazy. This used to happen back in the 1.08 days when you messed up the mass/weight of tanks. But I checked and changed the mass of the jeep a thousand times now.

    After looking at the process of the jeep flipping out in slowmotion (phys_timescale 0.05) I thought maybe the suspension was bugged resulting in the chassis being "sproinged" up like crazy.

    Reducing the strength of the suspension I could get the Jeep to STAY at the ground and be even driveable. (shaky) BUT the jeep still shakes while standing still. So the problem is still there and the suspension settings just "multiply" it. Without suspension at all the thing is of course just an undriveable brick.

    After that I changed the mass center of the jeep thinking maybe it is too low,... inside the ground or something, didn't net any results. Increasing the mass (the the gravity) doesn't remedy the jumpiness.

    I then looked into the model file to see if there is something wrong with the mass or something. Couldn't find anything that is likely to cause it there. It's basically the same as in 2.12. Maybe the model file has to be "redone" for OB engine? Unlikely.

    Maybe the bones? for the wheels are misaligned so they are inside the main body of the vehicle. Thus the suspension between them would cause weird things to happen. Looking at the model it doesn't seem to be the case.

    As for the code... dunno.
     
  15. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    It behaves like suspension would have no damping.
     
  16. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Suspension damping is "2" at default setting. Setting it higher (50+) makes the whole flipping process go much faster, the spring jumps up and down faster thus the jeep gets even more momentum.

    Lowering it to 1 does the opposite but doesn't prevent flippage.
     
  17. bitchslap

    bitchslap Member

    Messages:
    1,217
    Likes Received:
    0
    Trophy Points:
    0
    maybe it simply needs more mass due to its poor aerodynamics and high speed....

    just a thought.
     
  18. Drag

    Drag Member

    Messages:
    748
    Likes Received:
    0
    Trophy Points:
    0
    Brenodi

    CV
    degreesSlow: 40 to 45
    degreesFast: 20 to 30
    steeringExponent 1.4 to 1.3
    faststeeringrate 0.5 to 0.85
    skidallowed 1 to 0 //disables the skid sounds, not needed for proper driving

    Jeep
    axleratio 5.56 to 4.56 //Helps with spin outs
    2nd gear: 1.59 to 1.49 //Helps with spin outs
    3rd gear: 1.17 to 1.26 //Compensates for the above changes so overall acceleration isn't hampered
    slowsteeringrate: 1 to 2
    faststeeringrate: 0.25 to 0.5
    skidallowed: 0 to 0 // NO CHANGE YET: this DISABLES the skid sounds, we might want to turn it on if we want skid sounds for jeeps

    Jeep sounds reverted to 2.12 state (--> Valve standard ATV)
    Changes above that:

    "state"
    {
    "name" "SS_GEAR_0"
    "sound" "ATV_rev"
    "min_time" "0.35" //changed from 0.75, this was set too high creating a gap between "engine revving" and "engine going into first gear"
    }
    "state"
    {
    "name" "SS_GEAR_0_RESUME"
    "sound" "ATV_engine_idle"
    "min_time" "0.2" // changed from 0.75, it is a looping idle sound. If you stop accelerating after "SS_GEAR_0" before it hits the next gear, or after falling back into Gear 0 this sound is played, its a loop sound, no need for a high mintime.
    }

    AFV:
    degreesSlow: 40 to 50 //needed, AFV almost unturnable in vanilla 2.2 RC 2
    degreesFast: 20 to 50 //same
    steeringExponent: 1.4 to 1.3
    slowsteeringrate: 2 to 3.5
    faststeeringrate: 0.5 to 1.0
    skidallowed: 1 to 0

    "vehicle_sounds"
    {
    // List gears in order from lowest speed to highest speed

    "gear"
    {
    "max_speed" "0.6"
    "speed_approach_factor" "0.13"

    CHANGED TO:


    "vehicle_sounds"
    {
    // List gears in order from lowest speed to highest speed

    "gear"
    {
    "max_speed" "0.4"
    "speed_approach_factor" "0.13"

    //This fixes the "afv constant gear changing sound bug"

    APC:
    degreesFast: 20 to 50
    steeringExponent: 1.4 to 1.3
    slowsteeringrate: 2 to 2.25
    faststeeringrate: 0.25 to 0.5
    skidallowed: 1 to 0

    Med Tank: // this thing reacts pretty extreme to changes
    steeringExponent: 1.4 to 1.0
    faststeeringrate: 0.25 to 0.75
    skidallowed: 1 to 0
    Inertia (front axle): 0.5 to 0
    Damping (2nd axle): 0 to 0.5 //stabilizes the tank, prevents spin out with fast engines
    Inertia (3rd axle): 0.5 to 0
    Inertia (rear axle): 0.5 to 0
    Damping (rear axle): 0.2 to 0

    Heavy Tank:
    degreesFast: 25 to 30
    faststeeringrate: 0.5 to 0.75
    skidallowed: 1 to 0

    Arty Tank:
    steeringExponent: 1.4 to 1.2
    slowsteeringrate: 1 to 1.25
    faststeeringrate: 0.5 to 0.75
    skidallowed: 1 to 0


    Northern Faction

    CV
    degreesSlow: 40 to 50
    degreesFast: 20 to 30
    slowsteeringrate 2 to 3.25 //dearly needed
    faststeeringrate 0.25 to 1.25
    skidallowed: 1 to 0

    Jeep
    addgravity: 0.33 to 0.3
    maxrpm: 1500 to 600
    2nd gear: 1.59 to 1.49
    3rd gear: 1.17 to 1.26
    steeringexponent: 1.4 to 1.0
    slowsteeringrate: 1 to 2
    faststeeringrate: 0.25 to 0.5
    turnThrottleReduceFast: 0.01 to 0.1
    skidallowed: 0 to 0 // NO CHANGE YET: this DISABLES the skid sounds, we might want to turn it on if we want skid sounds for jeeps

    Jeep sounds reverted to 2.12 state (--> Valve standard ATV)
    Changes above that:

    "state"
    {
    "name" "SS_GEAR_0"
    "sound" "ATV_rev"
    "min_time" "0.15" //changed from 0.75, this was set too high creating a gap between "engine revving" and "engine going into first gear"
    }
    "state"
    {
    "name" "SS_GEAR_0_RESUME"
    "sound" "ATV_engine_idle"
    "min_time" "0.2" // changed from 0.75, it is a looping idle sound. If you stop accelerating after "SS_GEAR_0" before it hits the next gear, or after falling back into Gear 0 this sound is played, its a loop sound, no need for a high mintime.
    }

    Light Tank:
    degreesSlow: 40 to 45
    steeringExponent: 1.4 to 1.2 //gives a more "direct steering" feeling, can be set from <0.8 to 1.4 ; 0.8 being race car
    slowsteeringrate: 2 to 2.25
    faststeeringrate: 0.5 to 1
    skidallowed: 1 to 0

    APC:
    degreesSlow: 40 to 50
    degreesFast: 20 to 30
    steeringExponent: 1.4 to 1.0
    slowsteeringrate: 2 to 2.25
    faststeeringrate: 0.25 to 0.65
    turnThrottleReduceSlow: 0.01 to 0.05
    turnThrottleReduceFast: 0.01 to 0.05
    skidallowed: 1 to 0

    Med Tank: // this thing reacts pretty extreme to changes
    2nd gear: 1.59 to 1.35
    3rd gear: 1.17 to 1.27
    steeringExponent 1.4 to 1.2
    slowsteeringrate 3 to 4
    faststeeringrate 0.75 to 1.5
    skidallowed: 1 to 0

    Heavy Tank:
    degreesFast: 25 to 30
    steeringExponent: 1.4 to 1.2
    faststeeringrate: 0.5 to 1
    steeringRestRateFast: 2.0 to 2.5
    skidallowed: 1 to 0

    Arty Tank:
    degreesSlow: 40 to 50
    degreesFast: 20 to 60
    steeringExponent: 1.4 to 1.2
    slowsteeringrate: 2 to 2.25
    faststeeringrate: 0.5 to 0.75
    skidallowed: 1 to 0
     
    Last edited: Aug 16, 2008
  19. Aranjedeath

    Aranjedeath Member

    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    0
    The latest Vehicle scripts in svn when I played it were nice. Not like 2.12 glory, but the jeeps were working(so wtf are you people talking about, LOL).
    The jeeps were pretty brickish, but working. and they kinda drove, just not so fast.
     

Share This Page