tile_owner_faction_mask
Global of Kamidori Alchemy Meister: the cell G:0x508de, of type int[27x27], data-table, values bitmask per tile [ty][tx]: bit1 (2) player, bit2 (4) red, bit3 (8) green, bit4 (16) yellow faction.
Territory control. FIELD@0x68b zeroes it on fresh entry and sets 2 on tiles restored from stage_player_occupied_tile_bitmask (FIELD@0x7da) or all valid tiles at 100%. CALCOCC@0x9f..0x27c ORs the faction bits of units (unit faction 0x60cae) and owner objects (types 1..4) per room and, if a room has exactly one faction, paints all its tiles with that bit (and reveals them for the player). DRAWMAP@0x4ac and DRAWMINIMAP@0x193 colour tiles by the bit (blue/red/green/yellow); MVSEEK@0x390 and SETROUTE@0x162 test it against the mover's allied-faction mask 0x5340a.
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 |
|---|---|---|---|
FIELD | 0 | 0 | 11 |
CALCOCC | 0 | 0 | 5 |
DRAWMAP | 0 | 0 | 5 |
DRAWMINIMAP | 0 | 0 | 4 |
RTN_M013 | 0 | 0 | 2 |
FELLOW | 0 | 0 | 1 |
MVSEEK | 0 | 0 | 1 |
SETOCC | 0 | 0 | 1 |
SETROUTE | 0 | 0 | 1 |