This is still very much proof-of-concept, so don't expect a finished solution.
You will need AutoHotkey installed to use these scripts.
Technique
Read joystick input and convert it to mouse output. The game thinks you are playing with a mouse.
Challenges
In order to implement a third party absolute aim system that emulates a mouse, these are the challenges you need to overcome:
- Twist Range limits
If you are outputting as mouse, the script will need to know how many units of mouse movement that any given mech is capable of twisting. If the torso is at max twist, and the script tries to twist it more, then MWO will ignore this impossible movement, and your script will drift out of synch (ie the middle position on your stick will no longer centre your torso)
Also, different mechs can twist different amounts, so the script needs to be configurable. - Twist Speed limits
Mech torsos can only twist so fast. MWO will ignore any mouse input that would result in a mech twisting faster than it is capable of.
If you issue a mouse movement of a million units left in one "tick" of the engine, but your mech is only capable of twisting as much as 1000 mouse units in that time, MWO will twist 100 units and ignore the remaining 999,000 , so your mech does not even go to 100% twist left.
So if you are twisted full left (your stick is full left) and you release the stick, the stick will probably center itself quicker than the mech is capable of moving back to centered torso.
For this reason, you cannot just directly map joystick movement to mouse movement - you must work out how many mouse units of movement per second each mech can handle and limit all mouse moves to that rate.
Getting this wrong will also result in the script going out of synch. - All calculations of how much the mouse needs to move needs to result in an integer.
You cannot move 1.5 mouse units.
In AHK (The language this script is written in), joystick input values are floating point (0-100).
You must be careful not to try to move by a floating point value, else your script will again go out of synch.
Status
Calibration currently only works for the X axis, calibration for the Y axis would be harder.
You still need to use an image editor (eg MS Paint) to find out the Y coordinate for the "twist indicator":
There is currently no calibration routine to find the "Max Twist Rate" (in mouse units). You are on your own with this value for the moment. Trial and error will tell you the correct value - if the center point drifts out of synch, lower your MAX_TWIST_RATE value
Download:
http://evilc.com/fil...AbsoluteJoy.zip
Edited by evilC, 07 April 2016 - 10:21 AM.