calc_item_gem_socket_count
Global of Kamidori Alchemy Meister: the cell G:0x2a9b88, of type int, data-table, values 0..4.
CALCARM@0x001dd counts type-3 enhancements and clamps the total to 4. CALCARM@0x0020c loops over that many sockets.
OME’s registry gives it with high confidence, from investigation. The base mod kamidori-base exports the name, so Lua and an event’s fields can use it.
Scripts that use it
The game’s scripts whose instructions read, write or index (take as an array’s base) the cell, with how many of their operands do each, from OME’s script index.
| Script | Reads | Writes | Indexes |
|---|---|---|---|
CALCARM | 3 | 3 | 0 |
ENHANCE | 2 | 0 | 0 |