Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

UJR - Universal Joystick Remapper (Using vJoy)


  • Please log in to reply
130 replies to this topic
StickmDown
  • Members
  • 1 posts
  • Last active: Dec 13 2013 10:48 PM
  • Joined: 13 Dec 2013

Hello. I've got problem with USR.

I made 2 target devices in VJoy.

I want to use two Thrustmaster T.16000M yousticks.

 

target device 1 (for my left handed youstick) optioned:

no x, no y, no z, no rudder, no U/slider

opted V/Dial/Slider 2

Opted POV cont.

nr of switches:1

nr of buttons: 16

opted Rx and Ry

 

In URS: autoconf stick 1: it did some stuff.

test turning joy: nothing

assigned the Rx and Ry to the X and Y (nr 1 and 2) axes ....nothing. tried all numbered axes.

Buttons: also no respons.

The joystick is simply not detcted.

 

target device 2 (right hand).

all buttons work

assigned X, Y and Z(twist axe) work.

slider u works

 

So I want to know why I can make two target devices in VJoy, and only one of them gets recognized in USR :)

Can I send files so you can check this out?

 

The first joy I did was my right hand (nr2) joy in USR in both the second tabs for buttons and axes, And then did the first tabs for the other joystick. But this shouldn't matter right? The order in which I fill in the tabs? Also there is a switch on the bottom om my joy for going from left-handed to right-handed mode. Had it on left, Closed USR,,then switched to 'right' and started USR again. Still nothing. I know it's fridayevening but one can only hope, lol..



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Newsflash:

 

We've pretty much hit the target on the signed driver fund, we should have a signed driver for vJoy early in the new year, if not sooner.

 

Thankyou to all those who donated.



DAOWAce
  • Members
  • 13 posts
  • Last active:
  • Joined: 31 Jan 2010

Edit: Solved it. See next post: http://www.autohotke...e-4#entry630138

 

So.. can this be used to add turbo functionality to a gamepad via AHK?
 
http://www.autohotke...-using-gamepad/
 
Trying to figure out how to do something so simple for the last 7 hours; this is my last resort before I just give up entirely.

Managed to get it to detect and work for the button with this script:

#include %A_ScriptDir%\VJoy_lib.ahk

    VJoy_Init()
    nButtons := VJoy_GetVJDButtonNumber(iInterface)

~*3Joy3::
loop
{
   If !GetKeyState("3Joy3","p")
{
      break
}
else
   {
    VJoy_SetBtn(1, 1, 3)
    Sleep, 100
    VJoy_SetBtn(0, 1, 3)
      sleep, 500
      }
}
Return

Unfortunately, I can't run it and UJR at the same time, as having UJR open first causes the script to not load claiming another 'feeder' is active, and loading the script before UJR complains about the device not being ready. I tried to edit the AHK files for UJR but nothing I've done has produced any results short of working once per press.

I've not got a damn clue how to completely map things 1:1 on my own.

Really hope I can get some help with this.


Edited by DAOWAce, 18 January 2014 - 06:36 AM.

I don't mean to sound rude, but I can't help the way people interpret my words.

HAV
  • Members
  • 5 posts
  • Last active:
  • Joined: 16 Jan 2014

Hi,

I've got some problems running UJR and seriously need some help :/

No matter what I'm doing the results are always the same - all axes and buttons in UJR are grayed out.

I'm running Windows 7 x64, newest versions od AutkoHotkey 1.1.14.01, vJoy 2.0.2 (vJoy_x86x64_I030114.exe) and UJR v6.3 (1.1.12.0).

AHK and vJoy are installed automatically as x64 into C:\Program Files.

I've made some screens so maybe this will help where is the problem.

I'm trying to merge 2 physical sticks into 1 virtual.

Both my stick (Hotas X) and gamepad (Logitech Chillstream) are up and running:

http://imageshack.co...1/1374/54uq.jpg

 

I've installed AutoHotkey and vJoy

http://imageshack.co...54/772/h2fz.jpg

 

Under Advanced Tab vJoy in set as preferred device for older programs (sorry - I have a Polish Windows and do not know the exact translation in English)

http://imageshack.co...7/4060/09yx.jpg

 

and by default it's like that (before configuration of vJoy)

