This is an old revision of the document!
Chests
Overview
When the player faces a specific coordinate and press the A button, an event is actived. Generally, the coordinate has a chest tile and the actived event gives an item.
Offsets
Description | Value |
---|---|
Base offset (SNES) | $ED82F4 |
Block size | $02 |
Number of blocks | $01A0 |
Total size | $0340 |
The structure is a sequence of two-byte pointers. The index of the pointer is relative to the map number.
The actual offset of the appointed data is the pointer value plus $ED8634. Unlike other similar structures, the pointers are relative to the end of the structure instead of its base offset.
The game system checks the actual pointer and the next pointer to determinate the amount of data to read. It can include multiple data blocks.
Data
Offset | Description | |
---|---|---|
$00 | x position | |
$01 | y position | |
$02 | chest identifier | |
$03 | chest type | |
$00 | Empty | |
$10 | Gold | |
$20 | Monster-in-a-box (MiaB) | |
$40 | Item | |
$04 | chest content (depending on type) | |
Empty | $00 | |
Item | Item index | |
Gold | Value * 100 | |
MiaB | Monster formation |
Notes
If the coordinate has a closed chest tile, the tile will be changed as a opened chest after the event is triggered. Otherwise, the tile isn't changed.