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
endThe current map
map.id()integer?
The current map's id.
map.bounds()Vec2, Vec2
The terrain's corners, min and max.
map.scene_bounds()Vec3, Vec3
The scene's corners.
map.terrain_chunk_count()integer, integer
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.
map.markers()Marker[]
Markers on the map: commanders, mentors, events. See Marker.
Map layout
map.pois([map_id])table[]?
Points of interest, waypoints and vistas:
{id, poi_type, name, position, enabled, contested, completed}.map.poi(id_or_name)table?
One point of interest.
map.tasks([map_id])table[]?
Renown hearts:
{id, name, level, progress_id, position, completed, completed_once}.map.task(id)table?
One heart.
map.hero_points([map_id])table[]?
Hero challenges:
{uid, sector_id, sector_name, position, completed}.map.hero_point(id)table?
One hero challenge.
map.mastery_insights([map_id])table[]?
Mastery insights:
{id, sector_id, sector_name, position, completed}.map.mastery_insight(id)table?
One mastery insight.
map.world_map_bounds([map_id])Vec2, Vec2
Where the map is on the world map.
map.find_map_def(map_id)MapDef?
Any map.
map.map_defs()MapDef[]?
Every map.
Instances
map.instances([others])table[]?
The map's instances, or with
true the other ones: {id, map}.map.can_create_instance()boolean
Whether you can open a new instance.
map.instance_level()integer?
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