Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GameData.Player.GetAdvanceData

From RoR Wiki

UI Lua API · Career functions
Version: WAR 1.4.8

Returns the player's career advances (abilities, mastery points, renown and tome rewards) with their costs, requirements and purchase counts.

advances = GameData.Player.GetAdvanceData()

Arguments

None.

Returns

advances
table – Array of advance tables, indexed from 1.

Each advance table has these fields:

Key Type Meaning
advanceName wstring Name of the advance. The stock UI shows it for advances without abilityInfo.
advanceType number Type of the advance. Advances of type 2 have an abilityInfo table.
advanceValue number –
advanceID number Advance id. The stock UI looks up its description with GetStringFromTable("PackageDescriptions", advanceID).
advanceIcon number Icon id for GetIconData.
category number Career advance category, 0–19. Compared with GameData.CareerCategory values.
tier number Tier inside the category, 0–4.
packageId number Package id. Passed to BuyCareerPackage together with tier and category.
timesPurchased number How many times the advance has been bought.
maximumPurchaseCount number –
minimumRank number Required character rank. The stock UI compares it with GameData.Player.level.
minimumRenown number Required renown rank. The stock UI compares it with GameData.Player.Renown.curRank.
minimumCategoryPoints number –
cashCost number Price in money. The stock UI shows it with MoneyFrame.FormatMoney.
pointCost number Point cost. The stock renown training window shows it as the renown point cost.
requiredTomeEntryID number –
requiredActionCounterID number –
requiredActionCounterCount number –
dependencies table Table of number keys to number values. The stock UI reads each pair as a required package and the amount needed (InteractionUtils.GetDependentPackage).
abilityInfo table Only for advances of type 2. An ability data table for the ability the advance grants, plus the field isPurchased (boolean), which the stock UI treats as "the player already has this ability" (InteractionUtils.HasAbilityFilter).

Details

  • Advances are listed category by category (0 to 19), and inside each category tier by tier (0 to 4).
  • isPurchased is true when the client finds the ability among the player's abilities.
  • abilityInfo does not contain the isActive field that GetAbilityData adds.
  • A new table is built on every call. The stock training windows call it when they refresh and keep the result.

Errors

None.

Example

From ea_interactionwindow/source/interactioncoretraining.lua:

EA_Window_InteractionCoreTraining.advanceData = GameData.Player.GetAdvanceData()

Choosing the label text, from the same file:

if (advanceData.abilityInfo == nil)
then
    LabelSetText( labelFrame, GetStringFormatFromTable("TrainingStrings", StringTables.Training.LABEL_CORE_TRAINING_ABILITY_NAME_FORMAT, {advanceData.advanceName}) )
else
    LabelSetText( labelFrame, GetStringFormatFromTable("TrainingStrings", StringTables.Training.LABEL_CORE_TRAINING_ABILITY_NAME_FORMAT, {advanceData.abilityInfo.name}) )

See also