Posted February 11, 2011
Hi all. I've changed the controls.ini file to customize some hotkeys to my liking. Posting here to share what I've learned.
The file is perimeterDirectory\Resource\controls.ini
Should go without saying, but make backups before you change anything.
The file is divided into 3 sections: [declaration], [key], and everything else.
[declaration]:
Ties actions to integers, so for example:
3 = "CTRL_CAMERA_MOVE_UP"
This sets the scroll up action to the number 3.
[key]:
Ties keyboard keys to an integer, so for example:
69 = "E"
This sets the E key to the number 69.
Recommend you don't change anything in the [declaration] or [key] sections. You only need to change what comes after that.
With everything else, it's just tying the first set of numbers to the second. So, if you want the E key to scroll the camera upwards, put the following in the [main] section of your file:
3 =69
From what I've seen, the whitespace seems to be significant, so keep the same whitespace patterns that were used in the original file.
Also, it appears that you can get Ctrl combinations and Shift combinations by prepending the following binary strings to the target keys codes:
Ctrl 10
Shift 100
So for example, I like Shift+E to do zoom in. From the [declaration] section:
11= "CTRL_CAMERA_ZOOM_INC"
And from the [key] section:
69 = "E"
So we have:
E = 69 decimal = 1000101 binary
So the code for Shift+E would be concatenate(100, 1000101) = 1001000101 binary = 581 decimal
I have the following line in my [main] section:
11=581
This sets Shift+E to do camera zoom in.
AFAICT, you should be able to do Ctrl and Shift combinations with any key using the info above. I've tried in vain to figure out why Ctrl is 10 and Shift is 100, as that appears to have no relation to their [key] section values of 17 and 16 respectively. However, I've tried Ctrl and Shift combinations using the process above and I can confirm that they work.
One other important thing, if you delete any of the lines after the [declaration] and [key] sections, it appears to just nullify that hotkey. Me personally, I don't want to have any hotkeys to upgrade my laboratories. So I just deleted the lines:
[tvUpgradeLaser1]
key1=85
I deleted all of these types of lines for the lab upgrades. Afterwards, the lab upgrades no longer had hotkeys junctioned to them. You can still upgrade your labs by clicking the upgrade button, of course. So apparently deleting hotkeys that you don't want will not cause an error and will not cause it to just be assigned to a default hotkey. Thank god for this. I hate it when games insist that every little bs thing have its own hotkey.
Other notes:
1) For new hotkeys to take effect, game must be restarted.
2) There's an error in the controls.ini file, "Page Down" is misspelled as "Rage Down". My guess is that this is related to a hardcoded spelling error within the game itself, so I recommend you don't try to correct the spelling.
If anyone else has hotkey customization tips, please post them here.
If anyone else tries this and it works, please let us know.
The file is perimeterDirectory\Resource\controls.ini
Should go without saying, but make backups before you change anything.
The file is divided into 3 sections: [declaration], [key], and everything else.
[declaration]:
Ties actions to integers, so for example:
3 = "CTRL_CAMERA_MOVE_UP"
This sets the scroll up action to the number 3.
[key]:
Ties keyboard keys to an integer, so for example:
69 = "E"
This sets the E key to the number 69.
Recommend you don't change anything in the [declaration] or [key] sections. You only need to change what comes after that.
With everything else, it's just tying the first set of numbers to the second. So, if you want the E key to scroll the camera upwards, put the following in the [main] section of your file:
3 =69
From what I've seen, the whitespace seems to be significant, so keep the same whitespace patterns that were used in the original file.
Also, it appears that you can get Ctrl combinations and Shift combinations by prepending the following binary strings to the target keys codes:
Ctrl 10
Shift 100
So for example, I like Shift+E to do zoom in. From the [declaration] section:
11= "CTRL_CAMERA_ZOOM_INC"
And from the [key] section:
69 = "E"
So we have:
E = 69 decimal = 1000101 binary
So the code for Shift+E would be concatenate(100, 1000101) = 1001000101 binary = 581 decimal
I have the following line in my [main] section:
11=581
This sets Shift+E to do camera zoom in.
AFAICT, you should be able to do Ctrl and Shift combinations with any key using the info above. I've tried in vain to figure out why Ctrl is 10 and Shift is 100, as that appears to have no relation to their [key] section values of 17 and 16 respectively. However, I've tried Ctrl and Shift combinations using the process above and I can confirm that they work.
One other important thing, if you delete any of the lines after the [declaration] and [key] sections, it appears to just nullify that hotkey. Me personally, I don't want to have any hotkeys to upgrade my laboratories. So I just deleted the lines:
[tvUpgradeLaser1]
key1=85
I deleted all of these types of lines for the lab upgrades. Afterwards, the lab upgrades no longer had hotkeys junctioned to them. You can still upgrade your labs by clicking the upgrade button, of course. So apparently deleting hotkeys that you don't want will not cause an error and will not cause it to just be assigned to a default hotkey. Thank god for this. I hate it when games insist that every little bs thing have its own hotkey.
Other notes:
1) For new hotkeys to take effect, game must be restarted.
2) There's an error in the controls.ini file, "Page Down" is misspelled as "Rage Down". My guess is that this is related to a hardcoded spelling error within the game itself, so I recommend you don't try to correct the spelling.
If anyone else has hotkey customization tips, please post them here.
If anyone else tries this and it works, please let us know.