Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetInspectionData

From RoR Wiki
Revision as of 19:44, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Social functions
Version: WAR 1.4.8

Returns the equipped items and trophies of the player being inspected.

items = GetInspectionData()

Arguments

None.

Returns

items
table – Array of 25 item data tables, indexed from 1.

Details

  • Entries 1–20 are the equipment slots, indexed like GameData.EquipSlots. Entries 21–25 are the trophy slots. The stock inspection window reads them this way.
  • The table always has 25 entries. An empty slot gets a blank item table (iconNum and uniqueID 0).
  • The data is the client's copy of the last inspection result. Use SendPlayerInspectionRequest to ask the server for it.
  • 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.

Errors

None.

Example

From default/ea_inspectionwindow/source/inspectionwindow.lua:

EA_Window_Inspection.equipmentData = GetInspectionData()
for equipmentData, slot in pairs(GameData.EquipSlots) do
    local found = false
    if( EA_Window_Inspection.equipmentData[slot].iconNum ~= 0 )
    then
        texture, x, y = GetIconData( EA_Window_Inspection.equipmentData[slot].iconNum )
        ...

Trophies follow the 20 equipment slots, from the same file:

local trophyData = EA_Window_Inspection.equipmentData[slot+EA_Window_Inspection.NUM_EQUIPMENT_SLOTS]

See also