Double Cubes

Double Cubes

Not enough ratings
Tutorial - Control Remapping
By XaivierX
Per popular demand, this guide will walk you through remapping controls for Double Cubes utilizing AutoHotkey.
   
Award
Favorite
Favorited
Unfavorite
Get AutoHotkey
To start out, you must have AutoHotkey installed on your system. If you don't have AutoHotkey, you can download it from thier website:

https://autohotkey.com/download/

You can download the Installer to install the program automatically, or, optionally, the .zip file if you can't run an installer, or just want to place the program somewhere manually.

Get the Script
AutoHotkey is a program that utilizes a script to remap keys / mouse / etc to other keys / mouse / etc. For Double Cubes, you will want to grab this script and save it as a text file (open up notepad, and past this in) with the name "Double Cubes.ahk":

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ; Created: 04/14/2017 ; Function: Script to remap controls for Game Double Cubes ; Requirements: AutoHotkey ; This is a comment -> comments start with a semicolon. ; Comments are ignored by AutoHotkey ; The format for key mapping is: ; OriginKey::DestinationKey ; For a list of all special keys & Mouse / Joystick values: ; https://autohotkey.com/docs/KeyList.htm #IfWinActive, DoubleCubes ; Only enables the below hotkeys for the specified program (DoubleCubes) Up::w ; UpArrow => w (Move Forward) Down::s ; DownArrow => s (Move Backward) Left::a ; LeftArrow => a (Move Left) Right::d ; RightArrow => d (Move Right) z::RButton ; z => Right Mouse Button (Cube Edit Mode) x::WheelDown ; x => Wheel Down (Switch between Add/Remove Cube) c::LButton ; c => Left Mouse Button (Cube Action - Add/Remove Cube) #IfWinActive

Best to save it somewhere you can get access to it easily.
Optional - Modify the Script Bindings
The script has been set up like this:

Up / Down / Left / Right Arrow Keys -> move the player.
z key -> Turn on Cube Edit Mode
x key -> Toggle Add / Remove Cubes
c key -> Add / Remove Cube action

If you prefer a different set up, you can modify the script as you like. For example:
Up::w
maps the default 'w' key to the 'Up' key to move forward.

If you want to move forward with the 'p' key instead, you would change this to be:
p::w

Also, if you prefer to use the default bindings for any control, simply prefix the line with a semicolon.
So, to revert back to moving forward with the 'w' key, you would format the line like this:
;Up::w

Any special keys to map can be found on th AutoHotkey website:
https://autohotkey.com/docs/KeyList.htm

Once you are done configuring your changes, save your script!
Compile your Script
Once you have your script modified and saved, open up AutoHotkey.

You are interested in the 'Required Parameters' area:

'Source (script file)': This is the script we just downloaded.
'Destination (.exe file)': This will be your compiled script that will reconfigure the key mappings.

Step 1: Browse for the 'Source (script file)' to where you saved it and select it.
Note: If you don't see your script where you saved it, change the filter at the bottom of the window from 'AutoHotkey files (*.ahk)' to 'All Files (*.*)'.


Now, for the Destination (.exe file), you will want to specify a new program name, such as 'Double Cubes Remapper.exe'. You can place this anywhere you like. This is the remapper executable you will run before starting Double Cubes.

When you have both Required Parameters set, press the 'convert' button to create your remapper executable.

Congratulations, you now have created your remapping tool!
Run your Remapper & Game
The time has finally come, you can now run your game with your custom controls!

Run the Remapping Executable you created via AutoHotkey, then launch Double Cubes. Your custom controls should now work!

Once you are done playing the game, simply exit out of your remapper, which will be running in your task bar (near the clock). You can keep it running if you'd like, but I like to clean up after myself. :)

FAQs
Trouble - Issues? Maybe one of these FAQs can help you out!

1. None of the remapped controls seem to work:
A: Is the Remapper executable running (in the system tray?) if not, start it up!
A: AutoHotkey is specific, so if you have 'x' as a control, make sure Caps Lock is off. If you have 'X' as a control, be sure it's on!

2. The remapped mouse buttons don't seem to work:
A: Just like with the real mouse controls, you need to hold down the Edit Key to perform the other actions: (Hold down z -> Press x to switch between modes or Press c to perform a cube action)

3. I made changes to my script but they don't take effect.
A: I've had this happen myself -> make sure you are saving your file if you have the script open and AutoHotkey and you are regenerating the executable.

4. When I attempt to generate the remapper executable I get 'Error: Could not copy final compiled binary file to destination."
A: Write permission issues - either the executable is still running (check the system tray) and cannot be overwritten or you don't have permissions to write to that file / directory.

5. Can you do <something else> with this script?
A: AutoHotkey is pretty powerful, and this is a quick, basic script, I'm sure there's more that can be done. They have a tutorial here you can reference: https://autohotkey.com/docs/Tutorial.htm