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

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

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

02 May 2017, 14:29

Yeah, sorry, my web host screwed up my website, so I had to move to a new host.
Seeing as the URL is identical, you are possibly still seeing the old web server.

Regarding the problem being with UCR loading while there are a bunch of plugins already present - I suppose I could modify the sample script so that it adds a bunch of plugins before it shows the GUI for the first time.
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

02 May 2017, 14:42

Here is a version of the script which adds 20 plugins before showing the GUI - let's see if this reproduces the issue.

Rather than mess around with compiled EXEs and stuff, here is what to do:

1) Take UCR.exe from your UCR folder, make a copy and rename it PluginTest.exe
2) Take the script below and save it in the same folder as PluginTest.ahk
3) Double-click PluginTest.exe to run the script using AHK_H

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

Helgef
Posts: 2404
Joined: 17 Jul 2016, 01:02
Contact:

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

02 May 2017, 14:51

I have no problem with this script.
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

02 May 2017, 14:54

Fancy tweaking around with it a bit and seeing if you can get it to exhibit the issue?
Maybe try moving the Gui, Show to before the plugins are added or something?
cuyo001
Posts: 7
Joined: 12 Dec 2016, 20:25

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

02 May 2017, 20:29

I played with the GUI changing it all sizes, moving the window, maximizing/minimizing, moving plugins up/down, deleting all plugins, creating new plugins, and this is what I found:

streching the window like the image hides the scrollbar but i was able to see all plugins using the mouse wheel.
Image




but streching the window like this I was unable to view the last 4 plugins, also note that the scrollbar dissapeared.
Image




I was making the window bigger but still the lasts plugins dont show up.
Image




to this size I was able to view the last plugin (I was using 20), also noted that the scrollbar was hiden beyond the window limit.
Image




the number of plugins seems not to affect this nor the creation or deletion, if the window is smaller than it was on launching the last plugins dont show up
Guest

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

04 May 2017, 02:46

Hello,

this program is my real salvage!!! I have searched the last months to find something that could do things, UCR is able to do.

I'm building a homecockpit and have searched for a replacement method to program pots in the way the old Thrustmaster FLCS/TQS or the Cougar were able to do. Move Radar Antenna Dial forward, produce something like a, b, c, d.... and back ....d, c, b, a or simple the same keystroke like +, +, +, +..... for moving the pod in one direction and -, -, -, -.... in the other direction.

Your program is able to do the first thing and I was able to edit the number of ranges to 20, which fits a bit better for flightsimulation :D , but the second example I have shown above isn't possible at the moment.

You could do bindings to two buttons to an axis, but it would be really nice to make something like: axis to one direction produces a selectable number of "a" ( "a" only as a placeholder here same with "b" ) and axis in back the opposite direction produces the same number of "b" as selected for the "a" . It should be something comparable to the ranges used in your "Axis range to Buttons" but only as a repeat of one keypress or a macro in one direction and another keypress or macro in the opposite direction, with the ability to choose the number of characters produced.

This way you are able to make something like a lever connected to a pot which puts for example "flaps down" to different stages with the use of "a a a a ...." and flaps up with the use of "b b b b ..... . Not all simulators have the possibility to bind analog axis to all of there options. That's why your program is so much help for sim pit builders!

Another feature could be an option to simulate mouse input with selectable axis of devices. This way you could use a thumb stick on a HOTAS to control the mouse cursor. This makes it possible to make something like the microstick at the HOTAS Cougar.

Hope you could help a little bit! I know that it's possible to make the needed options by yourself with the use of AHK, but I'm a totally "noob" in coding and I'm not the only one :D . Your program is really so much help if you are building a homepit! Have searched a long time to find something which is able to do things UCR can do, but for windows nothing exists. For the MAC there is a program called "controler mate", but for windows there are only progs like Xpadder or Pinnacle Game Profiler, which focus more on gamepads.
Viper1970-actually

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

04 May 2017, 09:58

Hello once again, as guest (like to activate my account, but something is still wrong with getting the email. Already contacted the admin) ;)