http://imageshack.co...4/5343/ae7y.jpg

 

after configuration of vJoy

http://imageshack.co...4/8633/frcu.jpg

 

it's like that (please note that mini cross corresponding to X/Y position is in the center of the white box area)

http://imageshack.co...0/2296/x295.jpg

 

first run of UJR (after 0,5-1 sec. all axes and buttons are grayed out)

http://imageshack.co...g28/41/66ks.jpg

 

http://imageshack.co...1/9745/ydoy.jpg

 

I can only quickbind a key (and create/edit etc. profiles - that works)

http://imageshack.co...2/2097/dmhd.jpg

 

trying different vJoy Stick ID (maybe some will work)

http://imageshack.co...2/2097/dmhd.jpg

 

and always get this error (as expected)

http://imageshack.co...3/3519/0ajz.jpg

 

go back to Stick ID 1

http://imageshack.co...9/9366/2vdo.jpg

 

and get this error

http://imageshack.co...g5/555/dxrz.jpg

 

and this

http://imageshack.co...1/1973/mfxn.jpg

 

after changing few times Stick ID, #1 is again "Connected"

http://imageshack.co...6/9752/otnj.jpg

 

And now the funny part - it seems that UJR crashes settings of vJoy :/ - how is that even possible?

(please note that mini cross corresponding to X/Y position is now in top left corner of the white box area)

