SCRIPT TO FORCE CLUTCH/question from a non-driver irl

Gtuner Plugins support. MaxAim, MaxRemapper, Combo Magick, Game Rec.

SCRIPT TO FORCE CLUTCH/question from a non-driver irl

Postby glenntidbury » Tue Oct 02, 2018 7:21 am

Hi,

Just wondering, as someone who can't drive in real life, if someone can answer a question I have about using the clutch.

I understand that, in real life, you need to use clutch to change gears....but in some games that support my g29 wheel/pedals/gear stick, you can change gears even without using the clutch.

What I'm proposing to do, is try to write a script that prohibits input from the gear stick unless the clutch is pressed first.

Can any real life drivers explain to me, when you change gear, is it the same as when you first set off in a car, and you need to find the biting point ion order to change gear? or do you just put the clutch to the floor and then release once you've moved the gear stick?

Even though I don't drive in real life, I'd like to add to the already immersive experience of things like driveclub vr, by forcing the use of the clutch.

Hope this makes sense?
Last edited by glenntidbury on Fri Oct 05, 2018 3:37 pm, edited 1 time in total.
User avatar
glenntidbury
Sergeant Major
Sergeant Major
 
Posts: 98
Joined: Thu May 24, 2018 4:34 pm

Re: question from a non-driver irl

Postby J2Kbr » Fri Oct 05, 2018 7:12 am

glenntidbury wrote:or do you just put the clutch to the floor and then release once you've moved the gear stick?

If the car is in movement, this is all what you need to do. :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: question from a non-driver irl

Postby glenntidbury » Fri Oct 05, 2018 7:29 am

cool, thank you for that :)

Definitely going to try and give this a go at some point this weekend then :)
User avatar
glenntidbury
Sergeant Major
Sergeant Major
 
Posts: 98
Joined: Thu May 24, 2018 4:34 pm

Re: question from a non-driver irl

Postby glenntidbury » Fri Oct 05, 2018 3:35 pm

ok, this is what I've come up with.

does it look about right?

seems to work as intended, the only real drawback, is that there's still nothing to stop you using the shifter and THEN pressing the clutch, instead of forcing you to press the clutch first.

it works for the g29, with pedals and shifter, but I also added in the shifter paddles to the mix too, so that you can force use of the clutch on those too.

added an option to set a biting point for the clutch either in script or on the fly.

it should be noted that by biting point, I'm just referring to the amount that you need to depress the clutch before it will affect changing gears....it won't affect the use of the clutch in terms of other things in the games.

just been testing it using driveclub vr, and it seems to work pretty good.

also made it so that the t2 will display n, 1, 2, 3, 4, 5, 6 or r depending which gear is active.

Hopefully someone finds this useful.

can anyone see any glaring errors before I publish it in gtuner?


