benilla-re systems structs docs

SetAddOnEnableState

function · ui · primitive

Address
0x51ea20 · 448 bytes, up to 0x51ebdf
Signature
void __fastcall (const char *name, const char *character, int state)
Meaning
Sets an add-on's enabled flag in a character's node, or every node's, marking a changed node
Confidence
verified, proof two
Finding
ui/addons#reading-the-enable-state

Finding: Reading the enable state in ui: add-ons

0x51e470(addon, character, fallback) answers 2 enabled, 1 mixed or 0 disabled from the nodes it considers: the named character's, or all for null. A node with an entry counts its flag. A node without one counts only with fallback: then the add-on's state over all nodes counts as enabled when it is 2, or when it is 1 and DefaultState is enabled. With nothing counted the answer is DefaultState, 2 or 0; otherwise 0 when none is enabled, 2 when all are, else 1. Setting a state creates or changes the entry and marks the node; the in-game EnableAddOn and DisableAddOn set 2 and 0 for the current character, and EnableAllAddOns and DisableAllAddOns for every add-on.

The derivation is in the doc.

Callers 8

Callees 8

Calls and jumps by a bare address, from tables/calls.tsv.