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

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

Re: Universal Control Remapper (UCR) - v0.1.3 16th Oct 2016 - Experimental Rewrite (Hotfix 2)

31 Oct 2016, 16:50

Released 0.1.4
Primarily stability changes and bug fixes, but there are a few nice new features in there.

There are still some known issues with this new branch:
If anyone can reliably reproduce any issues, please let me know.

Sometimes, settings do not save, even when adding multiple plugins etc.

Sometimes IOControls become un-bindable (ie you select something but it doesn't "stick").
Using "Clear Binding" in this instance usually fixes it.
[Edit] Have reliable repro on this one now. Happens with OutputButton IOControls if you select clear, then save the ini (eg quit UCR)

Code: Select all

Key:
! : Warning
* : Comment
= : Change / Fix
+ : Added feature

0.1.4 - 31st Oct 2016
+ Added "Pause" mode for UCR
  When UCR is Paused, all profiles (except the SuperGlobal profile) are DeActivated
  Useful, eg if you blocked Left Mouse Button in a profile and you need to use it.
+ Added new SuperGlobal profile
  Plugins in this profile will always be active, even when UCR is Paused
+ Added new "PauseButton" plugin
  Put this in the SuperGlobal profile, and use it to Pause UCR
+ Added "Incremental Mode" to the ButtonsToAxis plugin
  This adjusts the current axis position by the deflection setting on each press
  of the buttons. The axis does not center when you release a button in this mode.
= Titan Buttons now send a value of 100 to the Titan API, instead of 1.
  This fixes Titan one L2/R2 button mappings only deflecting the analog button 1%
= Fixed AxisInitializer plugin not working at all
= Fixed Titan triggers not sending correct values
= Fixed Titan PS3/4 triggers being absent from InputAxis
= Fix for GameBind in OutputAxis and OutputButton IOControls
= Changes to how settings are saved
  UCR now saves 30s after a change, rather than 1s.
  Profile's settings are now cached, so less work is done when we save.
= Re-Work of profile changing code
  Profile changes should now feel more responsive
= Profiles linked to by the Global profile are now always PreLoaded
  ie if you have a ProfileSwitcher plugin in the Global profile
  then the profile that it points to will always be PreLoaded (in memory)
= OutputAxis IOControls now clamp values to the 0..00 range
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

03 Nov 2016, 17:40

Another known issue - profiles are not fully removed from the settings file when you delete them.
Fixed in this commit: https://github.com/evilC/UCR/tree/2bddc ... 0dea450428

I think I also have an idea on what is causing the "failing to save settings" issue. It has come to my attention that if a menu is open, then all processing apparently stops while the menu is open.
So if a save was scheduled for 30s time, but you then open a menu and keep it open for 30s, then I am not sure what happens. I am concerned that opening a menu could cause the preparation of data for the save to be interrupted, then when the menu closes, the save happens before the data has been properly prepared.
Or something like that.
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

07 Nov 2016, 17:39

New version released.
With this release, I have tidied up the UI a little and added a "Bottom Panel" which currently houses a new "Save Settings" button.
Now, you control when UCR saves settings. If you try to exit with unsaved changes, it warns you and gives you a chance to save.
There are also a few bug fixes in there.

NOTE THAT UCR.EXE CHANGED IN THIS VERSION.
(ie AHK_H was updated, and we need the new change.)
So if running UCR un-compiled, you will need to update your copy of AHK_H

Code: Select all

Key:
! : Warning
* : Comment
= : Change / Fix
+ : Added feature

0.1.5 - 7th Nov 2016
! UCR.exe changed in this version.
  Some autopositioning bugs in AHK_H were found.
= Removed automatic saving of changes.
  This is suspected to be a trigger for some crashes or other undesirable behavior.
  It also meant that if something went wrong, the user had way of backing out of a change.
  So for now, it is gone. this may change in the future.
+ Added "Save Settings" button and readout to let you know if there are unsaved changes.
  There is also a warning if you try to exit UCR with unsaved changes.
= Fixed OutputButton getting stuck (Selecting options had no effect) if saved unbound.
= Improved code that handles the overall layout of the UCR GUI.
  Also added "Bottom Panel" to house the new save button.
  Thanks to HotkeyIt for implementing some fixes to our autopositioning system in AHK_H.
= Fixed Plugin ChangeValueCallbacks being fired multiple times with same value on start.
= Fixed Profile InputThreads being stopped then restarted when changing to current profile.
= Deleted profiles are now properly removed from UCR.ini

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

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

09 Nov 2016, 06:42

I have problems with preserving radio button selection, the first choise, when plugin is added, is preserved for all times. Eg, add a new instance of the plugin, select "Three", restart, then three is selected, then select "Two", restart, now, "Three" is selected again. Tested on both v0.1.3 and v0.1.5 (I clicked the save button between restarts.)

Code: Select all

class testplugin extends _UCR.classes.Plugin
{
	type:="testplugin"
	description:="test"
	init()
	{
		this.AddControl("Radio", "r1",0, "Checked","One")
		this.AddControl("Radio", "r2",0,,"Two")
		this.AddControl("Radio", "r3",0,,"Three")
		this.AddControl("Radio", "r4",0,,"Four")
		fn:=this.disp.bind(this)
		Hotkey, F1, % fn
		
	}
	disp()
	{
		MsgBox, % this.GuiControls.r1.Get() "`n" this.GuiControls.r2.Get() "`n" this.GuiControls.r3.Get() "`n"  this.GuiControls.r4.Get() 
	}
}
Also, once a radio button has been selected once, this.GuiControls.RADIO_BUTTON_NAME.Get(), always returns 1. (not tested on v0.1.3)
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

09 Nov 2016, 07:15

I have not really catered for radios yet, as they are such a pain to organize into groups and such. A DDL will do what multiple radios allow you to do.

The problem is due to how GuiControls are wrapped:
https://github.com/evilC/UCR/blob/Input ... ol.ahk#L71

When you change the value of a GuiControl, the class for most GuiControl types just calls GuiControl, , % this.hwnd, % this.Get()
"List Types" (DDLs, Listboxes etc) instead call GuiControl, choosestring, % this.hwnd, % this.Get() or GuiControl, choose, % this.hwnd, % this.Get() if the control is set to "AltSubmit".

So I guess I maybe need to flag Radios as a different type and when you change value, it calls GuiControl, % "checked" this.Get(), % this.hwnd

However, that would still not provide any mechanism for grouping radios together, because that needs to be done via a vLabel, and a vLabel needs to be static or global, which completely breaks the existing mechanism for declaring GuiControls.

If you have any thoughts about how to work around this, I am all ears...
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

18 Nov 2016, 07:39

That seems fine to me, having to declare in order is not a big issue imo.
Massivebasset
Posts: 1
Joined: 27 Nov 2016, 15:26

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

27 Nov 2016, 16:11

Tried to send you an email, but thought I might as well post here too.

I've been trying to use ucr and keep getting this error as soon as I run the exe. This is on a Windows 7 64bit sp1 machine.

https://imgur.com/gallery/QIkng

I tried it on a Windows ten machine, and had no issues. Any idea?

Thanks for any help you can provide.
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

28 Nov 2016, 14:23

Image
That's a very odd error to be getting - It is saying that it can't find one of the GUIs that it created.

Could you try editing Classes\BindModeHandler.ahk with a text editor?
Line 28: this.hBindModePrompt := hwnd
Try adding a line after - msgbox % "CTOR: " this.hBindModePrompt

Try running UCR with that change - do you see a message box pop up with a number in it?

Then find line 53: Gui, % this.hBindModePrompt ":Hide"
try adding a line BEFORE: msgbox % "SetHotkeyState: " this.hBindModePrompt

Then run again - you should see two message boxes this time, and they should both contain the same number.
azerty55
Posts: 13
Joined: 28 Nov 2016, 17:34
Contact:

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

28 Nov 2016, 17:48

Hi
i have a problem with vxbox module
when i map keyboard buttons on left trigger it goes crazy ; in fps it dont stop shooting for example
left trigger and right trigger has axis so it dont work flawlessly when i map on keyboard
i want trigger act as buttons
i think vxbox is really great feature anyway
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

29 Nov 2016, 09:55

@Azerty - I can understand why this may happen - when a button maps to an axis, it uses 100% for press, and 50% (middle) for release.
However, with the triggers, they expect to be at 0% on release.
I will have to have a think about this, as there are two ways to solve this issue:
1) Add an extra parameter to the ButtonToAxis that allows you to set the % deflection that the axis is set to on button release.
2) Make trigger type axes respond to input differently. If passed a value of 50% (which would normally be middle), they interpret that as 0%

