Universal Control Remapper (UCR) - v0.1.22 28th Oct 2018

Post gaming related scripts
amoeba

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

02 Jun 2017, 13:36

Is it possible to somehow map buttons of a particular mouse to keys or custom scripts? The "button to button" plugin doesn't recognize different mice. The "cursor" plugin does, but it deals only with cursors, which I don't need.
I know that this is a pretty silly thing to attempt, but I have several old mice spare that I want to use as pedals/macro buttons.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

06 Jun 2017, 15:38

0.1.15 released.
A couple of fixes, a couple of enhancements, and a couple of new plugins

Image

Code: Select all

0.1.15 - 6th Jun 2017
+ Added AxisRangeToButtons plugin
  This can be used to map an axis to up to 10 buttons.
  eg for throttle operated by up to 10 keyboard keys
+ Added AxesToMouse plugin
  Joystick to mouse
+ Added ButtonInitializer plugin
+ Adds Notes plugin
  Useful if you send someone an INI - you can write instructions in here.
= Fixed previews in AxisMerger plugin
= Crash fix in InputDelta plugin
+ Adds Loading splash screen
+ Fixed warning in ProfileSwitcher plugin
  When you first tried to select a target profile, you would get a warning
  that the clear item already existed.
= Added #NoEnv to all threads for performance
= Changed Associative array empty detection technique to Lexikos' one
s1w_

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

08 Jun 2017, 21:43

(Axes To Mouse) goes flawessly

but

(Mouse Axis To Joystick Axis) -> impossible to convert mouse signal to stick directly!!!! there is only vJoy that is not working for me (vJoy has faulty values in some apps)

why we cant Select Output Axis from real JoyStick?

please update your App ASAP :x
RecklessPrudence
Posts: 11
Joined: 27 Sep 2016, 07:40

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

11 Jun 2017, 04:42

Okay, obviously I'm an idiot. I had UCR working and playing nice with vJoy months ago, like in February or something. I needed to put in some profiles for most of the games, but it was working for the few I had entered. I haven't played any joystick games for ages, I've been waiting for my new stick. Just got informed it's been delayed again, so I thought I may as well use the one I've got. Updated UCR, made a profile, started the game and - no input in the game. Checked vJoy Monitor - same deal.

I've uninstalled vJoy and Joystick Gremlin (I was messing around with it at one point, but decided I preferred UCR), deleted the UCR folder, reinstalled vJoy and unzipped a fresh copy of UCR, and nothing! UCR's vJoy log says:
vJoy Install Detected. Trying to load vGenInterface.dll...
Checking C:\Program Files\vJoy\x86\vGenInterface.dll... FOUND.
Trying to load.. OK.
Checking driver enabled... OK.
Loaded vJoy DLL version 536
SCPVBus is installed
but when I run vJoy Monitor, nothing I do shows up. Both of them are set to vJoy Device #1, so it's not that... I'm obviously missing something that's staring me in the face, 'cos I got it working back in Feb in the first place, but I can't seem to get UCR to output to vJoy.

Any help you can give, even if it's just "You forgot [obvious thing], do that, idiot," would be great.
paulu013

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

11 Jun 2017, 09:58

I have the same issue with UCR > Vjoy. I had a profile that worked flawlessley in UCR. With the latest version of UCR the profile doesn't output to vjoy anymore. I tried reinstalling vjoy but that didn't solve the problem. When I start Vjoy Monitor together with UCR no thing gets triggered ( for example vjoy stick 1 axis 1) , but moving the same axis on the vjoy feeder app does move the axis slider in vjoy monitor.

I also noticed that when I tried to add a vjoy stick #8 that it did receive the button presses from UCR when I changed my profile to output to the vjoy #8 stick. BUT! This was only temporary as after a reboot this didn't function anymore.

So is there something wrong with the latest UCR version or is Windows 10 Creators update the culprit?
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

11 Jun 2017, 17:28

Released new version - reverted out a change in the last version.
This was causing bindings to vJoy to not work properly on load of UCR until you cleared and re-bound

Code: Select all

0.1.16 - 11th Jun 2017
= Revert out: Changed Associative array empty detection technique to Lexikos' one
  Seems to break vJoy bindings on reload.
