This is my first time working with HKI
and HKP
files so there might be mistakes in my assumptions.
That being said, the file format shown below definitely is correct.
Please place a comment below if you find any issues regarding these notes.
For information about the exact hotkey distribution, see my other gist.
This document explains the 'new' .hkp
format introduced in update 83607.
To explain the differences in the format I'll cover the 'old' structure (.hki
files) here too.
You're here just for the changes, makes sense. There's only a couple:
There's two files now, for specifics see: HKP file paths.
The tag <profile>
in <profile>/Base.hkp
or <profile>.hkp
refer to the name of the hotkey profile.
These paths are relative from the profile folder where the .hki
files reside too.
This file is the same as the 'old' hki
format.
For the <profile>/Base.hkp
or <profile>/Pompeii.hkp
(RoR DLC) the following changes apply:
In the main struct
of the file:
Between the fields version (uint32)
and number_of_menus (uint32)
add the following:
base_menus (HkiMenu)
hardcoded torepeat=3
For a quick overview of the new HKP structure, see Struct: HkpFile (Base.hkp).
The hki
format contained a single file, which was stored in the following location:
C:\Users\<user>\Games\Age of Empires 2 DE\<steam-id>\profile\<hotkey-profile-name>.hki
There's three structs in this file, they're documented below:
Main struct, covering the entirety of the hki
file.
Name | Type | Repeat | Description |
---|---|---|---|
version | uint32 |
1x | The version of the file. Latest: 0x40400000 |
number_of_menus | uint32 |
1x | The amount of menus in this file (see HkiMenu struct) |
menus | HkiMenu |
number_of_menus |
The hotkey menus |
A single menu in the file containing a set of hotkeys.
A single menu corresponds to a single tab in the hotkey menu in the game.
Name | Type | Repeat | Description |
---|---|---|---|
number_of_hotkeys | uint32 |
1x | The amount of hotkeys in this menu (see HkiHotkey struct) |
hotkeys | HkiHotkey |
number_of_hotkeys |
The hotkeys in this menu |
A single hotkey for a singular action.
Name | Type | Repeat | Description |
---|---|---|---|
key | int32 |
1x | The keycode of the hotkey (mostly the same as ASCII, except for mouse (wheel) hotkeys) |
string_id | int32 |
1x | The string ID of the name of the hotkey field from the key-value-strings-utf8.txt file |
ctrl | int8 |
1x | If the ctrl modifier is set for this hotkey |
alt | int8 |
1x | If the alt modifier is set for this hotkey |
shift | int8 |
1x | If the shift modifier is set for this hotkey |
'mouse' | int8 |
1x | -Unsure- |
The latest <profile>.hki
file contains 409
hotkeys over 24
menus.
With the hkp
format, there are now two files instead of one, these are stored in the following locations:
C:\Users\<user>\Games\Age of Empires 2 DE\<steam-id>\profile\<hotkey-profile-name>.hkp
C:\Users\<user>\Games\Age of Empires 2 DE\<steam-id>\profile\<hotkey-profile-name>\Base.hkp
If you own the RoR
DLC you'll have a third hkp
file located next to the Base.hkp
at:
C:\Users\<user>\Games\Age of Empires 2 DE\<steam-id>\profile\<hotkey-profile-name>\Pompeii.hkp
Main struct, covering the entirety of the <profile>/Base.hkp
& <profile>/Pompeii.hkp
file.
Name | Type | Repeat | Description |
---|---|---|---|
version | uint32 |
1x | The version of the file. Latest: 0x86406666 |
base_menus | HkpMenu |
3x | Base hotkey menus |
number_of_menus | uint32 |
1x | The amount of menus in this file (see HkpMenu struct) |
menus | HkpMenu |
number_of_menus |
The hotkey menus |
This struct has not changed since the hki
file format
See: HkiMenu
This struct has not changed since the hki
file format
See: HkiHotkey
The new hkp
files contain:
-
<profile>/Base.hkp
:212
hotkeys over18
menus -
<profile>.hkp
:188
hotkeys over9
menus -
<profile>/Pompeii.hkp
:146
hotkeys over16
menus -
Combined for the base game:
400
hotkeys over27
menus -
Combined for the RoR game:
334
hotkeys over25
menus
These changes I happened to stumble upon, there's probably more.
- With
HKI
the flare hotkey used to use the19289 "Flare"
string ID - With
HKP
the flare hotkey uses the19235 "Flare"
string ID
In both the hki
and the hkp
file are duplicates (hotkeys you can set on two keys at once):
19023
: Go to Next Idle Villager19024
: Go to Last Notification19068
: Go to Next Idle Military Unit19026
: Go to Town Center19153
: Toggle Idle Pointers *
*: On the HKI
format, the "Toggle Idle Pointers" hotkey also appeared twice even though it doesn't appear twice in the menus in game.
This has been 'fixed' with the HKP format.
How to view and edit .hkp files?