I am not sure I like (1) as it puts a burden of knowledge on the user.
I am also not quite sure as to what the effects of (2) would be with regard to axis->axis mappings (eg via the axis splitter).

What I may do in the short term is to implement (1), as that is rather simple, then longer term look at the implications of implementing (2)
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

29 Nov 2016, 11:19

Azerty, I hope to implement this fix by the weekend, but until then you can easily bodge this fix:

Edit Plugins\Core\ButtonsToAxis.ahk in a text editor.
Line 62:
out := 50

Change to:
out := 0

This will affect ALL ButtonsToAxis plugins, but unless you use them for something else other than mapping buttons to triggers, this will not affect you.
If it does, make a copy of ButtonsToAxis.ahk and call it ButtonsToAxisNew.ahk, then change the first line class ButtonsToAxis extends _UCR.Classes.Plugin to class ButtonsToAxisNew extends _UCR.Classes.Plugin and change the next line Type := "Remapper (Buttons To Axis)" to Type := "Remapper (Buttons To Axis - NEW)"
This will give you a duplicate plugin that you can modify.
azerty55
Posts: 13
Joined: 28 Nov 2016, 17:34
Contact:

Re: Universal Control Remapper (UCR) - v0.1.4 31st Oct 2016

30 Nov 2016, 12:20