@ the people currently having problems - how much does this new version help? Completely fixes, partially, or not at all?
I am on W10 creators, and have just upgraded to the latest vJoy (2.1.8.38) and all seems good - I tried with 2 vJoy sticks - no problems.
im2fst4u

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

11 Jun 2017, 19:19

Hello! I'm brand new to UCR.

My needs are simple, Remapping xbox to xbox. B button to LB for instance.

I try button to button Stick 1 button 5 for imput and vXbox stick 1, B for output. While everything lights up okay in UCR It does not show the buttons remapped in game controllers.

I don't understand what I am missing here, It's like it's not activated. I know Vjoy and stuff is installed.

I also need to map A button to LT. Dunno how to do that with all the options here...
RecklessPrudence
Posts: 11
Joined: 27 Sep 2016, 07:40

Re: Universal Control Remapper (UCR) - v0.1.15 6th Jun 2017

12 Jun 2017, 00:29

evilC wrote:@ the people currently having problems - how much does this new version help? Completely fixes, partially, or not at all?
I am on W10 creators, and have just upgraded to the latest vJoy (2.1.8.38) and all seems good - I tried with 2 vJoy sticks - no problems.
Not at all for me, unfortunately. I'm beginning to wonder if I got it running at all in the first place, or if I just thought I did and merrily started making profiles. Are there any special steps before you start that I might have missed this time around, apart from installing vJoy, making a vJoy device, and unzipping UCR?

EDIT: That fixed it completely! ...wonder why it didn't work until I fired up UCR the second time?
paulu013

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 01:59

This fixed it completely for me as well! Thanks a lot!

I also have a plugin request. I want to create a button to button script that triggers one of two output buttons on inputbutton release based on how long the button was pressed.

So something like this:

Input Button: joy1:btn3, Time 0.5S, Outputbutton 1: Vjoy1 btn1, Outputbutton 2: Vjoy1 btn2, Trigger Outputbutton: on release

on release joy1:btn3
If Time < 0.5S: Outputbutton 1
If Time > 0.5S Outputbutton 2

In autohotkey I used to use this script but I'm having troubles converting it to something that works in UCR:

1Joy3::
KeyWait, 1Joy3, T0.5
If ErrorLevel = 1
{
Send {F15 down}
KeyWait 1Joy3
Send {F15 up}
}
Return

Could you point me in the right direction?
paulu013

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 04:02

As an addition to my previous question, will it be possible to bind non physical keyboard keys to a output button? For example the F13 - F16 keys. This is usefull for simulators where all other keys are already used for keybinds.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 04:32

im2fst4u wrote:Hello! I'm brand new to UCR.

My needs are simple, Remapping xbox to xbox. B button to LB for instance.

I try button to button Stick 1 button 5 for imput and vXbox stick 1, B for output. While everything lights up okay in UCR It does not show the buttons remapped in game controllers.

I don't understand what I am missing here, It's like it's not activated. I know Vjoy and stuff is installed.

I also need to map A button to LT. Dunno how to do that with all the options here...
Although you can use UCR to remap an XBox controller to an XBox controller, it is pointless, as the game will still see the physical XBox controller.

This feature will be possible at some point in the next 6 months or so, when ViGEm is ready.

For now, use X360CE
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 04:35

paulu013 wrote:This fixed it completely for me as well! Thanks a lot!

I also have a plugin request. I want to create a button to button script that triggers one of two output buttons on inputbutton release based on how long the button was pressed.

So something like this:

Input Button: joy1:btn3, Time 0.5S, Outputbutton 1: Vjoy1 btn1, Outputbutton 2: Vjoy1 btn2, Trigger Outputbutton: on release

on release joy1:btn3
If Time < 0.5S: Outputbutton 1
If Time > 0.5S Outputbutton 2

In autohotkey I used to use this script but I'm having troubles converting it to something that works in UCR:

1Joy3::
KeyWait, 1Joy3, T0.5
If ErrorLevel = 1
{
Send {F15 down}
KeyWait 1Joy3
Send {F15 up}
}
Return

