-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
CoH2-Rebinder.exe |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
; Company of Heroes 2 Rebinder | ||
; Scripted by Tamerciaga | ||
; https://github.com/tamerciaga/coh2-rebinder | ||
|
||
#IfWinActive, Company Of Heroes 2 | ||
{ | ||
#CommentFlag // | ||
// Always disable capslock; | ||
SetCapsLockState, AlwaysOff | ||
|
||
// Keys used to suspend the script; | ||
~Enter::Suspend | ||
+~Enter::Suspend | ||
~NumpadEnter::Suspend | ||
+~NumpadEnter::Suspend | ||
NumpadSub::Suspend On | ||
~Esc::Suspend Off | ||
|
||
// Togle on/off behaviour; | ||
\:: | ||
F1:: | ||
Suspend | ||
if (A_IsSuspended) { | ||
Overlay("disabled") | ||
} else { | ||
Overlay("enabled") | ||
} | ||
SoundPlay, %A_WinDir%\Media\chimes.wav | ||
return | ||
|
||
// Some keys to send messages; | ||
F2::Send {Enter}Hey, what is the plan{?}{Enter} | ||
F3::Send +{Enter}GL HF{!}{Enter} | ||
|
||
// Rebind arrow keys to WASD; | ||
w::up | ||
a::left | ||
s::down | ||
d::right | ||
|
||
// Additional rebinds here; | ||
//g::g | ||
//r::r | ||
m::Send {b}{m} | ||
c::s | ||
z::u | ||
f::e | ||
q::t | ||
t::h | ||
`::^a | ||
} | ||
|
||
// Custom code to show a nice overlay in game; | ||
Overlay(action) | ||
{ | ||
global | ||
Gui MyRebinder: New | ||
Gui MyRebinder: +LastFound +AlwaysOnTop -Caption +ToolWindow | ||
Gui MyRebinder: Font, s24, Arial q4 | ||
Gui MyRebinder: Color, 000000 | ||
if (action = "enabled") | ||
{ | ||
Gui MyRebinder: Add, Text, x30 y15 vStatus cLime, REBINDER ENABLED! | ||
} | ||
else if (action = "disabled") | ||
{ | ||
Gui MyRebinder: Add, Text, x30 y15 vStatus cRed, REBINDER DISABLED! | ||
} | ||
Gui MyRebinder: Font, s12 Arial q4 bold | ||
Gui MyRebinder: Add, Text, x30 y50 vCredits cAqua, SCRIPTED BY TAMERCIAGA | ||
WinSet, TransColor, 000000 255 | ||
Gui MyRebinder: Show, x0 y400 NoActivate, MyRebinder | ||
// Some fancy code to show the GUI async, because it does not work with sleep; | ||
SetTimer, AsyncCloseOverlay, 2000 | ||
return | ||
AsyncCloseOverlay: | ||
Gui MyRebinder: Destroy | ||
SetTimer, AsyncCloseOverlay, Off | ||
return | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Tamerciaga | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# coh2-rebinder | ||
Company of Heroes 2 Hotkey Rebinder | ||
# CoH2 Rebinder | ||
Full Company of Heroes 2 rebinder to make our lives easier. | ||
|
||
![](https://i.imgur.com/mXxmGb6.png) | ||
|
||
### Introduction | ||
The current controls of CoH2 are utterly shit. The game also do not offer a way to change this so we need the help of AutoHotKey. | ||
This tool is safe to use and it will only rebind keys, it will not give you super powers! | ||
The executable can be marked as a virus by your anti-virus, but this is a false positive as it tracks your keystrokes. | ||
|
||
### Features | ||
- Only runs when Company of Heroes 2 is running, so it has zero performance impact. | ||
- Movement has been remapped from the arrow keys to WASD. | ||
- Easy to customize. | ||
- Does not break online chat (global chat and team only). | ||
- Numpad keys are excluded by default. | ||
- Shows fancy status overlay in-game (and provides audio feedback on status, just because). | ||
|
||
### Keys | ||
- WASD = Camera movement | ||
- M(ines) = Plant mines (requires engineers) | ||
- G(round) = Attack ground (requires tank) | ||
- T(ank) = Attack vehicles only (requires vehicle) | ||
- C(ancel) = Cancel current action | ||
- Q(uit) = Retreat forces | ||
- Z = Reverse move action (requires vehicle) | ||
- R(einforce) = Reinforce troops | ||
- F(ix) = Repair using engineers | ||
- \` = Map pointer (tilde) | ||
- \\ = Enable/disable | ||
- F1 = Enable/disable | ||
- F2 = Sends "Hey, what is the plan?" to team chat | ||
- F3 = Sends "GL HF!" to global chat | ||
Suggestions? Let me know using the issue tracker. | ||
|
||
### Download | ||
You can download the ready-to-run tool from the Releases page here: https://github.com/tamerciaga/coh2-rebinder/releases | ||
|
||
### Customization | ||
If you want to edit the script and customize it to your needs, you will need AHK. You can download it freely from: https://www.autohotkey.com/. | ||
The executable has been compiled using Ahk2Exe v1.1.31.01. | ||
|
||
### Changelog | ||
- 1.0 (04-11-2019) Initial release. | ||
|
||
### License | ||
MIT License |