Controller Companion

Controller Companion

Not enough ratings
Advanced Profiles 101
By CheatFreak
This is a guide to creating advanced profiles for Controller Companion using notepad, or other similar text editors.
With advanced profile editing, you can do things like map the four cardinal directions on each stick to whatever keys you want or change the flavor text displayed in the profile's editor.
   
Award
Favorite
Favorited
Unfavorite
Introduction
While many of you are familiar with the process of creating basic profiles for games and software in Controller Companion using it's GUI interface, I'm here today to expose some of the more complex things you can do with it by editing the profile data directly, using notepad, or similar text editors.

The main points of this guide are:
  • Custom text in the profile edit menus
  • Mapping any keyboard keys you want to the four cardinal directions on both analog sticks
  • Documentation of the format Controller Companion uses for storing it's profiles*
*Note: complete documentation is a goal but it likely won't be met right away.
How To: Get Raw Profile Data
In the GUI
The first, and easiest way to look at existing profiles for Controller Companion is by clicking on a profile you want to edit in the profiles tab of the software, and navigating to Export and saving it as a .ccp file. (you may also choose instead to copy the profile to your clipboard, where you can then paste it into an empty text document and save it with the extension .ccp.)

.ccp is the file extension for Controller Companion Profiles, which are essentially formatted text documents that Controller Companion understands and translates into the data that populates the profile editor.

You have to set the file association manually in Windows Explorer, but these files can be opened and edited by just about any standard raw text editor. I recommend Notepad++[notepad-plus-plus.org], which is a freeware text editor with tons of features- but, the the classic Notepad bundled in Windows will do just fine as well.

Manually exporting many profiles at once could take a while, especially if you have a lot of them. Which is why I'm going to describe an alternative way to get at the .ccp files.

In Windows Explorer
Local profiles, along with all other configuration for controller companion are stored on your computer in your local appdata path, inside a folder called ControllerCompanion.

You can open this very easily by opening up a run box by pressing the Windows Key + R and typing in %localappdata%\ControllerCompanion and pressing Enter.

In here you will find several things, configuration files, and several folders. Open the profiles folder and you will find all of the local profiles that you've made yourself in Controller Companion.

If you need to locate an online profile downloaded from the Steam Workshop, It's best to use the GUI method above, but, if you want to locate where it is locally stored on your machine, you can go back to the previous folder and open the file named WorkshopItems.cache in a text editor and open the items listed in the paths contained by that file.
Covering the Basics...
The start of any advanced profile, begins with a solid basic profile. So, create the profile you want to edit and customize it as much as you can with the GUI editor, and then export the profile from the GUI or copy it to your clipboard and paste it into your text editor.

If you don't know how to create profiles, I recommend, firstly, getting some common sense- and second, check out the official guide for Controller Companion.

For this example, I'll be using a profile I've made for Knytt Stories, which is a freeware game by Nifflas.
How To: Custom Flavor Text
One of the ways you can enhance your profiles is by changing the flavor text that is displayed in the profile editor for Controller Companion to match the intended effects of the keys, rather than just the key names themselves.

To do this, you can simply replace the text directly before the colon symbol with whatever you'd like. In the image above I've highlighted the text that you would delete and replace with your flavor text instead.
As you can see, I've changed the text to match the actual action that the key performs in-game.

This is the result. The reason this is useful is that humans are a lot better and understanding words than they are meaningless keyboard keys, and the good thing about this, is that the user doesn't have to go online to actually understand how your profile allows the target game to play.
How To: Custom Mappings for Analog Directions
One of the more common complaints about Controller Companion is the inability to map each of the four cardinal directions on each Analog Stick to individual keys, but this is actually false.

In actuality, the software does support this behavior, it's just that there is no GUI interface for mapping each individual stick direction independently. Instead, the software opts for only some of the more traditional keys used for directional controls.

Today I'll be trying to explain how to set each of the four directions to whatever keys you want using advanced profile editing.

Analog Stick Rules
Now, in the Profile Documentation below, I discuss rules in much finer detail, but all you really need to know to edit the analog sticks is about the command block for the analog sticks. To start with, in your profile, you want to have the stick you want to edit set to one of the "keys" options. In this example I'll be using the Arrow keys option.

An example of the rule you see with the arrow keys option:
right stick @ Arrow keys: key Up Down Left Right norepeat
In the previous section we discussed how the part between the @ and : symbol is just display text, so feel free to edit that to whatever you want. In here, we're interested in editing the command block.

You want to change the keys listed after "key" and before "norepeat" to the four keys that you want the stick to be activating. Most of the names for these keys are pretty straightforward, but if you find yourself unable to figure out what the names of keys are, you could always create a new profile, and use the GUI to input the key you want on another button and then read the command block for the rule for that button to learn the keyname.

