API:GameData.Player.GetAdvancePointsAvailable
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 available.
points = GameData.Player.GetAdvancePointsAvailable()
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 available-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. - A new table is built on every call.
Errors
None.
Example
From ea_interactionwindow/source/interactionspecialtytraining.lua:
local pointsTotal = GameData.Player.GetAdvancePointsAvailable()[GameData.CareerCategory.SPECIALIZATION]
Showing the advancement arrow, from ea_playerstatuswindow/source/playerwindow.lua:
local pointsData = GameData.Player.GetAdvancePointsAvailable()
for index, pointsLeft in pairs(pointsData) do
if pointsLeft > 0 then
showNag = true
break
end
end
