Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetInfluenceData

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Returns the player's progress in every influence chapter (the influence bars of public quests and chapters).

influence = GetInfluenceData()

Arguments

None.

Returns

influence
table – Table keyed by influence id. It is not a sequence: use pairs or index it with an id.

Each entry has these fields:

Key Type Meaning
curValue number Influence earned so far.
npcName wstring NPC name.
zoneNum number Zone id.
zoneAreaNum number Area id within the zone.
isRvRInfluence boolean true for RvR influence.
tomeSection number Tome of Knowledge section.
tomeEntry number Tome of Knowledge entry.
rewardLevel table Array of 3 tables, one per reward tier, each with amountNeeded (number) and rewardsRecieved (boolean).

Details

  • The key rewardsRecieved is spelled this way in the client.
  • If there is no player object, or the Lua state is not available, the function returns nothing.
  • A new table is built on every call. The stock UI caches it in DataUtils.GetAllInfluenceData() (easystem_utils/source/datautils.lua) and rebuilds it only when GameData.Player.influenceDataDirty is set.

Errors

None.

Example

From easystem_utils/source/datautils.lua:

function DataUtils.GetAllInfluenceData()
    if( GameData.Player.influenceDataDirty )
    then
        DataUtilsData.influenceData = GetInfluenceData()
        GameData.Player.influenceDataDirty = false
    end
    return DataUtilsData.influenceData
end

From ea_interactionwindow/source/interactioninfluencerewards.lua:

local hasPurchased = influenceData.rewardLevel[rewardLevel].rewardsRecieved

See also