World

map

The current map, its layout, instances and markers.

Functions about the map layout take a map id and use the current map when it's left out.

local m = map.def()
print(m.name, m.id)

for _, wp in ipairs(map.pois()) do
    if wp.poi_type == map.POI_WAYPOINT then print(wp.name, wp.position) end
end

The current map

map.id()integer?
The current map's id.
map.def()MapDef?
The current map. See MapDef.
map.bounds()Vec2, Vec2
The terrain's corners, min and max.
The scene's corners.
How many terrain chunks there are, across and down.
The ground height of a terrain tile.
Travels to a waypoint, by its point of interest id.
Markers on the map: commanders, mentors, events. See Marker.

Map layout

Points of interest, waypoints and vistas: {id, poi_type, name, position, enabled, contested, completed}.
One point of interest.
Renown hearts: {id, name, level, progress_id, position, completed, completed_once}.
One heart.
Hero challenges: {uid, sector_id, sector_name, position, completed}.
One hero challenge.
Mastery insights: {id, sector_id, sector_name, position, completed}.
One mastery insight.
Where the map is on the world map.
Every map.

Instances

The map's instances, or with true the other ones: {id, map}.
Whether you can open a new instance.
The selected instance level.
Selects an instance level.
Joins an instance.
Creates an instance.
Leaves the instance.
Respawns at a waypoint.
Constants
TYPE_PVPTYPE_INSTANCEPOI_LANDMARKPOI_WAYPOINTPOI_VISTAPOI_OTHERMARKER_COMMANDERMARKER_MENTORMARKER_EVENT