In my last post I think it's not really clear what I meant with the function repeating the same character for an axis.

It should essentially work the same way like an encoder does, with the exception that the function uses a potentiometer. This pot should function like a throttle or a slider, not a centering axis. If you rotate it clockwise it should generate (repeat the same) one character or macro (eg. a or Shift A) till you reach the stop and and if you rotate it counter clockwise it should create another character or macro (eg. b or Shift B). The different macros should only change if you change the direction of the rotation. Thrustmaster had this option to program it to its antenna dials at the old TQS or the more modern Cougar. Don't know if you familiar with the Thrustmaster HOTAS?

I know that you could use an encoder for doing this, but the problem is, if you built an DIY-HOTAS and you use an encoder for the dials instead of a potentiometer, you could only use this single character repeat. If you want to use a funtion like your "Axis Range To Buttons" you couldn't emulate this with an encoder, cause of the different Characters it uses.

Another feature I stated above could be a joystick to mouse emulation for using a microstick in the HOTAS. I've seen such a script for AutoHotKey and have tried to implement it to UCR, but as said before I'm a noob in coding :D . The result know is, aside from that you aren't able to choose the device and its axis with an option in the GUI, that every time I start UCR the Joystick to Mouse emulation already starts in the background. I wanted to make it as a plugin you can seperatly choose, but it doesn't matter if you activate the plugin or not, it simply starts with the start of UCR :crazy: .

Apologize me, I don't want to shove you in any way, but there are so many good methods out there to built own DIY Flight Controller, as the MMJoy2 concept for example, but those projects allways lacks on a good software which is able to configure your selfbuilt device. Most simulations today (eg. Falcon BMS 4.33.3) let you freely configure plain DirectX axis for the most of the functions they offer, but if you want to play more older sims, too (eg. EECH Allmods) you sometimes don't have an ingame setting or it lacks many features. That's where your EXCELLENT PIECE OF SOFTWARE could do the trick.

Regards Sven (Viper1970)
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

05 May 2017, 14:16

I hear ya. I have a Leo board myself...

What you want sounds fairly simple to do in UCR, but I am not sure it would work as you intend.
I knocked up a quick proof-of-concept for you by taking the AxisToButtons plugin and rewriting the main function that controls how it works. I did not alter the Init() function that builds the GUI

Save this file to plugins\user

If you look at the code, it is actually a lot simpler than the normal AxisToButtons plugin ;)

Code: [Select all] [Expand] [Download] (AxisToButtonsEncoder.ahk)GeSHi © Codebox Plus



The thing is... because of the way the UCR works (Polls stick every 10ms), then if you move the axis quickly, it generates less characters than if you move it slowly.
Last edited by evilC on 05 May 2017, 14:24, edited 3 times in total.
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

05 May 2017, 14:19

Thinking about it a little more - if you NEED there to always be a consistent number of button presses, no matter how fast you move the axis, then we could maybe say "The complete range is 100 button presses". Then, if you, for example, managed to move the axis the entire length within 1 tick, it would send 100 button presses.

This isn't trivial, but it is do-able, but we would probably need to set off a timer thread to send the button presses without tying up the main processing function.
TheFatal
Posts: 32
Joined: 30 Jan 2016, 06:58

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

06 May 2017, 10:26

hey evilC

i have 1 more question: can i run scripts with "while" loops instead of "if" ?

repeat sequences while i hold a button

can i use somehow "while" loop in this plugin ?


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

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

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

06 May 2017, 12:20

No, you don't want to use while loops as this will tie up the main function of the plugin.
Instead, use timers, like so:

Just work out how long all your input takes (Sending a key event takes ~50ms, Axes are basically instant) and adjust the tick rate of the timer accordingly.
eg if it takes 100ms to do each send, you probably want a timer rate of 200 or something.

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

Helgef
Posts: 2404
Joined: 17 Jul 2016, 01:02
Contact:

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

06 May 2017, 12:28

Also note that you are either using an outdated version of ucr or that plugin will not work.
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

12 May 2017, 14:10

