Welcome to Age of Mythology Heaven
Downloads Home
Review Guidelines
Main site
Code of Conduct

Advanced Search
Design Hints, Tips, and Tutorials
New Releases
New Reviews
New Comments

Submit File
Browse Categories
New Files

Downloads Home » Design Hints, Tips, and Tutorials » Hotkey triggers (with game modes)

Download File Post Review Post Comment

Hotkey triggers (with game modes)

Author File Description
File Details
Version: AoM
Now that the hotkey cat is out of the bag, I think it's time for me to release these.

Contains: 1 text file with the trigger code. Add these to yout typetest.xml (or other trigger file) in your trigger or trigger2 folder. It contains the following 2 effects.
  • editMode earthquake
  • Hotkey Event (mode)

    1 tiny scenario to demonstrate the use of these effects, with 4 triggers.
    Press the left arrow to send a chat message. Press F1 to exit earthquake mode, and notice that left arrow goes back to moving the camera.
    Press F2 to enter earthquake mode again, and see that the left arrow hotkey works again.
    Using godpowers, or telling the villager to build will exit earthquake mode, but you can enter again with F2.

    There is one very large flaw behind the previous 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 Rocmaninov) you can leave it in earthquake for the entire game.

    major credit for understanding hotkeys goes to Mythic Freak, invent00r, and nottud.
  • AuthorComments & Reviews   ( All | Comments Only | Reviews Only )
    lostrozzacavalli Ahah that's cool Oboe, exactly in these days I become intrested to multiplayer hotkeys and I guess this pack will be useful, I needed a lot of XS codes before :)

    @EDIT: Oh, I downloaded the pack but I think I misunderstood you, these are only useful for singleplayer hotkeys, I think I might do a pack about multiplayer ones, but then I should give it to nottud as he did the real work to do those :)

    Anyway, thank you for your work and for explain the hotkeys which are a beautiful part of making a scenario and which almost no one knows ;)

    [Edited on 01/17/10 @ 04:48 AM]

    perpetual_n00b Excellent work as usual Oboe. I was wondering when you would release these.
    xEXOLARx yeah i already have yes and no hotkeys for my nazi zombies, im puttin it for my rpg aswell
    o0_Drago_0o Hmm, usefull but could someone make these triggers for multiplayer please?!

    PS: Good work man !!!
    Zenophobia can you make a version in xml? because for some reason i can't edit my typetest

    Post Review Post Comment

    HGDL v0.8.1

    Forum Username:


    Create a new account
    Forgot password?
    Favorites: [Who?]0
    Size:32.36 KB
    Recently Updated