Code: Select all
// SCRIPT FOR LOGITECH G29 TO FORCE USE OF THE CLUTCH WHEN USING THE SHIFTER
//
//
// TO CHANGE GEAR, YOU MUST NOW PRESS THE CLUTCH TO THE 'BITING POINT'
// BEFORE IT WILL CHANGE
//
// IF ALREADY IN NEUTRAL, THE GEAR SIMPLY WON'T CHANGE
//
// IF ALREADY IN GEAR, IT WILL GO BACK TO NEUTRAL AS SOON AS
// YOU MOVE THE SHIFTER, REGARDLESS OF WHETHER YOU PRESSED THE CLUTCH
// HOWEVER, IF YOU DON'T PRESS THE CLUTCH, IT WON'T CHANGE BACK INTO GEAR
//
// 'BITING POINT' CAN BE SET MANULLY VIA THE FIX32 VALUE IN SCRIPT
// OR YOU CAN SET IT ON THE FLY.
// TO DO THIS - PUSH THE CLUTCH TO THE DESIRED LEVEL
// AND THEN PRESS EITHER L2 OR R2 ON THE FRONT OF THE WHEEL
// (WHICH ACTUALLY CORRESPOND TO BUTTON_19 AND BUTTON_20).
//
// THIS SCRIPT IS DEGISNED TO WORK WITH GAMES THAT NATIVELY USE THE G29
// IN CONJUNCTION WITH IT'S PEDALS AND SHIFTER.
//
// IT WILL ALSO FORCE CLUTCH FOR THE SHIFTER PADDLES (L1/R1)
// USING THE SAME BITING POINT.
//
// CAN BE TOTALLY DISABLED BY SETTING THE BITING POINT TO ZERO
//
#pragma METAINFO("g29", 1, 0, "glenntidbury")
#include <display.gph>
init {
port_connect(PORT_USB_C, PROTOCOL_WHEEL);
}
uint16 gear = 0;
fix32 bitingpoint = 75.0;
main {
if(event_active(BUTTON_19)){
bitingpoint = get_actual(BUTTON_21);
}
if(event_active(BUTTON_20)){
bitingpoint = get_actual(BUTTON_21);
}
if(get_actual(ACCEL_2_X) == 0.0){
if(get_actual(ACCEL_2_Y) == 0.0){
if(get_actual(ACCEL_2_Z) == 0.0){
if(get_actual(GYRO_1_X) == 0.0){
if(get_actual(GYRO_1_Y) == 0.0){
if(get_actual(GYRO_1_Z) == 0.0){
if(get_actual(ACCEL_1_Z) == 0.0){
gear = 0;
}
}
}
}
}
}
}
if (gear == 0){
set_val(ACCEL_2_X, 0.0);
set_val(ACCEL_2_Y, 0.0);
set_val(ACCEL_2_Z, 0.0);
set_val(GYRO_1_X, 0.0);
set_val(GYRO_1_Y, 0.0);
set_val(GYRO_1_Z, 0.0);
set_val(ACCEL_1_Z, 0.0);
display_overlay(_N_,1000);
}
if(gear == 1){
set_val(ACCEL_2_X, 100.0);
display_overlay(_1_,1000);
}
if(gear == 2){
set_val(ACCEL_2_Y, 100.0);
display_overlay(_2_,1000);
}
if(gear == 3){
set_val(ACCEL_2_Z, 100.0);
display_overlay(_3_,1000);
}
if(gear == 4){
set_val(GYRO_1_X, 100.0);
display_overlay(_4_,1000);
}
if(gear == 5){
set_val(GYRO_1_Y, 100.0);
display_overlay(_5_,1000);
}
if(gear == 6){
set_val(GYRO_1_Z, 100.0);
display_overlay(_6_,1000);
}
if(gear == 7){
set_val(ACCEL_1_Z, 100.0);
display_overlay(_r_,1000);
}
if(get_actual(BUTTON_21) < bitingpoint){
set_val(BUTTON_4, 0.0);
set_val(BUTTON_7, 0.0);
}
if(get_actual(BUTTON_21) >= bitingpoint){
if(event_active(BUTTON_7)){
set_val(BUTTON_7, 100.0);
}
if(event_active(BUTTON_4)){
set_val(BUTTON_4, 100.0);
}
if(get_actual(ACCEL_2_X) == 100.0){
gear = 1;
}
if(get_actual(ACCEL_2_Y) == 100.0){
gear = 2;
}
if(get_actual(ACCEL_2_Z) == 100.0){
gear = 3;
}
if(get_actual(GYRO_1_X) == 100.0){
gear = 4;
}
if(get_actual(GYRO_1_Y) == 100.0){
gear = 5;
}
if(get_actual(GYRO_1_Z) == 100.0){
gear = 6;
}
if(get_actual(ACCEL_1_Z) == 100.0){
gear = 7;
}
}
}
User avatar
glenntidbury
Sergeant Major
Sergeant Major
 
Posts: 98
Joined: Thu May 24, 2018 4:34 pm

Re: SCRIPT TO FORCE CLUTCH/question from a non-driver irl

Postby glenntidbury » Fri Oct 05, 2018 4:23 pm

just done a bit more testing.

For driveclub VR, i'm really happy with it, aside from the afore mentioned "cheat" that you can still use the stick, THEN hit the clutch.

For GT sport vr, I'm also very happy with it, although it does behave slightly differently to driveclub, in that when you put the stick to neutral (e.g. by coming out of gear without using the clutch), it still stays in the previous gear, rather than actually going into neutral...but I guess this is just the way the game works...not a lot I can do with that. Still prefer this to the standard way the game operate, where you can switch gears without even touching the clutch at all.

For dirt rally vr, this script isn't needed at all really....because the game already makes excellent use of the clutch, and already forces you to use it to change gears (and to pull away).


These are the 3 main games that I use my wheel for.

let me know what y'all think.
User avatar
glenntidbury
Sergeant Major
Sergeant Major
 
Posts: 98
Joined: Thu May 24, 2018 4:34 pm

Re: SCRIPT TO FORCE CLUTCH/question from a non-driver irl

Postby glenntidbury » Tue Oct 30, 2018 10:04 am

Just a quick update to say that I've rewritten the script now. It now forces you to use the clutch, but won't actually change gears until you both depress the clutch pedal to the "clutch release" value, and then release the clutch pedal to the "clutch engaged" value.

on my first version, the gear would change as soon as you pressed the clutch to the "biting point"....whereas the new one has 2 "points", and you must press the pedal in to and then release it past these points for gears to change.

As I said, I'm a non driver irl but form what I can gather, this is much closer to how a clutch/gears mechanisms work? i.e. you must press the clutch pedal to release the mechanics from the gears, change the gears using the stick, and then engage the gears with the clutch mechanics by releasing the clutch?

if anyone has any further insight on this subject I'd welcome your input. if you prefer the old way I had it, both scripts are still available on gtuner, just search psvr or g29 or clutch.

Hope you enjoy this :)
User avatar
glenntidbury
Sergeant Major
Sergeant Major
 
Posts: 98
Joined: Thu May 24, 2018 4:34 pm

Re: SCRIPT TO FORCE CLUTCH/question from a non-driver irl

Postby J2Kbr » Tue Oct 30, 2018 12:24 pm

:joia: :joia:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to Gtuner Plugins Support

Who is online

Users browsing this forum: No registered users and 48 guests