G920 on PS4
5 posts
• Page 1 of 1
G920 on PS4
In order to use the XBox/PC wheel on the PS4, you need the plugin MaxAimDI in GTuner (because it accepts DirectInput from the PC; the wheel needs to be properly installed on the PC, of course).
I have attached the layout : g920_on_ps4.gpc
It is quite basic (DirectInput mapped to PS4 controller inputs):
The interesting part is the script : wheel max degress.gpc
The purpose of this is to multiply your input (the degrees of rotation) of the wheel to be able to use a lower than max (900 on the G920) configuration (I like to use my wheel at max 200, like an F1 wheel).
Setup : this script has to be loaded from the plugin MaxAimDI (Layout Options > Load GPC Script)
PS: hope to soon write an addition to this script to enable the H-shifter (from DIrectInput buttons to the L1 / R1 on the PS4 controller)
I have attached the layout : g920_on_ps4.gpc
It is quite basic (DirectInput mapped to PS4 controller inputs):
- - Wheel steering: Ix -> PS4_LX
- - Gas pedal: Iy -> PS4_R2
- - Brake pedal: IRz -> PS4_L2
- - Clutch pedal: Slider1 -> PS4_RY (right controller stick, down) ; needs to be mapped in-game to R3
- - Left paddle: Button6 -> PS4_L1 (needs to be mapped in-game to L1)
- - Right paddle: Button5 -> PS4_R1 (needs to be mapped in-game to R1)
- - other buttons
The interesting part is the script : wheel max degress.gpc
The purpose of this is to multiply your input (the degrees of rotation) of the wheel to be able to use a lower than max (900 on the G920) configuration (I like to use my wheel at max 200, like an F1 wheel).
Setup : this script has to be loaded from the plugin MaxAimDI (Layout Options > Load GPC Script)
PS: hope to soon write an addition to this script to enable the H-shifter (from DIrectInput buttons to the L1 / R1 on the PS4 controller)
- Code: Select all
define STEERING_WHEEL = PS4_LX;
define MAX_ROTATION_200 = 20;
// value read using the Device Monitor from plugin MaxAimDI
define CONTROLLER_STICK_MAX = 100;
int STEERING_WHEEL_MULTIPLIER;
int steering_wheel;
int direction;
main {
wheel_max_rotation(MAX_ROTATION_200);
}
function wheel_max_rotation(maximum_value) {
STEERING_WHEEL_MULTIPLIER = CONTROLLER_STICK_MAX / maximum_value;
steering_wheel = get_val(STEERING_WHEEL);
if(steering_wheel) {
set_val(STEERING_WHEEL, max(steering_wheel * STEERING_WHEEL_MULTIPLIER, CONTROLLER_STICK_MAX));
}
}
function max(current_value, maximum_value) {
direction = abs(current_value) / current_value;
if(abs(current_value) > maximum_value) {
return maximum_value * direction;
} else {
return current_value;
}
}
- Attachments
-
- g920_on_ps4.gpc
- (9 Bytes) Downloaded 298 times
-
- wheel max degress.gpc
- (820 Bytes) Downloaded 148 times
-
belun - Private First Class
- Posts: 2
- Joined: Sat Oct 22, 2016 8:46 pm
Re: G920 on PS4
Nice script, thank you for sharing
Console tuner since my 1st controller.
Scripting, a game in the game.
Believe or dare, It's Titanic!
Scripting, a game in the game.
Believe or dare, It's Titanic!
-
Prototype - Major General
- Posts: 3251
- Joined: Sun Dec 16, 2012 1:43 pm
Re: G920 on PS4
welcome to our community!! Great script/profile/mini-tutotial. Thanks for sharing!!
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: G920 on PS4
its telling me line 3 has an error. ???
-
guidogoyabeans - Private
- Posts: 1
- Joined: Mon Mar 14, 2016 6:03 pm
Re: G920 on PS4
guidogoyabeans wrote:its telling me line 3 has an error. ???
copy paste again. or try removing empty lines. or paste here the code you have pasted in the app (copy from app here so i can look at it)
-
belun - Private First Class
- Posts: 2
- Joined: Sat Oct 22, 2016 8:46 pm
5 posts
• Page 1 of 1
Return to Gtuner Plugins Support
Who is online
Users browsing this forum: No registered users and 38 guests