Could you point me in the right direction?
Possible, but you could not use the KeyWait technique, you would have to use SetTimer instead.
Look at the existing plugins and see one that uses SetTimer
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 05:59

@paulu013 - Here you go - a Long Press plugin for UCR.
Save to Plugins\User

Code: Select all

/*
A sample plugin to map a digital input to a digital output
When UCR is finished, valid inputs will be:
Keyboard*, Mouse Buttons/Wheel*, Joystick Buttons, Joystick Hat directions
Modes supported (Key / Mouse only): Block, Wild, Repeat Supression
Valid outputs will be:
Keyboard, Mouse Buttons/Wheel, Virtual Joystick Buttons / Hat directions
*/

; All plugins must derive from the _Plugin class
class ButtonToButtonLongPress extends _UCR.Classes.Plugin {
	Type := "Remapper (Button To Buttons - LONG PRESS)"
	Description := "Remap one input button to two output buttons (Long Press)"
	LpState := 0
	LpTime := 0
	LpDur := 0
	; The Init() method of a plugin is called when one is added. Use it to create your Gui etc
	Init(){
		; Create the GUI
		Gui, Add, GroupBox, Center xm ym w140 h60 section, Input Button
		this.AddControl("InputButton", "IB1", 0, this.MyHkChangedState.Bind(this), "xs+5 ys+20")
		;Gui, Add, Text, y+10, % "Remap"
		Gui, Add, GroupBox, Center x160 ym w140 h60 section, Short Press
		this.AddControl("OutputButton", "OB1", 0, "xs+5 ys+20")
		Gui, Add, GroupBox, Center x310 ym w140 h60 section, Long Press
		this.AddControl("OutputButton", "OB2", 0, "xs+5 ys+20")
		
		Gui, Add, GroupBox, Center x460 ym w140 h60 section, Long Press Time
		this.AddControl("Edit", "LpDur", this.DurationChanged.Bind(this), "xs+5 ys+30 w125", 500)
		this.TimerFn := this.ButtonTimer.Bind(this)
	}
	
	; Called when the hotkey changes state (key is pressed or released)
	MyHkChangedState(e){
		fn := this.TimerFn
		if (e && this.InputState)
			return	; Filter repeats
		if (e && !this.InputState){
			this.LpTime := A_TickCount + this.LpDur
			SetTimer, % fn, % "-" this.LpDur
		} else if (!e){
			SetTimer, % fn, Off
			if (this.LpState){
				this.IOControls.OB2.Set(0)
				this.LpState := 0
			} else if (A_TickCount < this.LpTime){
				this.IOControls.OB1.Set(1)
				Sleep 50
				this.IOControls.OB1.Set(0)
			}
		}
		this.InputState := e
	}
	
	DurationChanged(){
		this.LpDur := this.GuiControls.LpDur.Get()
	}
	
	ButtonTimer(){
		this.IOControls.OB2.Set(1)
		this.LpState := 1
	}
}
paulu013

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 09:17

Thanks for the plugin. Just tried it but It threw an error on line 40:

Code: Select all

SetTimer, % fn, % "-" this.LpDur
I changed it to:

Code: Select all

SetTimer, % fn, % - this.LpDur
and now it works correctly!

I also added the buttonpreview indicators so the full working version now is:

Code: Select all

/*
A sample plugin to map a digital input to a digital output
When UCR is finished, valid inputs will be:
Keyboard*, Mouse Buttons/Wheel*, Joystick Buttons, Joystick Hat directions
Modes supported (Key / Mouse only): Block, Wild, Repeat Supression
Valid outputs will be:
Keyboard, Mouse Buttons/Wheel, Virtual Joystick Buttons / Hat directions
*/

