Skip to content

Maps system

Manage @map labels that define discoverable map waypoints and regions.

Overview

Map labels are declared in MAST with the @map/path/name "Display" syntax. They appear as markers on the navigation or sector map and can be discovered, hidden, or updated by the mission. The maps module provides the procedural API for interacting with registered map labels at runtime.

map_get retrieves a registered map label by path. map_schedule runs the label as a task (typically to update the map marker's state). Use the //focus/grid route to react when players click on map markers.

Quick example

@map/waypoints/alpha "Waypoint Alpha"
@map/waypoints/beta "Waypoint Beta"

== reveal_waypoints ==
map_schedule("waypoints/alpha")
map_schedule("waypoints/beta")
== waypoints/alpha ==
set_map_pos(5000, 0, 3000)
from sbs_utils.procedural.maps import map_get, map_schedule

# Activate a map marker
map_schedule("waypoints/alpha")

# Get the label object
label = map_get("waypoints/alpha")

API

map_get_properties(map)

Return the Properties inventory value of a map label.

Checks "Properties" first, then "properties" as a fallback.

Parameters:

Name Type Description Default
map Label

The map label object.

required

Returns:

Name Type Description
any

The properties value, or None if not set.

maps_get_init()

Return the __overview__ map label from the current MAST story, or None.

Returns:

Type Description

Label | None: The overview map label, or None if not defined.

maps_get_list()

Return all @map labels defined in the current page's story.

If only an __overview__ label exists, it is returned as a single-item list. If no map labels are found at all, returns a placeholder list with a "No maps found" entry.

Returns:

Name Type Description
list

@map Label objects, or a fallback list if none are defined.