Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetAreaData

From RoR Wiki
Revision as of 19:43, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Game functions
Version: WAR 1.4.8

Returns the map areas the player is currently in, with their influence ids.

areas = GetAreaData()

Arguments

None.

Returns

areas
table – Array of area tables, indexed from 1.

Each area table has these fields:

Key Type Meaning
areaName wstring Name of the area.
areaNumber number Area number.
areaID number Area id. Always equal to areaNumber in the result.
influenceID number Influence id of the area, or 0 if it has none. Use it with GetInfluenceData.
hasPQButNoInfluence boolean —

Details

  • The client skips areas whose area number and area id differ, so only entries where both match are returned.
  • If the zone tracker is not set up, or there is no player object, or the Lua state is not available, the function returns nothing. The stock UI checks the result for nil.

Errors

None.

Example

Finding the influence id of the current area, from ea_objectivetrackers/source/publicquesttrackerwindow.lua:

local areaData = GetAreaData()

if( areaData == nil )
then
    return nil, false
end

local hasPQButNoInfluence = false
for key, value in ipairs( areaData )
do
    if (value.influenceID ~= 0)
    then
        -- Return whatever value.hasPQButNoInfluence is
        return value.influenceID, value.hasPQButNoInfluence
    elseif( value.hasPQButNoInfluence )
    then
        hasPQButNoInfluence = true
    end
end

See also