Maximum Gear posibility?

Hello;

I want to learn that how many gears can be added to Racer?

I have a Scania gearbox(14 speeds).I want to play with it.

Is it possible,for latest versions?
 
Nope, not directly any way.

BUT, with Onyx, and then into qscript, you can access the gear ratios, and in theory set the gear ratios too.
This will be ok for local play, but it might be problematic with network/AI cars on track at the same time.

Sooooo, set 7 gears for low range, and then 7 gears for high range, then toggle between high/low range with a button.


I could help you script it, but I think someone like Stereo might have already had a play with this seeing his truck stuff so far :D

Dave
 
Ok thanks for the data John.

The high vs low option seems to be 1.25x ratio.

So if we use a final drive of 2.71 at the rear axle, then the easiest thing to do is fudge the final drive to make the 1.25 ratio adjustment.

I assume in real life the truck gearbox uses an optional gear set for hi/low options on the end of the gearbox, but since we don't have that in Racer we'll add it to the final drive.


Soooo... add all ratios as usual in Racer as per the Scania document for the high option.

Then use this script in the scripts/physics folder:

Code:
rcar $car = get scriptowner car
 
shared int $lohi = 1
 
int $keyPressed = 0
 
float $low = 3.3875
float $high = 2.71
 
// A nice toggle script for the input key feature state
func void input()
{
    if is key 84 pressed        //Toggle with key T
    {
        if $keyPressed == 0
        {
            $keyPressed = 1        //Mark as pressed
            if $lohi == 1
            {
                $lohi = 0
            }
            else
            {
                $lohi = 1
            }
        }
    }
    else
    {
        $keyPressed = 0            //Mark as released
    }
}
 
func void lohi()
{
    if $lohi == 0
    {
        set system "car0.differential0.ratio" to $low;
    }
    else if $lohi == 1
    {
        set system "car0.differential0.ratio" to $high;
    }
}
 
while 1
{
    input()
    lohi()
    interrupt
}

Also place this script in the paint folder:

Code:
shared int $lohi
 
paint ("High box = " + $lohi) at float[2]{30,10}


The gearbox defaults to high option. Use the T key (or choose another and alter the code) to toggle from high to low option.

The painted High box text should read out which option is selected, 1 for high selection, 0 for low selection.



I've tested it here and it works ok. It probably is more realistic than doing it any other way because iirc these types of systems are constant torque?


Cheers

Dave
 
Sorry but it's a real pain to upload files here... RD forums for you :(

Basically right click, create new file, text document.

Copy the code from the first code entry into the file. Rename the file to lohi.rsx. Place in the scripts/physics folder.

Create a new txt file, copy the second code into it. Rename the file to paint_lohi.rsx. Place in the scripts/paint folder.


It's not too hard to do and you'll need to be able to do it as most things posted up are scripts in the form of code snippets like this :)

Dave
 
txt file uploading is fine, but if you don't know how to rename the files, or have extensions hidden or something, then it's a pain too.

Media fire, easier to just upload to my own web space.

Truth is, I can upload a 200kb image here, but not a 1kb zip file... which just sucks.


I'm sure if John Frost is serious about making this truck for Racer then making the RSX files from the code above will be far from the toughest thing he will have to do :D

Dave
 
I was actually about to ask for a script to basically the same thing, except it was for a 2spd rear end. But I'll try this out and set the rear end ratio to 1.00, so the script basically has the rear end ratios.
 
Played around with the script a bit, it shifts a bit rough without a clutch pedal. Fine for a two speed transfer case that you'd only shift when stopped though. The low ratio on a Dana 20 is a 2.0 multiplier anyway so the gears in the F100 I was testing it with run something like 1st lo, 1st hi, 2nd lo, 3rd lo, 2nd hi, 4th lo, 3rd hi, 4th hi. With the final diff ratio, 1st lo is overall 50:1 and it'd probably drive up walls if it had enough grip.

I dunno if anything can be done about making it shift more smoothly, I don't remember qscripts having workable access to the clutch pedal.
 
Ideally what we really need is a lot of these hard-coded elements opened up. There is for example no reason why we can't just specify 10 gears, or 20, or 50...

It'd be nice for example to be able to define two gearboxes, so they sit one after the other, both with their own shifting parameters and clutches and characteristics... gearbox0...99

It's all the same code just open ended for creative interpretation of ideas and implementations.

Dave
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 248 15.1%
  • < 2 years

    Votes: 166 10.1%
  • < 3 years

    Votes: 165 10.0%
  • < 4 years

    Votes: 122 7.4%
  • < 5 years

    Votes: 229 13.9%
  • < 10 years

    Votes: 196 11.9%
  • < 15 years

    Votes: 125 7.6%
  • < 20 years

    Votes: 94 5.7%
  • < 25 years

    Votes: 76 4.6%
  • Ok, I am a dinosaur

    Votes: 226 13.7%
Back
Top