; All plugins must derive from the _Plugin class
class ButtonToButtonLongPress extends _UCR.Classes.Plugin {
	Type := "Remapper (Button To Buttons - LONG PRESS)"
	Description := "Remap one input button to two output buttons (Long Press)"
	LpState := 0
	LpTime := 0
	LpDur := 0
	; The Init() method of a plugin is called when one is added. Use it to create your Gui etc
	Init(){
		; Create the GUI
		Gui, Add, GroupBox, Center xm ym w170 h60 section, Input Button
		this.AddControl("InputButton", "IB1", 0, this.MyHkChangedState.Bind(this), "xs+5 ys+20")
		this.AddControl("ButtonPreview", "", 0, this.IOControls.IB1, "x+5 yp+5")
		;Gui, Add, Text, y+10, % "Remap"
		Gui, Add, GroupBox, Center x190 ym w170 h60 section, Short Press
		this.AddControl("OutputButton", "OB1", 0, "xs+5 ys+20")
		this.AddControl("ButtonPreview", "", 0, this.IOControls.OB1, "x+5 yp+5")
		Gui, Add, GroupBox, Center x370 ym w170 h60 section, Long Press
		this.AddControl("OutputButton", "OB2", 0, "xs+5 ys+20")
		this.AddControl("ButtonPreview", "", 0, this.IOControls.OB2, "x+5 yp+5")
		
		Gui, Add, GroupBox, Center x550 ym w100 h60 section, Long Press Time
		this.AddControl("Edit", "LpDur", this.DurationChanged.Bind(this), "xs+5 ys+30 w80", 500)
		this.TimerFn := this.ButtonTimer.Bind(this)
	}
	
	; Called when the hotkey changes state (key is pressed or released)
	MyHkChangedState(e){
		fn := this.TimerFn
		if (e && this.InputState)
			return	; Filter repeats
		if (e && !this.InputState){
			this.LpTime := A_TickCount + this.LpDur
			SetTimer, % fn, % - this.LpDur
		} else if (!e){
			SetTimer, % fn, Off
			if (this.LpState){
				this.IOControls.OB2.Set(0)
				this.LpState := 0
			} else if (A_TickCount < this.LpTime){
				this.IOControls.OB1.Set(1)
				Sleep 50
				this.IOControls.OB1.Set(0)
			}
		}
		this.InputState := e
	}
	
	DurationChanged(){
		this.LpDur := this.GuiControls.LpDur.Get()
	}
	
	ButtonTimer(){
		this.IOControls.OB2.Set(1)
		this.LpState := 1
	}
}
Thanks a lot for your help!
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

12 Jun 2017, 10:08

Oops, that was me adding the delay as a configurable parameter at the end, and clearly messing it up.
Glad you worked it out :)

Give it a whirl for a while and let me know if there are any issues. If not, it seems like something that should ship with UCR, so I will add it in the next release.
paulu013

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

13 Jun 2017, 13:45

Just a little update. I used the ButtonToButtonLongpress plugin for a while yesterday and today and so far it's working fine.
User avatar
WAZAAAAA
Posts: 88
Joined: 13 Jan 2015, 19:48

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

19 Jun 2017, 22:14

I have a suggestion for a feature: turbo. It's pretty common in controller mapping programs.

Add a "Turbo" checkbox together with the "Toggle mode" in the ButtonToButton plugin, and possibly a field for the milliseconds (how fast should the button be repeated). The 2 checkboxes should affect each other and behave like this:
Toggle OFF Turbo OFF = usual behaviour
Toggle ON Turbo OFF = usual behaviour
Toggle OFF Turbo ON = as long as the Input Button is being held, the Output Button will be repeated
Toggle ON Turbo ON = turbo functionality will work as a toggle, press Input once to start Output loop, press Input again to stop Output

I know the wiki page "Developing Plugins" has some instructions for an auto-fire macro, but I'm not familiar with AHK_H and UCR, so I've failed to make the example work.
YOU'RE NOT ALEXANDER
BOBBIESWAG

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

23 Jun 2017, 20:57

hi guys, does anyone know how to enable the scroll bar, i can not get more than 8 button to button commands because there is no scroll bar. If not possible can someone link me to a add-on that will let me?
BOBBIESWAG
Posts: 1
Joined: 23 Jun 2017, 20:58

Re: Universal Control Remapper (UCR) - v0.1.16 11th Jun 2017

23 Jun 2017, 21:05

hi guys, does anyone know how to enable the scroll bar, i can not get more than 8 button to button commands because there is no scroll bar. If not possible can someone link me to a add-on that will let me?

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 21 guests