API:GameData.Player.GetAdvancePointsSpent
From RoR Wiki
UI Lua API · Career functions
Version: WAR 1.4.8
Returns, for each career advance category, the number of advance points the player has spent.
points = GameData.Player.GetAdvancePointsSpent()
Arguments
None.
Returns
- points
table– Table with the number keys 0 to 19, one per career advance category (GameData.CareerCategoryvalues). Each value is anumber.
Details
- Each value is the sum of the spent-points counts of the five tiers of that category.
- The keys start at 0, so
ipairs()skips the first category. Usepairs()or index the table with aGameData.CareerCategoryvalue. - For the renown categories, a comment in
ea_interactionwindow/source/interactionrenowntraining.luasays only the most recently updated category holds an accurate number, so the stock UI takes the highest value of the renown categories. - A new table is built on every call.
Errors
None.
Example
From ea_interactionwindow/source/interactionrenowntraining.lua:
local purchasedPoints = GameData.Player.GetAdvancePointsSpent()
local purchasedPointsMaximum = 0
for category = GameData.CareerCategory.RENOWN_STATS_A, GameData.CareerCategory.RENOWN_REALM
do
purchasedPointsMaximum = math.max(purchasedPointsMaximum, purchasedPoints[category])
end
