Today's Marathon scenarios are more complex than ever before. Even some classic fan scenarios can take a long time to get used to. Levels are huge; objectives and secrets are legion. This script allows the player to place annotations directly on the overhead map in order to mark potential secrets, ammo caches, and places to revisit. While the functionality is limited, I believe that it will aid players who need a little help remembering where to go and what to do.
Also, as in recent examples like Marathon: Istoria, state can persist across levels, making that hub you visited three levels ago a bit harder to remember. Annotations created by this script persist along with the rest of the game state. In such scenarios, you should be able to drop markers where you please, when you please, and expect them to be there when you come back.
In case audio and video are easier for you to follow, the information in this file also exists in video form.
This section is for those who are unfamiliar with using Lua scripts in solo or network games. Skip ahead to Controls if you already know how to do this.
Setting annotations on the overhead map should be fairly easy. First, enter the overhead map. You should see a text overlay at the top of the map like the one below. For the purposes of this document, I am calling this overlay the Main Menu.
2: New 3: Edit 4: Delete 5: [!] 6: (*)
The overlay indicates which action will occur for each hotkey. The text before the colon character tells you the mapping for that hotkey. NOTE that the hotkey indicated here does not necessarily correspond to the annotation preset slot. Hotkeys are abbreviated so that you only see the first letter (or number) of each word. If you've assigned a hotkey to Right Shift, you'll see the abbreviation RS; Left Control becomes LC; and so on. This is meant to prevent the overlays from stomping all over each other, but it might create ambiguous abbreviations. I apologize if that happens, but you can hopefully memorize your hotkeys and call it a day. In the above example:
Be forewarned that any existing hotkey functionality that a scenario might use runs concurrently to the controls described above. Also, while I've done what I can to guarantee that you'll see be able to use this script in a wide array of circumstances, any other scenario Lua scripting could cause it not to work as expected, not to work at all, or to ruin your day. But it will probably be fine.
It is possible, but not convenient, to customize the preset strings that become annotations. There are limitations. First, short of modifying the Lua script yourself, you can only change the presets in single-player mode. Second, as with all annotations, there is a 64-character length limit. Third, you will need to type some cryptic commands in-game.
If you're still fixing to change the presets, make sure the Lua console is enabled for single-player mode. If you don't know how to do that, a convenient Console.mml exists in this download's extras directory. Place this script in the scenario's Scripts or MML directory. If neither exists, create one of them and put the Console.mml file in there.
Once you've started your solo game, bring up the Lua console by typing \. This will cause the console prompt (>) to appear the bottom of the gameplay window. The following is a transcript of multiple instances of using the console. It demonstrates:
Each new line indicates where you would press the Enter key.
>presets.reset() >presets.set(6, "Return w/chip") >presets.set(1, "SHOTGUN AMMO") >presets.clear(6)
Existing annotations are not updated to reflect the new preset text. In this way, you can periodically change the presets to update your current needs while retaining old ones in the form you expect.
Your changes should be saved across game save/restore and across levels in scenarios that implement level persistence. Unfortunately, it is not possible to store these new presets across saved games. For example, if you modify the presets, save the game, and then start a new game, the new game will have fallen back to the old presets. Loading the previous saved game will have saved your changes to the presets.
I would like to thank W'rkncacnter (Darren Watts) for the the game persistence portion of this script. This is almost a straight copy from his Istoria scripts.
If you wish to incorporate this script into your own work, be it a standalone script, a plugin, a scenario, etc., feel free to do so. I ask that you please give me credit with inline notes in the script, in whatever credits section your work's readme/manual has, or both.
First version. Persistent annotations, presets, and custom strings.