API:GetExperienceData
From RoR Wiki
UI Lua API · Game functions
Version: WAR 1.4.8
Returns a table of rank point data. The table is built incorrectly by the client; see Details.
data = GetExperienceData()
Arguments
None.
Returns
- data
table– Array of 4 entries, indexed from 1 to 4. Each entry has aranktable.
Structure:
| Key | Type | Meaning |
|---|---|---|
data[i].rank |
table |
Array of 10 entries, indexed from 1 to 10. |
data[i].rank[r].point |
table |
Array of 4 entries, indexed from 1 to 4. |
data[i].rank[r].point[p].type |
number |
— |
data[i].rank[r].point[p].xpNeeded |
number |
— |
Details
- The client reads 40 rank records. It writes record
n(0–39) torank[(n % 10) + 1], creating a new table each time, so only the last 10 records (31–40) survive in the result. - The four top-level entries are filled from the same data, so they are identical.
- If the client's influence data is not loaded, or the Lua state is not available, the function returns nothing.
- The stock UI never calls this function.
Errors
None.
Example
A minimal example built from the signature:
local data = GetExperienceData()
if data then
local xp = data[1].rank[1].point[1].xpNeeded
end
