Contents

Introduction

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.

Usage

Setup

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.

  1. Place the Lua script (a file called Annotations v1.0.lua) somewhere you can easily access from the Aleph One interface. Do not place it in the Scripts or MML folders in your Aleph One directory.
  2. Start Aleph One.
  3. Single-Player
    1. Select Preferences from the main menu.
    2. Select the Environment section of the preferences menu.
    3. Under the Solo Script section, check the Use Solo Script box.
    4. Click on the field next to Script File and navigate to the script, then click on it.
    5. Once back at the Environment Settings screen, click the Accept button.
    6. Start a new game or continue a saved one as usual.
  4. Multi-Player (Co-Operative)
    1. Select Gather Network Game from the main menu.
    2. Under the Net Script section, check the Use Netscript box.
    3. Choose the script by navigating to it and clicking on it.
  5. Make sure hotkeys 2 – 7 are set up to your liking in Preferences/Controls. I believe the default setup assigns hotkeys 1 – 9 to the number row on the keyboard.

Controls

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:

2: New
Indicates that you can create a new annotation using one of six presets. Press the hotkey (keyboard key 2 in my case) in order to show the list of presets. Each of these will also correspond to a hotkey. Pressing that hotkey will allow you to create the annotation. After you make your choice, you will return to the Main Menu.
3: Edit
Indicates that you can change the text of the closest existing annotations to one of six presets. The annotation must be within 4 of the engine's world units to be eligible. This annotation will flash on the overhead map, and you will enter a menu of presets identical to the one in the New menu (above). In this case, your choice will change the text of the flashing annotation to the selected preset instead of creating a new one. After you make your choice, you will return to the Main Menu. If there is no eligible annotation, you will remain at the Main Menu.
4: Delete
Indicates that you can delete the closest existing annotation. As with editing an annotation, the one you wish to delete must be within 4 engine world units. The selected annotation will flash on the overhead map and you will be prompted to press a hotkey to Confirm or Cancel the deletion. Canceling the deletion brings you back to the main menu without deleting the annotation. Confirming it deletes the annotation and brings you back to the Main Menu.
5: [!]
6: (*)
Indicates that you can quickly create a new annotation using either of the first two preset slots. This is a little faster than using the New menu. My example shows the default presets, but in the event that you set up your own, you will see that text here. After creating a new annotation in this way, you remain at the Main Menu.

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.

Customizing

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:

  1. Resetting all presets back to their script default values
  2. Changing the last preset slot to the string Return w/chip
  3. Changing the first preset slot to the string SHOTGUN AMMO
  4. Resetting only the last preset slot to its script default value

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.

Credits and Derivative Works

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.

Changelog

2024-03-22: v1.0

First version. Persistent annotations, presets, and custom strings.