Gameplay Raw POIs
Extension that manages raw Point of Interest (POI) lists used by the bigmap/minimap. Aggregates POIs from all gameplay systems (missions, facilities, gas stations) with special handling for career tut
Extension that manages raw Point of Interest (POI) lists used by the bigmap/minimap. Aggregates POIs from all gameplay systems (missions, facilities, gas stations) with special handling for career tutorial flow.
Public API
| Function | Signature | Returns | Description |
|---|---|---|---|
getRawPoiListByLevel | (levelIdentifier) | elements, generation | Get POI list for a level |
getRawPoiGeneration | () | number | Current cache generation counter |
clear | () | nil | Invalidate all cached POI lists |
Hooks
| Hook | Purpose |
|---|---|
showMissionMarkersToggled | Clears cache (same as clear) |
onModManagerReady | Clears cache |
Internals
rawPoiListByLevel: Cache of POI arrays keyed by level identifierrawPoiGeneration: Increments on each cache clear, used by consumers to detect stale data
How It Works
getRawPoiListByLevelchecks if a cached list exists for the level- If not cached, calls
extensions.hook("onGetRawPoiListForLevel")to collect POIs from all extensions - Each POI element is validated and defaults
bigmapMarker.cluster = true - Test drive POIs are filtered out unless it's the test drive end marker
Career Tutorial Flow (west_coast_usa)
During the linear tutorial, POIs are restricted to guide the player:
| Tutorial Stage | POIs Shown |
|---|---|
| Before arriving at fuel station | Gas station "apex" only |
| Before tutorial mission | Tutorial arrive mission only |
| Before first car purchase | Dealership + inspect vehicle POI |
| Before first car modification | Service station garage computer |
| Car not yet bought (general) | Dealership + inspect vehicle |
M.clear | () |
M.getRawPoiGeneration | () |
M.getRawPoiListByLevel | (levelIdentifier) |
M.onModManagerReady | value |
M.showMissionMarkersToggled | value |
-- Get POIs for current level
local pois, gen = gameplay_rawPois.getRawPoiListByLevel("west_coast_usa")
for _, poi in ipairs(pois) do
-- poi.data.id or poi.data.missionId
-- poi.markerInfo.bigmapMarker
-- poi.clusterType
end
-- Force refresh
gameplay_rawPois.clear()Dependencies
career_career- check career active statecareer_modules_linearTutorial- tutorial flag checksfreeroam_facilities- facility/dealership/gas station datafreeroam_gasStations- gas station POI formattinggameplay_missions_missions- mission POI formattingcareer_modules_inspectVehicle- vehicle inspection POIcareer_modules_testDrive- test drive filtering
Notes
- POI elements must have
data(withidormissionId) andclusterTypefields - Invalid elements are logged and discarded via
validateRawPoiElement - Generation counter allows consumers to efficiently detect when to refresh
See Also
- Gameplay Achievement - Related reference
- Gameplay City - Related reference
- discover - Discover / Experience System - Related reference
- Gameplay Systems Guide - Guide
Gameplay Rally Loop
Extension (`gameplay_rallyLoop`) that manages rally loop gameplay - a looping multi-stage rally system. Wraps a `RallyLoopManager` and handles lifecycle, UI streaming, debug toolbox, and mission trans
Gameplay Skidpad Test
Simple extension that runs an automated skidpad test - teleports a vehicle to a spawn point and has the AI drive a circular route.