stage_object
Record table of Himegari Dungeon Meister, records 0 to 49, 11 fields.
The current stage's map objects, slots 1 to 49: SETOBJ, DRAWOBJ and FIELD walk 1 to 49, and no stage writes slot 0. STINIT, the stage loader FIELD calls (FIELD@0x200), zeroes all 50 slots of each array (STINIT@0x0-0x4f) and writes the stage's: 2,312 objects on its 66 map stages. $1$STINIT does the same for stages 200 to 203. A slot's type is an object_type record, and its two payloads mean what the type makes them (FIELD@0x5574): a base's or pillar's first owner (1 to 4), a teleporter's destination tile (6, 36), a chest's or treasure's item and count (7, 8), a hazard's owner (17 to 25), a card's generation list (28). A data file reaches it through the stage scope; the saved use counts and runtime state are kept by slot, so a slot that changes type keeps them.
The game builds it when a stage loads, so a data file reaches it through the scope stage (ids 1 to 999): record r of stage id is [stage.id.object.r], and a field stage.id.object.r.field.
The scope stage: A stage, by current_stage_id. STINIT's stages are 1 to 170, and the per-stage arrays hold 1,000 (stage_loader_script_ids). himegari-base applies a scoped table at himegari.stage.loaded, whose stage is the id.
The database lists it: each of the stages lists its treasures.
Fields
Each field is a global, one cell per record, named under the field. The last column is what a data file may write to it, as the base mod himegari-base’s shape says.
| Field and its global | Type | Refers to | In a data file |
|---|---|---|---|
tile_xstage_object_tile_x | int[50] | — | yes: a whole number |
tile_ystage_object_tile_y | int[50] | — | yes: a whole number |
type_idstage_object_type_id | int[50] | item | yes: a whole number |
primary_payloadstage_object_primary_payload | int[50] | — | yes: a whole number |
secondary_payloadstage_object_secondary_payload | int[50] | — | yes: a whole number |
reinforcement_interval_turnsstage_object_reinforcement_interval_turns | int[50] | — | yes: a whole number |
reinforcement_spawn_limitstage_object_reinforcement_spawn_limit | int[50] | — | yes: a whole number |
difficulty_maskstage_object_difficulty_mask | int[50] | — | yes: a whole number |
required_story_flagsstage_object_required_story_flags | int[50][7] | — | yes: a row of 7 columns by name; write required_story_flags.<column> = ... |
forbidden_story_flagsstage_object_forbidden_story_flags | int[50][5] | — | yes: a row of 5 columns by name; write forbidden_story_flags.<column> = ... |
use_story_flag_idstage_object_use_story_flag_ids | int[50] | — | yes: a whole number |