[Request] Shortcut keys for Unit Upgrade and Escort

lifemare

Chieftain
Joined
Dec 14, 2011
Messages
21
Can anyone help me with the code for DefaultKeyUpHandler? I know i can use the UI.GetHeadSelectedUnit operation (thanks to @chaorace and his awesome CQUI) but i have no idea how to find the IDs for Unit Upgrade and Escort.
 
Thank you gyogen! That was very helpful.

I managed to get the Promotion shortcut working by using the simple LuaEvents.UnitPanel_PromoteUnit(); :D

I'm having a hard time however using the Formation code in a meaningful way. I'm guessing the correct function for this is:
Code:
UnitManager.RequestCommand( pSelectedUnit, UnitCommandTypes.ENTER_FORMATION, tParameters );
But i have no idea how to make this work.

Also, i forgot to mention in my OP, but i would also like to get a shortcut to Wake up fortified units. But the only code i found in UnitPanel is for refreshing icons:
Code:
SetUnitEntryStatusIcon(unitEntry, "ICON_DEFENSE");

Excuse this noob for stealing your attention from your own modding. Give me a chance to repay you if you ever find yourself needing a hand in the art department (my background is in Design).
:beer:
 
Hello, for anyone who is searching for ways how to get hotkeys for actions like pillage, upgrade unit, promote unit, form corps/army, create/exit escort, etc - I have created a mod named Extra Hotkeys, it is available in the steam workshop. You can also find sources there.
 
Last edited:
Back
Top Bottom