Skip to content

GetAttribute

Read attribute from current game state.

GetAttribute(attribute)

Inputs: attribute is an integer attribute ID.

Output: Assigned-player native attribute value, or nil when unavailable (including the ambiguous native -1 error sentinel).

Errors and unavailable states: Wrong argument types can raise a Lua argument error. If available is false, ignore the first return value; it is not a confirmed result.

See Game data and world for related calls and usage notes.