(calibration or resetting doesn't work)

http://imageshack.co...0/4102/zvuq.jpg

 

here is vJoyMonitor screen corresponding to above screen

http://imageshack.co...6/2270/6vka.jpg

 

 

When trying to QuickBind some buttons

http://imageshack.co...7/9264/3pbq.jpg

 

I got those 2 errors (1 by 1 - repeated 2 times)

http://imageshack.co...2/8980/qtpz.jpg

 

http://imageshack.co...7/5724/5ymu.jpg

 

 

Also when trying to QuickBind some axes (no matter which stick/gamepad is pressed) always only first slider (in State column) moves (and is still grayed out).

 

Earlier I've tried with older versions of vJoy (vJoy_x86x64_I011112.exe) and UJR v4.3 - the axes were visible and could be set up properly, but all buttons in UJR Tabs were missing... so I've tried with newest one - as you see without any success :/

I don't have any idea what's wrong with this, so any help will be much appreciated.

 

p.s. forgive my poor English



DAOWAce
  • Members
  • 13 posts
  • Last active:
  • Joined: 31 Jan 2010

Stuck this in the UJR.ahk file:

~2Joy3::
    {
    loop
    If !GetKeyState("2Joy3","p")
    {
        break
    }
    else
        {
        VJoy_SetBtn(1, 1, 3)
        sleep, 20
        VJoy_SetBtn(0, 1, 3)
        sleep, 20
        }
    return
    }

Got the repeat to work.

 

Unfortunately, it suspends every other function so long as it's repeating.  No inputs are recognized and any inputs currently active remain active (ie; you stay walking until you let go of the button being repeated)

 

So, made some progress.. but hit another barrier.

 

Edit: Well, 3 days of messing with this issue and I've finally solved it.

 

I put this modified code (taken from the thread I linked) under Functions:

 

$Joy3::
loop
{     
    GetKeyState, Joy3State, Joy3, P
    
    if (Joy3State = "U")
    {
        break
    }
    else
    {
        VJoy_SetBtn(1, 1, 3)
        sleep, 10
        VJoy_SetBtn(0, 1, 3)
        sleep, 30
    }
}

 

Seems to be because it doesn't have a return function, as that's the only real difference between the two codes.  I tried to remove it in my code, but it just seemed to break it entirely.

 

So, a novice finally solves his problem. *sigh*

 

Hopefully some sort of turbo functionality can be included in the next version of UJR; mayhap merge the RapidFire tool into UJR and give it vJoy support?

 

All I can say is I'm glad I finally solved this.  Now I can actually play certain games for more than an hour before suffering from RSI pain.


I don't mean to sound rude, but I can't help the way people interpret my words.

evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

Apologies guys for being non-responsive here, I do not get any email notifications and cannot seem to turn them on. I log in with Facebook, so maybe I need to convert to a local acct or something.

 

Reading through your posts now, gimme a bit...



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

@HAW

Does the vJoy demo feeder work?

 

Do you maybe also have any similar apps installed? For example, I have seen conflicts with things like X360ce...

 

Also, use "Continuous" for POVs, not "4 Directions".

 

The GUI is not greyed out as a whole, each row (axis etc) is greyed out if UJR does not detect that it exists.

I am left wondering if this is maybe a language related issue.

I could see if the detection routine were asking windows for "axis_x", but in your language, it is called "os_x", then there would be a problem.

 

Would it maybe be possible to switch your OS to english and see if the problem still happens?

 

Failing that, I could probably write some code to try and diagnose what is happening, but this would be easier on me if you used ahk files (rather than the EXE version). Do you have AHK installed? Are you comfortable working with code?

 

Please feel free to email me on [email protected]



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

@DAOWAce

It is possible to run other scripts alongside UJR, but only one script at a time can control each vJoy stick.

Therefore, either set UJR to vJoy stick 2 (You would need to use the vJoy config app to add a 2nd virtual stick) or set your script to use vJoy stick 2.

 

In general, UJR is not designed for rapid fire, it is more about altering how the stick behaves and merging functions from multiple sticks into one stick.

 

So you solved your problem it seems?

You are adding that code into UJR? Interesting... I had not thought of doing that. This neatly side-steps the issue that two scripts cannot control the same vJoy stick at the same time.

 

I wonder if it is maybe worth adding a feature into UJR that lets the user specify an AHK file to import. That way, you could use an unmodified version of UJR and just put code such as yours in a separate file.

Obviously it would require running as AHK, like you must be doing at the moment, but it could be a neat little feature.



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

It seems you cannot get email notification of replies to subscribed topics on this site.

 

I have, however, now enabled email notification for private messages, so if you have a problem, feel free to send me a PM.

 

Please keep the questions in the thread itself, that way it can help others who may have the same problem. Just send me a poke to make me aware if you have an urgent issue.



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

DAOWAce - I have started a thread asking about the possibility of allowing custom user scripts such as yours to be used with the compiled (EXE) version of UJR.

If I get a negative answer on that, I will probably add a feature to let you do what you want to do in an easier manner (But you would need to be using the uncompiled version of UJR to use the feature).

FYI, you can place your code in a separate file.
If you had your custom code in "custom.ahk", if you put that file in the same folder as ujr.ahk, you can add the following line to ujr.ahk:

#Include custom.ahk

Place that line at the exact point where you have the custom code currently.

So all I really need to do is add a text box to UJR where you can type the name of a file to include. UJR may need to restart or something to reload the file, but I think that would be acceptable to the user, especially if it meant that you could include a different custom file for each profile.

Opinions? Thoughts?



HAV
  • Members
  • 5 posts
  • Last active:
  • Joined: 16 Jan 2014


@HAW

Does the vJoy demo feeder work?

 

Do you maybe also have any similar apps installed? For example, I have seen conflicts with things like X360ce...

 

Also, use "Continuous" for POVs, not "4 Directions".

 

The GUI is not greyed out as a whole, each row (axis etc) is greyed out if UJR does not detect that it exists.

I am left wondering if this is maybe a language related issue.

I could see if the detection routine were asking windows for "axis_x", but in your language, it is called "os_x", then there would be a problem.

 

Would it maybe be possible to switch your OS to english and see if the problem still happens?

 

Failing that, I could probably write some code to try and diagnose what is happening, but this would be easier on me if you used ahk files (rather than the EXE version). Do you have AHK installed? Are you comfortable working with code?

 

Please feel free to email me on [email protected]

Thanks for help :)

I don't know what was causing the problems, but finally I managed it to run.

I found similar thread at vJoy forum with exactly the same problem as mine, the solution mentioned there helped me as well - http://vjoystick.sou...ve-buttons-axis

For some reason Target Device #1 in Vjoy Config doesn't work, but #15 was ok, all is working great now B)

Vjoy demo feeder for #15 work, for #1 all was greyed out.

 

I'd like to ask you one more thing...

I saw your post with this image

leoJoy-Arduino-1.01.png

 

Is it possible to create more Hats with UJR (picture above is made with arduino, right?)?