Billysims has been asking me about a joystick to mouse plugin - I am kinda busy at the moment, but I thought I would at least post up a basic example of how it would be done - I just took the axismerger plugin and altered it a bit.
There's no OutputDelta class in UCR, so I just hard-wired it with a DLLcall, but no biggie as there is nothing to "select" as an output anyway.

[Edit #1] Updated so now the mouse moves while the stick is outside the deadzone, set deadzone to default to 15 (Else hilarity can ensue as your mouse goes AWOL)

Code: [Select all] [Expand] [Download] (AxesToMouse.ahk)GeSHi © Codebox Plus

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

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

13 May 2017, 09:22

This is an experimental plugin to map 2 input buttons to 3 output buttons
The two inputs map to two outputs as normal, but if both are held, then the 3rd output is held.
When you release one of the buttons after holding both, the 3rd output is released, and the output button that is left pressed is re-held

eg
hold input 1, output 1 held
hold input 2, output 1 released, output 3 held
release input 1, output 3 released, output 2 held (Because input 2 is now the only input held)

Code: [Select all] [Expand] [Download] (ButtonsToButtons.ahk)GeSHi © Codebox Plus

-Viper1970

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

17 May 2017, 06:29

Hello EvilC,

many thanks for your reply and the script you made!!!! Hadn't much time the last weeks for my hobby. I will test your script as soon as possible.
Have to resolder some things that aren't working the way I have planned them :lol:

Sadly I'm still not able to login the forum. I have contacted the admin twice but no reply. I'm registered but still can't login, cause I have to confirm my account. No way to do it, never get a confirmation-mail.

Regards Viper
Slayie

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

23 May 2017, 20:57

Hi evilC, I absolutely love the work you did with this, I've been searching for something like this for a long time. The only problem I have is the fact that (as you said in the description) now I'm actually trying to completely re-map my joystick (with vJoy) and when I try to get into whatever game if I press a button it works on "both" joysticks. You said the only way to actually use it properly now is to somehow make the game ignore the physical controller, the problem is I have no idea how I would actually do that... Does anyone have any suggestion about this?
Also, I've seen you talk about the GameBind plugin but I didn't really get what it's used for and if it could help me in this case.
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

24 May 2017, 04:21

GameBind is one solution for this issue.
What it does is to delay all your mappings by a second or two.

So to bind the game to a vJoy button
1) Go into the game bind menu
2) Press the joystick button you wish to bind
3) QUICKLY click Bind in the game and do not touch your physical stick
4) After a second or two, UCR will press the vJoy button, and seeing as you are not touching the physical stick at this point, the game only sees the vJoy button get pressed.
5) Once you are ready to play, disable GameBind

Another alternative that often works is to start the game with the physical stick not plugged in.
Many games only enumerate sticks when they start up, so if the stick was not plugged in when the game starts (vJoy is always plugged in) then the game should utterly ignore it.

At some point in the next 6 months or so, we should have a solution that lets us properly hide the physical stick. Until then, we need to use one of these two methods.
Slayie

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

24 May 2017, 07:44

Thank you very much for the quick response, and all the nice work you're doing. I'll try it out hoping for the best!
julioronaldi175
Posts: 1
Joined: 29 May 2017, 07:42

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

29 May 2017, 07:53

Hi someone thanks for this tool.. I want help now.. As i want to try it in a racing simulator.. The ButtonToAxis plugin is needed. What i wanted is like this:

When the throttle (keyboard button) pressed, the x axis output will increase slightly by a specified number, like 5. But i found a problem, that the input to lower the x axis is not working. I use F1 to LOW and F2 to HIGH. When i press F2 repeatedly, it will move as increment..but F1 doesn't work. HELP!!! How can i race with full throttle all the times?? xD
User avatar
evilC
Posts: 3567
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.14 12th Mar 2017

29 May 2017, 10:06

Sounds like you want incremental mode

Tick "Incremental mode" box
Set "Low" edit box to 5 and "High" edit box to 5
Bind F1 to Low and F2 to High

Then F1 will lower axis by 5, F2 will raise axis by 5

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 3 guests