DiRT Rally

DiRT Rally

View Stats:
Zoom377 Sep 27, 2015 @ 2:16pm
2
Mouse Steering solution
EDIT 24/6/17: The download link was removed. Steam does not tolerate Mega links, so I am hosting the file on Google Drive now.


Hey, I've been noticing the number of people asking for mouse steering, and so for a programming exercise I have created this small program.

Program features
1. Steering using mouse raw input (via a virtual joystick)
2. Border-less windowed mode
3. Mouse hiding
4. On-screen steering marker
5. Mouse buttons bindable in-game (via virtual joystick buttons)

It is made using Auto Hotkey and requires you to have vJoy installed.

The program uses a virtual joystick and feeds values to it.
When you move the mouse left and right the X value of the joystick will be changed.
If push back is set higher than 0, it will be pushed towards neutral over time.

Demo video by db_mew:
https://www.youtube.com/watch?v=cOkS19LQGQM&hd=1


Installation:
Diagram here: http://imgur.com/bQuR9Xj
1. Download and install vJoy[vjoystick.sourceforge.net]
2. Download my program[drive.google.com]

The program can be placed anywhere. It will save settings to Documents\Mouse Steering.


How to use:
The first time you run the program it will offer you settings. These will be explained below:

Sensitivity: Simply scales the input from your mouse. Too much and fine steering will be difficult. Too little and it will not be possible to reach full steering lock.

Push back: This is how strong the steering will push towards the neutral position. When set to 0 the value of steering will be maintained.

Non-linearity: This makes the steering much looser near the neutral position. Too much and it will feel very loose in the centre, too little and it will be difficult to separate fine and large movements.


When the program is running, you will notice a new icon in your tray. Right click and then click settings to open up the settings window.


Pressing CTRL + F11 shows a marker on the screen which moves in relation to the joystick position.
To work around the difficulty of displaying on top of a fullscreen DX application, I have added the ability to toggle border-less window, which allows the marker to be seen.

Left and right mouse buttons control buttons 7 and 8 on the joystick, for those who wish to use mouse buttons in game.

In V1.6.1 I've changed it so joystick values go from 0 to 32767 (as it should be) you may have to recalibrate or just reset to default. (default happens to be 32767)