Thanks for your rapid support, I will test that until fix on later update
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.6 3rd Dec 2016

03 Dec 2016, 12:17

New version released, 0.1.6
Mainly stability fixes, but note the ButtonsToAxis changes in the changelog.

@azerty - use one ButtonsToAxis plugin for each trigger, you only need to map the High InputButton, forget the Low.
Leave the High deflection value on 100, and change the Mid value to 0
This should allow you map buttons to trigger axes and have them return to the correct place on button release.
Key:
! : Warning
* : Comment
= : Change / Fix
+ : Added feature

0.1.6 - 3rd Dec 2016
+ The ButtonsToAxis plugin now has settings for Low / Mid / High
This enables remapping buttons to a "split axis" such as an XBox trigger.
This change breaks the deflection setting of all existing ButtonsToAxis plugins.
(Which is only an issue if you used non-standard settings)
To fix this you can do a search and replace in your ini file:
Find "Deflection" and replace with "DeflectionHigh"
= Reverted back to synchronous communication from main thread -> InputThreads
= When a profile's InputThread receives bindings upon loading, they are all passed in one call
This massively reduces the number of inter-thread calls.
Razorxyzify
Posts: 3
Joined: 04 Dec 2016, 10:10

Re: Universal Control Remapper (UCR) - v0.1.6 3rd Dec 2016

04 Dec 2016, 10:17

Thank you for making this wonderful app, it has helped me a lot. I am using the latest version: v0.1.6 3rd Dec 2016.

I want the timeout feature for the mouse2joy plugin to work for the absolute mode but i can't seem to do it.

In the code, I changed this line:

; In Relative mode, emulate centering with a timeout
if (this.Mode = 1){

to

; In Relative mode, emulate centering with a timeout
if (this.Mode = 2){

but it doesn't work. Can anyone help?
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Universal Control Remapper (UCR) - v0.1.6 3rd Dec 2016

05 Dec 2016, 14:57

I do not see the point in simulating centering based upon inactivity for absolute mode, as it simply would not function properly.
Surely, what would be more appropriate would be a hotkey that centers the axis?

Or do you maybe mean a long timeout value such as 2 or 3 seconds? I suppose that may make some sense but still it seems like it would not really be any different to Relative mode with a long timeout

Unless I am missing something, please feel free to explain your use-case
Razorxyzify
Posts: 3
Joined: 04 Dec 2016, 10:10

Re: Universal Control Remapper (UCR) - v0.1.6 3rd Dec 2016

06 Dec 2016, 06:19

evilC wrote:I do not see the point in simulating centering based upon inactivity for absolute mode, as it simply would not function properly.
Surely, what would be more appropriate would be a hotkey that centers the axis?

Or do you maybe mean a long timeout value such as 2 or 3 seconds? I suppose that may make some sense but still it seems like it would not really be any different to Relative mode with a long timeout

Unless I am missing something, please feel free to explain your use-case
I got it to work. Right now, if the mouse is not moved for a certain amount of time it recentres the joystick. Thanks dude :D

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 45 guests