In the future a complete list of the less easy to learn key names may become available in the Profile Documentation section, but for the time being, you can simply figure them out yourself using the GUI and some common sense.

In my example game, Knytt Stories, I actually didn't need to do this, so instead I'll show an example from a game I did need to do this for, called Crazy Machines.
right stick @ Scroll and Rotate Elements: key PageUp Next Left Right norepeat
In that game I needed to map Up and Down on the stick to PageUp and PageDown which are keys used to scroll the element viewer, and this is what the rule ended up looking like.
Profile Documentation
Now, this is a bit more technical, but if you wish to do further advanced editing to profiles on your own, this may be of some use. This documentation is by no means complete, and only serves as some general outlines to use for reference. If you think you have some information to add, leave a comment below or contact me directly and I'll update the section with more information.

I intend on making a list of keynames for this at some point as well.

About Setting Lines
Controller Companion Profiles have several lines dedicated to settings for the profile.
title: Knytt Stories+ workshop id: 529876896 process: stdrt KnyttStoriesLauncher mouse speed: 900 mouse acceleration: 0 mouse wheel speed: 2400
These are some examples of setting lines, these are pretty straight forward, so I won't go into them very deep, but note they do exist, and if you feel like editing them in the text editor insted, by all means, go right ahead.

Some settings that are defined by a number can be edited to a much finer degree of detail in here than in the GUI, but I don't think that would serve much purpose in creating better profiles.

About Rule Lines
You'll notice in my example that there are many lines that start with the name of an control, followed by an @ symbol, a bit of text, and then a colon, followed by one or more pieces of text.

In actuality what you are looking at is what dictate how Controller Companion handles controller input, displays input mappings inside of the Profile Editor, and what each control does.

I've been calling them rules.

The syntax for these is relatively simplistic to learn, though some of it is still not well documented. It is my intent to eventually fully document these but, for now, the best way to learn about rules is to experiment with them on your own.

The basic syntax for rules is like this:
button block @ display text: command block
The button block controls what Xbox button a rule is satisfied by. This block can also contain a modifier button (typically back) before the main button, and the limits of this have yet to be fully explored.

The display text is what appears in the GUI profile editor. This can be changed to anything you want. All text between the @ symbol and the : symbol will appear in the GUI. Obviously, you have to refrain from using @ and : in your descriptive text as a result of this, but all other text seems to be fair game.

Lastly, we have the command blocks. These... are complicated. More than the others. The best way to explain them is that they define an input method, followed by what input it's looking for, followed by any arguments that the input has.

There's some additional details in this, like how analog sticks actually accept four inputs when the input method is set to key, or how you can set multiple keys together by using the + symbol.

It may be possible to have more than one modified button set using advanced profile editing, but I've not yet had the chance to explore the possibility. Eventually I'd like to fully document all of the different things that can be done with the command blocks, but that's pretty unrealistic for me to tackle on my own at the moment, so I'm putting that off for now.

Just remember experimentation is key here- don't be afraid to mess with button blocks and command blocks in whatever ways you see fit to learn more about how they work.

About Icons
Icons may look daunting but in actuality, they are incredibly simple. They are simply a single line that starts with icon: followed by a 32x32 base64 encoded image. If you need to encode an image, it's best to simply use the GUI menu to change the icon, but you can also encode one manually using a variety of online tools. Just google "Base64 Image Encoder" and I'm sure you can find one that will work.
Contact & Closing
If you need to contact me, I'm easiest to talk to on Discord at CheatFreak#3799. I don't accept random steam friend requests very often or quickly, so please refrain from adding me here on Steam unless it's absolutely your only option.

Anyway, If you made it this far, cool! Thanks for checking out my guide, I spent a good day or so on it. Hopefully you find it useful!

I'd quickly like to thank the developer of Controller Companion for creating such a robust and well developed modern alternative to old software like JoyToKey, GlovePIE, and Xpadder. Nice work, Felizk!
7 Comments
genderneutralnoun 10 Mar, 2023 @ 8:29am 
How do you bind multiple actions to one button? I want to have a button act as a keyboard key, but also be used to enable secondary bindings.
sl1ng 24 Jan, 2022 @ 7:59am 
Any idea how to replace the default app configuration? One would think to add Controller Companion to the process list but it kinda bugs if you do that. Would be awesome as a feature tbh to be able to remap everything
AJ 4 Oct, 2021 @ 7:32am 
Thank you bro :)
Wxy9 2 Mar, 2021 @ 12:21am 
Great Guide.. Can you plz tell me how to binding multiple actions to one button?
CheatFreak  [author] 26 Mar, 2019 @ 2:54pm 
I will have to do that later.
CheatFreak  [author] 26 Mar, 2019 @ 2:54pm 
No problem, that reminds me I need to add a section about binding multiple actions to one button.
Red_Rain77 26 Mar, 2019 @ 2:31pm 
Thank you so much! this was a huge help. :steamhappy: