A little progress, but not much time for it.
Now that the hotkey cat is out of the bag, I think it's time for me to release these.
There is one very large flaw behind the hotkey effect that perpetual and I released -
The hotkeys that you assign persist even after the scenario ends
At worst, this will ruin the rest of the games this person plays in the same aom session, at best, it is inconsiderate. You can try to remap the hotkeys back to their original functions, but they may leave the scenario unexpectedly, or maybe they have custom hotkeys of their own.
Here is a partial solution to that problem.
Hotkeys can be mapped in certain "modes", the standard is "game" which means that key only works when you are in a game.
Some of the other modes are
"world" (everywhere)
"root" (everywhere except game)
"editor"
"patrol" (notice that a mouseclick does something different in patrol mode than it does in game mode)
"earthquake" (as far as I know, this has nothing to do with earthquake, and is an artifact of an older, unused system)
countless other game modes like build, repair, guard, special power, pretty much everything.
So this means you can map a hotkey for the editor, you can map a hotkey to only work when telling a unit to patrol, etc.
Why would you want to do that?
Because then the hotkey won't interfere with their regular gameplay.
Example: if you map Enter to fire a trigger, they play your scenario then go into supremacy, they will no longer be able to chat by hitting Enter.
But if you map enter to fire a trigger but only in patrol mode, the player will be able to chat from game mode, but not from patrol mode, and they will almost never be in patrol mode.
Here's the kicker, since earthquake mode is seemingly obsolete, the player will never enter that mode in a regular game, so hotkeys mapped in earthquake mode will not be seen again outside your scenario!
Of course, there is one little setback: you need to be in "earthquake" mode, and this does add a few limitations, and some regular game actions (telling villager to repair, build, or casting godpower) will eject you back into game mode. For an entirely hotkey-driven scenario, this is an ideal solution.
So here are two effects: One is Hotkey Event (mode) which looks familiar but has one extra parameter. If you use "game" for the mode, this will be the same as the old one. If you use "earthquake" for the mode, you eliminate the chances of ruining someones game later on.
The second effect is to enter/exit earthquake mode, which will essential enable/disable the earthquaked hotkeys. I do one extra little thing, which is map the mouse button so you can actually click in earthquake mode, because normally you can't. If there are any elements of regular gameplay in your scenario, you can expect that you will need to fire that earthquake mode trigger occasionally.
Depending on your scenario, you may be able to have periods of yes-hotkeys and periods of no-hotkeys so you can turn earthquake on and off, or maybe (like mine) you can leave it in earthquake for the entire game.
<Effect name="Hotkey Event (mode)">
<Param name="Hotkey" dispName="Hotkey" varType="string">arrowleft</Param>
<Param name="EventID" dispName="Trigger" varType="event">-1</Param>
<Param name="Mode" dispName="Game Mode" varType="string">game</Param>
<Command>map("%Hotkey%","%Mode%","trackInsert(); trackAddWaypoint();trackPlay(-1,%EventID%);");</Command>
</Effect>
<Effect name="editMode Earthquake">
<Param name="on" dispName="On or Off" varType="bool">true</Param>
<Command>if(%on%) {editMode("earthquake");</Command>
<Command>map("mouse1down", "earthquake", "uiSelectionButtonDown");</Command>
<Command>map("mouse1up", "earthquake", "uiSelectionButtonUp");</Command>
<Command>} else {editMode("none");}</Command>
</Effect>
Here's the tl;dr version.
Regular hotkeys persist after the game ends. If you map the hotkeys to an obscure game mode like earthquake, they won't interfere with other games.
Use editMode Earthquake to enter/exit earthquake mode, and Hotkey Event (mode) to map hotkeys in earthquake mode, and your hotkeys will not effect other games.
If you guys try this out and run into any weird side-effects of being in earthquake mode, let me know.
I've uploaded a 4-trigger demo scenario, pending approval.[This message has been edited by HailToTheOboe (edited 01-17-2010 @ 01:37 AM).]