Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

Post gaming related scripts
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

09 Oct 2017, 10:48

UCR does not support two non-modifier key hotkeys.
To work around this, you could make a custom plugin with double the number of input bindings.
Winsane
Posts: 3
Joined: 03 Sep 2017, 19:43

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

10 Oct 2017, 08:52

evilC wrote:UCR does not support two non-modifier key hotkeys.
To work around this, you could make a custom plugin with double the number of input bindings.

I gave it a go, and to my surprise I was able to figure it out!

My solution isn't the prettiest, but it works for me.

Basically, I used the ButtonsToAxis core plugin as the base of the custom one, and changed this part:

Code: [Select all] [Download] GeSHi © Codebox Plus

	if (this.AxisButtonStates[1] == this.AxisButtonStates[2]){
out := this.MidPoint
} else {
if (this.AxisButtonStates[1]){
out := this.DeflectionValues[1]
} else {
out := this.DeflectionValues[2]
}
}


To this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



And then I put the two keys I want to use as a combination like so:

Image

Hacky fix, but seems to work just perfect. Thanks for pointing me in the right direction!
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

10 Oct 2017, 08:55

Glad you figured it out!

FYI, if (this.AxisButtonStates[1] = false){ could also be written as if (!this.AxisButtonStates[1]){
phasermaniac
Posts: 55
Joined: 09 Apr 2017, 14:05

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

10 Oct 2017, 12:10

Hi,
I did a little testing of Mouse Axis to Joystick Axis with vJoy and works nice with two mice.
I have an Arcade Cab with 2 lightguns, as you probably already know, and this might be pretty interesting for me as my guns are pretty old crt ones, and only can use a driver that see them as mice not as joys like most modern IR ones (like Aimtraks)

Remaps mouse to joystick using Delta mouse information (Does not care about cursor position or if cursor hits edge of screen)

so the question is, can it take care about position? to make the joysticks axes coincide with my aiming?
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

10 Oct 2017, 12:35

UCR is designed only for "Relative" (CHANGE in position is reported) whereas AFAIK most light guns report as "Absolute" (Actual position).

It's kind of like the difference between how a mouse and a touch-screen would report.

UCR currently only supports relative mode for mice.

I am currently re-writing UCR with a guy who is a cabinet owner (And I may well put one together when I get my new flat, I have had an X-Arcade stick gathering dust for years), and we intend to have better support for mice in the new version.
How much are these light guns? I don't own any absolute mouse devices, so should probably add them to my (insane) collection of sticks :P

I would also search around in this forum, as someone else has already gotten this working I think.
IIRC correctly, the solution he found was Interception.
The new version of UCR currently uses Interception for the keyboard / mouse support.
phasermaniac
Posts: 55
Joined: 09 Apr 2017, 14:05

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

10 Oct 2017, 12:45

I use crt ps2 guns with Ems topgun driver, so mine about 4$, but people use Aimtraks (IR) with flat screens and I think they costs about 50$ each one.
I used interception to delay the trigger to be pressed after a screen flash crt guns needs to correcltly locate the shot, because they arent read over dark screen zones.
But do you think with interception I can do a mouse to joystick mapping? may I need vjoy?
wgf4242
Posts: 2
Joined: 25 Apr 2015, 09:05

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

11 Oct 2017, 09:37

i tried to remap joy1.btn1 to joy2.btn1, but not work in game.


20171011223522.png
(18.87 KiB) Not downloaded yet

Image
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

11 Oct 2017, 10:08

And it works when not in game?
The lights in UCR do NOT mean that it is working, merely that UCR is trying to send output to vJoy.
Use the vJoy Monitor application that comes with vJoy to test if it is actually working
Fusselkroete

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

13 Oct 2017, 19:39

Hey,

can you please add an gamepad autodetect mode? Becuase sometimes i need to eject usb devices. After replugin or restarts of windows 7, the gamepad need to be reconfigured in your tool.
Btw if someone already asked that quest im sorry because i didnt red the whole thread.
Maniac of Doom

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

15 Oct 2017, 16:13

when i close and reopen UCR it deletes all of my profiles, even when i press "save settings" what is causing this and how do i prevent it?
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

16 Oct 2017, 07:35

@wgf4242
Joystick ID 1 is typically vJoy stick 1. In that screenshot, I am guessing UCR is configured to remap vJoy #1 -> vJoy #2, which will probably do nothing.
Use PJP JoyIDs to find out the IDs of your sticks.

@Fusselkroete
This functionality will not make it into the current iteration of UCR.
It should be possible in the new version that we are writing.

@Maniac of Doom
When you click save, it is meant to save changes to UCR.ini in your UCR folder.
Maybe the file is set to read-only or something and it cannot update it?
Try opening UCR.ini in Notepad++, then in UCR, make a change (eg move the window) and click "Save Settings", then tab back to Notepad++
Does the file get updated?
edsdlr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 11:07

Hi,

Need some help, been tinkering for several hours now and cannot merge my clutch and accelerator pedals on my logitech g29 to use as a rudder axis in FSX.
I managed to do this successfully yesterday with UJR, but then unplugged everything from my laptop. Plugged everything back in this morning and it would not work. No matter which stick and axis ID I chose, the pedal presses are not recognised. I have now downloaded and tried again with UCR with the same results. I cannot figure out why it worked fine yesterday but now the pedals do not seem to be recognised?

Any help would be greatly appreciated. Thanks
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 11:33

Do the pedals show up in joy.cpl?
With my PC, often when windows reboots it "upgrades" to a bad driver, breaking my G27
edsdlr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 12:11

Yes, I have them plugged in through the wheel (no bodnar adapter) and it is recognised in joy.cpl
edsdlr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 13:21

I have indeed, its says the g29 is Id#1, my saitek yoke id#2, and vJoy device Id#3. So in the UCR axismerger tab I set both input axis 1 and 2 to stick 1 and the output virtual axis to stick 3. None of the sliders are moving though?
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 15:19

Can you read the pedal axis with an AHK script?

eg

Code: [Select all] [Download] GeSHi © Codebox Plus

Loop {
Tooltip % "Axis Value: " GetKeyState("1JoyZ")
Sleep 50
}


(You may need to tweak "1JoyZ" to a different axis, depending on what axis the pedal registers as)
edsdlr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 15:45

I'm not sure how to do that unfortunately. I assume I do that in the code runner tab? In that case do I press either the gas or the clutch where it says select an input button? Or am I totally missing the point?
User avatar
evilC
Posts: 3461
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 16:10

No I meant just a regular AHK script.
UCR is written in AHK, so I want to see if AHK can see the stick moving...
edsdlr

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

18 Oct 2017, 16:12

Ok, here is what I have done now, I copied your code into a text file and saved it as a .ahk in UTF-8 and ran it, it returned a bunch of text that ended like this:

003: ToolTip,"Axis Value: " GetKeyState("1JoyZ") (0.03)
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyZ")
004: Sleep,50 (1.75)

Using "1JoyX" :

003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyX")
004: Sleep,50 (1.28)

Using "1JoyY" :

003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (0.05)
005: }
003: ToolTip,"Axis Value: " GetKeyState("1JoyY")
004: Sleep,50 (1.19)

Sorry but programming is not my thing, I'm not really sure what I am supposed to be looking out for. thanks for the help thus far!

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 6 guests