Other information and hotkeys:
Its AutoHotkey, why not throw in a ton of utilities?
CTRL + F7: Change marker color
CTRL + F8: Toggle hide mouse
CTRL + F9: Toggle borderless window
CTRL + F10: Set joystick to neutral
CTRL + F11: Enable joystick marker (Doesn't currently work in fullscreen DX games, hence the existence of F8 and F9 hotkeys)
CTRL + F12: Exit

I'm not aware of a program that does this however I only did a brief Google search.

This program relies on:
vJoy by Shaul[vjoystick.sourceforge.net]
evilC's CvJoyInterface[github.com]
Gdip by tic[www.autohotkey.com]
AHKHID by TheGood[www.autohotkey.com]
Borderless window code by Klaus2[www.autohotkey.com]


Source code[pastebin.com]
Last edited by Zoom377; Jun 24, 2017 @ 7:13am
< >
Showing 31-45 of 77 comments
Alice Sep 15, 2017 @ 4:48pm 
Whoah! I've been looking for this for YEARS! Thank you very much Zoom337!
unsthuthn Sep 24, 2017 @ 3:19am 
special thanks for linking all the dependencies!
musatem Nov 10, 2017 @ 2:55am 
anlayamıyorum ...
Alice Nov 10, 2017 @ 11:26am 
I came up with a bit different solution, as I was looking for for the gradual throttle and brake control. I found a FreePIE program, which allows to use scripts to emulate axis, then feeds data into vJoy. At least that's how I understand it.
I did some copy–pasta shanenigans to stitch togather a working script for FreePIE (as a fair warning, it's not pretty. It's cluttered as hell) that allows gradual control over the throttle and brake (mouse buttons), as well as provides linear control over steering axis via mouse movement.
Anyway, to the point. If someone wants to try my solution:

1. download and install vJoy: http://vjoystick.sourceforge.net/site/
2. download and install FreePIE: http://andersmalmgren.github.io/FreePIE/
3. Get the script for the FreePIE I made: https://drive.google.com/file/d/1D_3HYw4RRzczpeOef4Grn3qq0oU5XDjD
4. Then, open up FreePIE, open or paste the script into it, and then run it.

Now you should be able to set axis in games. X-axis is the steering, Y-axis and Z-axis are the brake and throttle, controlled by left and right mouse buttons.

NOTE: ignore "How to use this script" section, as even I don't have any idea why it's there, it's the remnants of the original scripts I used. As well as "vJoy BUTTONS" section at the end.

The scripts I used to stitch my "frankenstein" script were originally made by Skagen (https://www.lfs.net/forum/post/1862759#post1862759), jds711, Randox and NORKETT7. Unfortunately I can't remember which parts I copy-pasted are whom.
Chando Dec 28, 2017 @ 3:02pm 
I gotta thank you, Zoom377, your program works perfectly! (no input lag, fully customizable...) I didn't expect to be this easy to use. You did an awesome job, congratulations.
Now I have a question: is the program designed specifically for DiRT Rally, or can it work on any game?
Once again, thank you!
Toino Dec 29, 2017 @ 4:24am 


Originally posted by Chando Chispas:
I gotta thank you, Zoom377, your program works perfectly! (no input lag, fully customizable...) I didn't expect to be this easy to use. You did an awesome job, congratulations.
Now I have a question: is the program designed specifically for DiRT Rally, or can it work on any game?
Once again, thank you!

I managed to make it work in dirt 4, and it should work in other games.
Klaatu May 25, 2018 @ 5:43am 
First, I want to thank Zoom377 for providing this software.

If your marker only moves when you hold the mouse 2 button, go to the program and set "Push Back" to zero. It worked for me.
Stiggy Jul 22, 2018 @ 4:39pm 
I once wrote a script that allowed to use the mouse wheel to control the throttle (like a
Z axis) But that was for GlovePIE. It would be nice if you could had a way to control the throttle/brakes with the mouse wheel in your program. :D
Bullet Aug 3, 2018 @ 4:18pm 
Thank you for your great work, your mod should be included in the base game.
Lalo Salamanca Sep 23, 2018 @ 9:12am 
How do I make it more precise? My problem is that steering wheel doesn't turn as fast as mouse, it kind of delays
Toino Sep 23, 2018 @ 3:27pm 
Originally posted by St.BlackOps2cel:
How do I make it more precise? My problem is that steering wheel doesn't turn as fast as mouse, it kind of delays
for me i have no problem i even managed to get to work with dirt4
Lalo Salamanca Sep 26, 2018 @ 1:31pm 
Originally posted by Toino:
Originally posted by St.BlackOps2cel:
How do I make it more precise? My problem is that steering wheel doesn't turn as fast as mouse, it kind of delays
for me i have no problem i even managed to get to work with dirt4
Could you show me your settings pls?
musatem Sep 26, 2018 @ 2:46pm 
Originally posted by St.BlackOps2cel:
Originally posted by Toino:
for me i have no problem i even managed to get to work with dirt4
Could you show me your settings pls?
your idiot pictures fake
Toino Sep 27, 2018 @ 1:30pm 
Originally posted by St.BlackOps2cel:
Originally posted by Toino:
for me i have no problem i even managed to get to work with dirt4
Could you show me your settings pls?

I think its something like this but i remember changing some settings in game http://prntscr.com/kzjret
JellAy Oct 18, 2018 @ 11:13am 
Hey an does this work in DiRT 3 Complete Edition? Becuase I can only bind either left or right to the X-axis :(
< >
Showing 31-45 of 77 comments
Per page: 1530 50