How to set hotkeys for non-generic units

I made a scenario where you can train the Heavy Pikeman, a non-genaric unit. The thing is there is no hotkey for that unit, even though I disable the generic spear/pikeman unit.

Modify Attribute - choose Attribute - Hotkey ID

If you don’t know what ID to fill, use AGE and refer to some units with the same Hotkey button, and copy their hotkey ID.

Thanx, but I can’t get AGE to work. Don’t know why. Everytime I try to start it, it closes. Do you happen to know which is the hotkey for the second unit? The one with the W button?

While you are using AGE before loading the game dat, in the ‘Open files’ page, select ‘AOE2DE’ in ‘Genie Version’, so the AGE will not automatically close.

I am not sure what second unit means, if you use default DE hotkeys, spearman, mangonel, trebuchet, skrimisher are using the hotkey W.

Yes. Age of Empires 2 DE is what I chose and it always closes.
When I say second unit, I mean the one that needs W to be clicked.

Ok, so I managed to make it work, but no matter what hotkey ID is put, I can’t seem to make it work.