Automating UCR via RocketLauncher [Tutorial]

TheDotEater
3 min readMar 24, 2018

--

This is an extension of my previous tutorial UCR X360 Controller Support for Multiplayer from Single HID and I recommend checking that out first if you’re not familiar with configuring UCR X360 profiles for two players.

Now that we have a two player X360 profile in UCR I want to look at automating the process of loading these profiles when launching Steam/PC Games from front-ends utilizing RocketLauncher.

To accomplish this we will be launching AHK scripts from the PreLaunch and PostExit parameters in RocketLauncher. If you don’t already have AHK installed download and install it from the AutoHotKey website.

This tutorial assumes you already have knowledge of launching Steam/PC Games from RocketLauncher so it will be brief. If you don’t know how to setup Steam/PC Games in RocketLauncher I recommend first using Google to find a tutorial and familiarizing yourself with the process before continuing.

With AHK installed we need to create two scripts: UCRStart.ahk and UCRStop.ahk

UCRStart.ahk

UCRStop.ahk

Download both these scripts and place them in your UCR directory at the same level as UCR.exe

Please note that the UCRStart.ahk may need to be updated to reflect your UCR window title if it is different from UCR — Universal Control Remapper v0.1.18. I tried to make the script detect the window by pid but because of how UCR launches I had to grab the window by title instead.

With this approach we are launching UCR each time we launch a game from RocketLauncher so UCR does not need to be(and shouldn’t be) running in the background. The reasoning behind this is that since our UCR profile is blocking key inputs we won’t want it running constantly in the background because that may cause conflicts with other emulators we have setup to use those keys. Instead, it is much simpler to only start UCR when launching a game that needs it and immediately closing UCR upon exiting the game.

UCR keeps track of the current active profile so if you have multiple profiles you will want to make sure your controller profile is the active one. To do this launch UCR from the executable and confirm your profile is automatically selected. If it is not, all you have to do is highlight your profile and click save settings before exiting the program.

Launching RocketLauncher, select your Steam/PC Games system from the system select pane on the left. Go to the modules tab and with PCLauncher.ahk selected, open the System Settings Editor.

Here we will first want to select the game we are interested in and then switch to the Pre/Post Launch tab.

For PreLaunch use the magnifying glass to locate the UCRStart.ahk script.

PostExit we will want to select the UCRStop.ahk script.

Unfortunately, this process will need to be repeated for each game so if you have a lot of games to support you’re probably better off copying and pasting from the .ini in a notepad program.

From the root RocketLauncher directory you will want to navigate to ..\Modules\PCLauncher and open the .ini that corresponds to your system. In my case, since I named my PC Games system Steam, the file will be Steam.ini.

With this file open, locate the game you setup and copy/paste the PreLaunch/PostExit lines to each game you want X360 controller support for.

That about wraps this tutorial up. It’s pretty straightforward if not a bit tedious.

Next I’ll be looking at profile switching to handle cases where a specific game(s) may need it’s own UCR profile. I will update this with the link once that tutorial is done.

--

--