U J R - Universal Joystick Remapper - Any Stick With Mwo Via Virtual Joysticks
#101
Posted 30 June 2014 - 12:30 PM
I have a problem. Maybe its very easy for you all. But I am a Noob! So please excuse!
I have an G27 Pedal Set and use the Leo Bognar USB Adapter for use with out having to plug the Wheel in!
I try to configure the Axis in the UJR. But MWO has only 1 Axis for Turning. And I wanted to use the clutch for left and the gas for right. If I try it the Mechs turns only to one side all the way without stopping. If I use a pedal it stops. Inverting doesn´t help. It changhes only the direction.
So please do you know what I mean? And can you help me with this problem
Greets
#102
Posted 30 June 2014 - 02:31 PM
Select the left pedal axis on Axes1, then ON THE SAME ROW in tab Axes2 select the right pedal.
Set the "Axis Merging" column on tab2 to either "Merge" or "Greatest".
This should take the 2 physical pedals and merge them into one "rudder".
Be aware that it does not work that well, because you can press both pedals at the same time.
"Merge" averages the two out.
"Greatest" uses whichever pedal is pushed the most.
#103
Posted 01 July 2014 - 02:31 AM
#104
Posted 01 July 2014 - 07:10 AM
#105
Posted 30 October 2014 - 08:29 PM
I posted this question in Paul's joystick thread and I think your UJR might be able to help me with it.
Domenoth, on 30 October 2014 - 01:08 AM, said:
The behavior that I would like to prevent is having to hold the stick forward to maintain my speed (my j0_axis_y controls my analog throttle). I equate this to throttle decay on the keyboard (need to hold down 'w' or 's' or you eventually come to a complete stop).
What I would prefer is that if my stick is forward (doesn't need to take into account how far forward, could just be an on/off scheme), I accelerate up to max speed and stay there after I return the stick to neutral. If I need to decelerate, I would accomplish that by pulling the stick down until my throttle reached 0 and then I would start to back up if I continued to hold the stick back. While I'm backing up and I return the stick to neutral I would continue backwards at whatever throttle setting I reached before I returned the stick to neutral (could be anywhere from 1% to 100% depending on how long I pulled the stick back).
I want the j0_axis_x to function normally. Stick in neutral I'm not turning at all. Slightly left/right and I turn left/right slowly. Hard left/right and I turn left/right sharply.
Is this possible in the current UI or is there a third party program I could use to achieve this?
Any help even if it's to tell me I'm SOL is appreciated.
I saw on the autohotkey.com forum that you listed axis splitting as one of the features. Am I understanding that term correctly? is Axis splitting what I'm looking for?
Thanks in advance for any help.
Edited by Domenoth, 30 October 2014 - 08:29 PM.
#106
Posted 31 October 2014 - 01:58 AM
What you are looking for could be termed "Relative" throttle.
This would not be too hard to do via code - for each loop, increment or decrement the output axis by the input axis.
If you know any AHK, use the "vjoy template" from my ADHD project as a basis.
#107
Posted 31 October 2014 - 12:47 PM
evilC, on 31 October 2014 - 01:58 AM, said:
This would not be too hard to do via code - for each loop, increment or decrement the output axis by the input axis.
If you know any AHK, use the "vjoy template" from my ADHD project as a basis.
Okay, I don't have AHK experience so I might start doing some googling then. I think I saw you mention that your UJR is free to edit. Would trying to add it to your UJR be better for me (as in I'd get a bunch of background setup out of the way/for free)? Or should I go with something that only does the one thing I'm talking about?
Edited by Domenoth, 31 October 2014 - 12:48 PM.
#108
Posted 03 November 2014 - 03:46 AM
If you use the "vjoy template" that comes with ADHD, that contains the basics of an application - the GUI is already created, some basic functionality (Manipulation of the virtual axis based upon what the physical axis is doing), so you would just need to modify the behavior a little.
The template is here: https://github.com/e...oy_template.ahk
You would need to edit the main Loop (starting line 112) something like this:
; Loop runs endlessly... old_axis := 0 decay_rate := 10 deadzone_amount := 1 Loop, { ; Get the value of the axis the user has selected as input axis := conform_axis() ; convert axis from input range of 0 -> 100 to -50 -> +50 axis := axis - 50 if (abs(axis) > deadzone_amount){ ; Stick deflected, modify old axis value by new axis value axis := old_axis + axis } else { ; Stick at neutral - "Decay" axis. if (old_axis > 0){ ; we were going forwards, so decay down axis -= decay_rate } else if (old_axis < 0){ ; we were going backwards, so decay forwards axis += decay_rate } else { ; We were stopped, do nothing axis := 0 } } if (axis > 50){ axis := 50 } else if (axis < 50){ axis := -50 } ; Revert axis back to 0 -> 100 scale axis += 50 ; Assemble the string which sets which virtual axis will be manipulated vjaxis := axis_list_vjoy[2] ; input is in range 0->100, but vjoy operates in 0->32767, so convert to correct output format axis := axis * 327.67 ; Set the vjoy axis VJoy_SetAxis(axis, vjoy_id, HID_USAGE_%vjaxis%) old_axis := axis ; Sleep a bit to chew up less CPU time Sleep, 10 } return
Code is untested, so may or may not work as-is, but this should give you a rough idea of how it needs to be coded.
If it does work, you may need to tweak some of the settings (decay_rate and deadzone_amount) to make it behave nicely.
[Edit] I uploaded a compiled version of this script here:
http://evilc.com/files/tmp/decay.exe
Setting up to use the .ahk versions of the scripts can be a bit of a pain, so if this script works for you, it may be simplest to use the EXE.
Edited by evilC, 03 November 2014 - 03:56 AM.
#109
Posted 03 November 2014 - 11:10 AM
Gimme a few, and I will fix it.
#110
Posted 03 November 2014 - 12:10 PM
INSTRUCTIONS
Set Up
Part A: Configure Input Joystick.
- Change the Joystick ID selector to a new value.
- Waggle your stick. If the values change in the Debugging readout, you have found the correct stick ID.
- Make sure you have the desired axis selected too.
- IMPORTANT! Adjust the value in the Deadzone % box until the Adjusted axis value sits at 0.0 when the stick is at neutral.
The script will behave weirdly if you get this bit wrong!
- Go to the Bindings tab in the script.
- Bind a keyboard key to Bind Axis To Game.
- Tab into MWO.
- Go to the MWO options and hit the button to bind the throttle axis.
- While it is waiting for you to move the axis, hit the key you bound to Bind Axis To Game.
MWO should now bind the throttle to the virtual stick.
To alter the rate at which the physical stick moves the throttle, you can adjust the Change Factor box. This is a factor, so a value of 1 would change speed by the same amount as you moved the stick, 0.5 would change the speed by half as much as you moved the stick.
ie throttle is at 0 (neutral).
You instantly move the stick to full forwards...
Change Factor of 1: Speed is instantly set to 100%
Change Factor of 0.5: Speed is set to 50%, then next tick (10ms later), set to 100%.
Download:
http://evilc.com/fil...ve_throttle.zip
#111
Posted 27 November 2014 - 08:52 AM
http://ahkscript.org....php?f=5&t=5263
#112
Posted 06 February 2015 - 01:21 AM
I have been VERY hard at work lately working on the next generation of my macro system, which will merge together UJR, Fire Control and just about every other app I wrote into one plugin-based system.
Anyways, in order to be able to properly replace UJR, I need to break free from AHK's joystick system, as it only supports 6 axes, 1 POV hat and 32 buttons, which is not enough.
So I have had to resort to Windows API Dll Calls to write my own joystick input system for AHK using "HID".
HID is a system for USB that lets computers interpret devices without a driver - this is why you can plug in even a high-end stick without drivers and see something appear in the windows control panel preview.
Most USB devices that have buttons on them or axes / POV switches / dials are HID devices.
So this potentially opens the door to using ANY USB DEVICE with this software - SpaceNavigators, Steel Battalion controllers, Head trackers etc, even uninstalling your Saitek or Thrustmaster software (or even mouse software) and solely using this system could be a possibility.
Anyway, today is a big day. Today is the first day that I successfully "decoded" all the "joystick capabilities" (ie I am able to tell, through code, how many buttons / axes each stick has). It's an important first step on the road to getting this system working. So here you go - my new system decoding a full-capability vJoy stick.
Edited by evilC, 06 February 2015 - 01:23 AM.
#113
Posted 17 July 2015 - 04:55 AM
Please note that the Greatest merge mode has changed, so if you use that to let you control steering using pedals or something, you will need to change your settings.
Feel free to ask here if you need help.
Edited by evilC, 17 July 2015 - 04:57 AM.
#114
Posted 13 September 2015 - 03:07 PM
I just don't seem to be able to figure out the "merge axis" option.
I want the right pedal to go from 0-100% throttle forward and the left pedal from 0-100% throttle reverse. I set it up using the instructions using the "greatest" option to be able to quickly switch between going forward and backward.
In the UJR app, it looks good, the one pedal moves the slider from center to the left and the other pedal moves it from center to the right.
Testing in MWO however shows that 1 axis goes from 0 to +100 and the other from -50 to -100. So I can go either 50-100 forward or 50-100 backward, but nothing in between -50 and +50, not even standing still.
The "trim" option gives the best result: one pedal goes from 0 to +100 but the other only from 0 to -50....
Does anyone know if I'm missing something or that this is a bug/missing feature?
edit: Never mind, I figured it out, I made a mistake in my GlovePIE script, now it works like a charm!
Edited by Stijnovic, 14 September 2015 - 02:29 AM.
#115
Posted 29 November 2015 - 08:55 AM
There is currently no vJoy support, but it can already do something UJR can't - remap a joystick button to a keyboard key.
UCR is powered by Plugins, so with this system, pretty much anything is possible. Each function that UJR provided will be replaced with a UCR Plugin (eg an Axis to Axis plugin, Button to button plugin), and you can mix and match these to create a profile that suits your needs.
UCR runs as an EXE like UJR does, but the plugins are .ahk text files, so anyone can modify their behavior simply by using a text editor - just copy the text file, give it a new name, make your changes, and hey presto, you have a new plugin.
All UJR users are invited to get involved and help shape the future of UCR.
For more information, please visit the UCR thread
#116
Posted 01 January 2016 - 11:04 PM
#117
Posted 01 January 2016 - 11:41 PM
10 user(s) are reading this topic
0 members, 10 guests, 0 anonymous users