floor_occupation_percent_by_faction
Global of Kamidori Alchemy Meister: the cell G:0x4fde0, of type int[5], counter, values [0] = unowned %, [1..4] = % of non-void tiles held by faction 1..4.
CALCOCC@0x39e resets it to [100,0,0,0,0], counts tile_owner_faction_mask bits over all tiles with nonzero visibility class into 0x2a2d5e[5], then sets [k] = 100*count/total and subtracts from [0]; rounding remainder is redistributed. FIELD@0xc7ac/0xc807 stores [1] (player) into stage_occupation_percent.
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 |
|---|---|---|---|
CALCOCC | 3 | 1 | 7 |
SETSTAGEFLAG | 6 | 0 | 0 |
DRAWCHP | 2 | 0 | 3 |
STAGECLOSE | 3 | 0 | 0 |
STAGEROUND | 3 | 0 | 0 |
$3$SETSTAGEFLAG | 2 | 0 | 0 |
$3$STAGECLOSE | 2 | 0 | 0 |
$3$STAGEROUND | 2 | 0 | 0 |
FIELD | 2 | 0 | 0 |
SCJUMP | 1 | 0 | 0 |