Modding:Company of Heroes/Hotkeys
From RelicWiki
This a guide on how to modify the Company of Heroes default hotkeys. Note on terminology: if something is in quotes ("example") then the quotes are used to mark the start and end of the thing in question - do not actually include the quotes in filenames, etc. Whenever "Company of Heroes" is in a filename quote, it means your full Comapny of Heroes path, eg. "C:\Program Files\THQ\Company of Heroes\"
Contents |
Extract the file
First, open up the mod studio and load the RelicCOH.module file. Once it has loaded it, extract the file called "game\keydefaults.lua" (right click on the file and choose "Extract this file"). Keep the mod studio open for later.
Set up the files
- Go to your Company of Heroes folder (eg. C:\Program Files\THQ\Company of Heroes) in windows explorer, right click on the RelicCOH.module file and open the properties.
- Untick the box labeled "Read-only", hit "Apply" and then close the properties window.
- Now make a copy of the "RelicCOH.module" file and call it "RelicCOH.module_backup" (do NOT call it anything else).
- Next go to your "Company of Heroes\WW2" folder and create a folder called "Data_KeyDefaults", and inside that folder make a folder called "game".
- Now move the "Company of Heroes\WW2\Data\game\keydefaults.lua" file to "Company of Heroes\WW2\Data_KeyDefaults\game\keydefaults.lua".
- Next open the "Company of Heroes\RelicCOH.module" file in notepad and find the bit that looks like this:
[data:common:01] folder = WW2\Data archive.01 = WW2\Archives\WW2Data archive.02 = WW2\Archives\WW2Art archive.03 = WW2\Archives\WW2Sound archive.04 = WW2\Archives\WW2ArtAmbient
- Replace that bit of text with this:
[data:common:01] folder = WW2\Data archive.01 = WW2\Archives\WW2Data_KeyDefaults archive.02 = WW2\Archives\WW2Data archive.03 = WW2\Archives\WW2Art archive.04 = WW2\Archives\WW2Sound archive.05 = WW2\Archives\WW2ArtAmbient
- Finally, save and close the RelicCOH.module file.
Change your hotkeys
- Open the "Company of Heroes\WW2\Data_KeyDefaults\game\keydefaults.lua" file in notepad and edit as you see fit. Once done, save and close the file.
- Go back to the mod studio, change from the files tab to the tools tab and double click on the SGA packer tool
- For the input directory, choose "Company of Heroes\WW2\Data_KeyDefaults"
- For the sga to create, choose "Company of Heroes\WW2\Archives\WW2Data_KeyDefaults.sga"
- Leave TOC on the default value of "Data"
- Press the create button
Conclusion
The game should now use your modified hotkeys. If you want to change them again, then repeat the step above this one. The only problem here is if you want to patch your game; in order to patch your game you must delete the "RelicCOH.module" file and rename the "RelicCOH.module.backup" file to "RelicCOH.module". Then apply the patch (you will have to then backup the new .module file and change the RelicCOH.module file as you did the first time round).