For now, I could bind Hat 1 to eg my Hotas X, and the second (from gamepad) could be bind as buttons so it looks like that

http://imageshack.co...26/808/teni.jpg

http://imageshack.co...6/8558/i3t4.jpg

 

Also what's the difference between "Continuous" nad "4 Directions" for POVs?



DAOWAce
  • Members
  • 13 posts
  • Last active:
  • Joined: 31 Jan 2010

In general, UJR is not designed for rapid fire, it is more about altering how the stick behaves and merging functions from multiple sticks into one stick.

 

I use UJR solely to 1:1 map my gamepad to the virtual one which AHK can control.  If I knew how to actually map things manually then I'd not need the program, but I am too stupid to understand how to do so.

 

If you had your custom code in "custom.ahk", if you put that file in the same folder as ujr.ahk, you can add the following line to ujr.ahk:

#Include custom.ahk

Place that line at the exact point where you have the custom code currently.

So all I really need to do is add a text box to UJR where you can type the name of a file to include. UJR may need to restart or something to reload the file, but I think that would be acceptable to the user, especially if it meant that you could include a different custom file for each profile.

Opinions? Thoughts?

 

Well, that works just fine too.

 

Even though I slogged through it and eventually got it working, I'd love to see this as an option for other people who don't know about messing with scripts like I did; it'd make things worlds easier for people trying to add even just a simple turbo functionality to their mapped joystick.

 

I mean, AHK not being able to send non-KB/M inputs is pretty ludicrous by itself.  How many years has this program existed and been developed?  Having to go through all this in the first place simply to add turbo functionality to a gamepad without it natively was ridiculous.

 

There's an issue where it hiccups from time to time, but I don't know if that's due to vJoy/UJR mapping itself or my repeat script actually causing the entire UJR code to repeat or something to the point where it chokes for half a second.  Again, not educated in these things, can only make guesses.


I don't mean to sound rude, but I can't help the way people interpret my words.

evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

@HAV

AFAIK a "Continuous" hat supports 8 directions, a "4 Directions" only supports 4.

IIRC, one of the bits of software used to make UJR work (I think it is AHK) only supports Continuous.

 

AHK only supports reading of 1 hat per stick. This is the reason for the limitation in UJR and I cannot get around it.

I have asked on the AHK forums about this, but no joy.

 

Regarding the ID#15 issue, try downloading this software:

http://www.wingmante...JoyIDs_Utility:

 

Look at the ID that vJoy stick 1 has, is it ID 1?



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005

@ DAOWAce:

 

I find AHK to be pretty damned reliable on stuff like this.

I have other projects that do rapid fire type stuff (Keyb / Mouse only for the moment I am afraid) and they are very reliable with no noticeable hiccups.

 

I agree with you about the madness of AHK not supporting outputting of joysticks natively, that is why I made this post. Unfortunately, no-one seemed to care :(

 

If all you want is a rapid fire, and not to touch the rest of the joypad, could you not bind most of the game controls to the physical pad, but the fire button to the virtual stick? Hell you could even bind the fire button to the "1" key, and have the macro hit the 1 key - removing all need for virtual sticks in the first place.

 

So assuming your physical pad is joystick ID 2 (You can find it's ID using the app I linked in the previous post), and you bound fire to the 1 key in the game, you could use this code to bind button 3 to rapid fire:

 

SetKeyDelay, 0, 50
 
~*2Joy3::
loop
{     
    GetKeyState, Joy3State, 2Joy3, P
    
    if (Joy3State = "U")
    {
        break
    }
    else
    {
        Send {1}
        sleep, 30
    }
}


HAV
  • Members
  • 5 posts
  • Last active:
  • Joined: 16 Jan 2014

Thanks for info about Hats. 32 buttons in vJoy is much more than I need even when merge my Hotas and gamepad, so binding 2nd hat to buttons isn't a problem B)

Regarding the ID#15 issue, try downloading this software:

http://www.wingmante...JoyIDs_Utility:

 

Look at the ID that vJoy stick 1 has, is it ID 1?

You're correct - vJoy stick in JoyID is #1, but don't know why I must set it as #15 in vJoy config.

#2 is Hotas, and #3 is gamepad, and those are the same as in UJR