• This Website Is Not For Sale
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multitronic Technology?

Discussion in 'Racer Physics and Technical' started by FROST John, Feb 26, 2013.

  1. Can we script a transmission technology like in this video?Is it possible?

  2. KS95

    RACER Moderator

    I don't think so, as the multitronic is a CVT and Racer only supports transmissions with actual gears. However in the past a Prius in Racer had a CVT that was fudged and it worked alright, or there might be a way to do it with scripts like people have done with automatics.
  3. In theory you can fudge that behaviour with clutch slip, but it's not ideal.

    Really what you'd want to do is alter the gear ratio dynamically with speed, but I'm not sure if that is possible via Onyx right now, never mind qscript.

    We really need Ruud to finish up Onyx and expose all the car.ini and system variables before we can do stuff like this properly.


  4. Yeah I remember a previous Concept Competition car that had a fudged CVT (as well as the Prius). Maybe though its something that Ruud could implement, like having a selectable transmission type of manual, automatic, CVT, etc. (I can only thing of the it having to be a selectable trans in the car.ini because of the CVT's near infinite combination of ratios).
  5. You can tweak gear ratios via editing system parameters with qscripts (car0.gearbox.gear2_ratio for example), I don't know if it's generalizable though cause the 'car0' part of that is not as such available to the script. I guess you could try all car#s until you find the one with some signature value, but then you can't run multiple of the same car at once.

    I tried it once but didn't base it on realism, just had it aim to tweak the ratio until the engine was running at a particular speed (which is more what a hybrid will do, than a CVT). Drove very weird, to be honest.
  6. Then we should wait for Onyx...I'm sure I'm going to make a transmission like CVT :)

  7. I have an idea like that:
    Like skybh's automatic gear script,we can make it ;)

    More throttle=Longer gear ratios
    For example,if you put on the gas 75 percent,gear ratio is 0.976
    100 percent,gear ratio is 0.587
    Or we can select the shortest and the longest gear ratio and script can adjust the ratios on its own. For example; 4,537 is the shortest ratio and 0,587 is the longest ratio. I think second one is more wisely.

  8. It doesn't work like that though.

    It works on getting engine revs at max power when the throttle is at max. Ie, I want to go as fast as possible, ergo you need the engine at max power.

    Thus the ratio you want is a function of current road speed and the shape of the power curve (roughly linear to peak power, but most diesels bulge a bit in the middle)

    Doing it purely based on throttle won't work, you also need to continually adjust it based on speed too :D

    It's a pretty easy calc really, we just need proper access to the variables (why we can't just access all car.ini variables via car.ini syntax is beyond me.

    ie, this_car.gearbox.final_drive = function(wheelspeed and throttleposition)

    Simples :D

  9. Sorry,my english is not good but i'm a foreign language student.11th grade :D But i promise you i'm going to improve it...
  10. my experiences with CVT's (probably some pretty bad ones at that) has told me that it does seem to work like if you put it full throttle it will go all the way up the rev range and sit there until you let off, so just set the max rpm at the peak hp rpm, but if you're say on the freeway it will put it closer to a set rpm (like 2000 rpm). So really for max power like a CVT would do, is not so hard, we could probably do it right now, its just the rest of it that would need a lot more work to get working right.

    Need Stereo to chime in with something here I think lol.
  11. Turns out I did write a working CVT script in 0.8.38. Haven't tested it much so I can't say which this'll work for. Should be fine in anything more recent since it's pretty basic QScript but I don't remember when the system parameter it needs became available so it may not work in earlier versions. It does have code to handle multiplayer but that's untested.

    goes in cars\f100\scripts\physics\cvt.rsx, or equivalent.
    // Continuously variable transmission: Uses gear 1 of the car.
    // approximate 'idle' rpm
    float $minrpm = 800
    // approximate 'max acceleration' rpm
    float $maxrpm = 3300
    // highest ratio possible, used at low speeds
    float $minrat = 16.0
    // lowest ratio possible, used at high speeds
    float $maxrat = 0.9
    // tracking vars
    float $throttle = 0
    float $rpm = 0
    float $tt = 0
    rcar $car = get scriptowner car
    // grab the string associated with this car
    int $ncars = get carcount
    int $i = 0
    rcar $ccar = get car $i
    while $car != $ccar {
      $i = $i + 1
      $ccar = get car $i
    string $req = "car" + $i
    // $req now contains car0, car1, whatever this car is.
    // tag on the specific thing we're modifying - gear2 is 1st forward gear
    string $out = $req + ".gearbox.gear2_ratio"
    float $ratio = get system $out
    while 1
      // use throttle^2 to determine target rpm between min and max
      // at full throttle it aims for maxrpm, at no throttle, min.
      $throttle = get $car throttle
      $throttle = $throttle*$throttle
      $rpm = get $car rpm
      $tt = ($maxrpm-$minrpm)*$throttle + $minrpm
      // update transmission ratio to approach correct speed
      $ratio = $ratio + 0.0001*($tt-$rpm)
      // check ratio's not too high
      if $ratio < $maxrat {
        $ratio = $maxrat
      // and not too low
      if $ratio > $minrat {
        $ratio = $minrat
      // update system variable
      set system $out to $ratio
    The 4 numbers at the top are pretty much all you want to tweak - this is set up for a truck so the idle and max-horsepower RPMs are both fairly low, as is the minimum gear. The ratios would be read off the CVT's info. Similar to the range from 1st to final gear in a normal car would make sense.
    Script plays out about the way this thread suggests it. It just compares throttle to current rpm and adjusts the ratio.

    car.ini should be set for only one forward gear, this is tweaking 1st gear with a fixed final diff. ratio.
    • Like Like x 1
  12. KS95

    RACER Moderator

    The like of the Lexus GS450h works slightly differently. If you floor it once it hits 65mph or so the ratio gets longer for the post-60 acceleration. Confusing things, eh?

    And for CVT haters have a look at Audi's newer multitronic (new-shape A4s, A5s etc) in manual mode. You'll be impressed! :)
  13. I'm thinking of making a script like the technology of Audi..Lexus' technology is very confusing :D
    • Like Like x 1

  14. Am I doing something wrong or what, because no matter what car I try to run the script with, racer hangs at the loading screen forever, using 60% CPU and not responding. Using RC6
  15. Try an earlier version RC6 is real buggy.
  16. Tried with RC5 & 0.8.44, still hangs on both versions.
    EDIT: Works fine with 0.8.36
  17. I've got RC5,can you send me the script for testing,please?