Altered Nadeo - Random Map Picker
The "Altered Nadeo - Random Map Picker" is a plugin that allows players to load a variety of custom maps from a selected pool. By fetching map data from a specified file (soon maybe an API) and constructing a URL, we can call the Nadeo live services API. This plugin randomly selects and loads different maps based on their UID. Hopefully, it's used by at least one person; niche plugin go brrrr...
Exports
The plugin provides several functions that are accessible for external use:
-
AN::GetARandomAltMapUid()
- Description: Returns a random map UID from the Altered Nadeo map data pool and returns it.
- Return Type:
string
- Example:
rEP0VJXacIby1NEYT68pjKwN8va
-
AN::GetARandomAltMapStorageObject()
- Description: Fetches a random map URL from the Altered Nadeo map data pool and returns it.
- Return Type:
string
- Example:
https://core.trackmania.nadeo.live/storageObjects/a831d6be-0bf9-4afa-b15f-784a7db7097e
-
AN::GetUserSettings()
- Description: Retrieves a Json::Value object containing all user settings related to the alterations/seasons/scores applicable to the maps. This includes settings for different scores, surfaces, effects, finish locations, environments, and other alterations.
- Return Type:
Json::Value
- Example: https://pastebin.com/waZxFj16
-
AN::SetSeason(string season, bool shouldUse)
- Description: Enables or disables maps from being picked for a specific season. For example, setting
shouldUse
to true for "Spring 2020" will enable maps from that season/year.
- Parameters:
- season: The season for which the maps should be enabled/disabled.
- Example:
Spring 2021
, Winter 2023
- shouldUse: A boolean flag to enable or disable the selection of maps from the specified season.
- Return Type:
void
- Note: The inputs are case insensitive.
-
AN::SetAlteration(string alteration, bool shouldUse)
- Description: Allows enabling or disabling specific map alterations. If
shouldUse
is set to true, the specified alteration is applied to the map selection criteria.
- Parameters:
- alteration: The alteration to be enabled or disabled.
- Example:
Stunt
, Wet Icy Wood
.
- NOTE: If you do not know how what an alteration is called internally, here is a link to the GH page with the most up to date reference sheet. Alteration Names (the name can be found inside of the
""
, inside the MatchesAlterationSettings()
function.
- shouldUse: A boolean flag indicating whether the alteration should be applied.
- Return Type:
void
- Note: The inputs are case insensitive.
-
AN::SetFullSeason(string fullSeason, bool shouldUse)
- Description: Enables or disables all maps from an entire season (e.g., all winter maps) based on the
shouldUse
parameter.
- Parameters:
- fullSeason: The full season (like "Winter" or "Spring") for which maps should be enabled/disabled.
- Example:
Summer
, Spring
, Winter
, Fall
- shouldUse: A boolean to enable or disable map selections for the specified full season.
- Return Type:
void
NOTE: versions before 3.0.0 have old references to the export functions, they need to include AN:: before any function call.