benilla-re systems structs docs

s_currencyMultipliers

global · unassigned

Address
0xce86c4 · 12 bytes, up to 0xce86cf
Type
uint32_t[3]
Meaning
Holds the copper value of copper, silver and gold, 1, 100 and 10000 once LootInitialize runs
Confidence
verified, proof one
Finding
ui/loot#coin-row-text

Finding: Coin row text in ui: the loot window

GetLootRowName (0x4c2550) names the coin row while the money is above 0. SplitCopper splits it into gold, silver and copper, and each part above 0, gold first, becomes %d %s%s of its count, the global text of its key (GOLD, SILVER or COPPER, from 0x6c6230) cut to 31 bytes, and \n after gold and silver, nothing after copper. The first part is formatted into the output and each later one appended with SStrPack, both bounded by the caller's size. SplitCopper(n) divides by 10000, then by 100, each time the remainder at least the divisor, else that part is 0; copper is what is left. 0x6c6230(i) returns the key COPPER, SILVER or GOLD for 0, 1 or 2, else ERROR_CAPS.

The derivation is in the doc.