Chest Information

From Terranigma Wiki
Revision as of 10:41, 11 April 2012 by Crediar (talk | contribs) (Created page with "Chest data is stored at 0x19E14C with a entry table at 0x19D8A0. == Entry table == This isn't a simple table where each chest has a global ID and has its own entry, but inste...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Chest data is stored at 0x19E14C with a entry table at 0x19D8A0.

Entry table

This isn't a simple table where each chest has a global ID and has its own entry, but instead this works via the room ID.

You simply do this to get to the chest data for a certain room.

[ RoomID * 2 + 0x19D8A0 ] OR 0x190000

Chest entry format

Data is parsed until it hits 0xFF.

Note: Changing the position of the chests will not update the map and will make them unuseable, you can switch chests with each other though.

Offset Length (byte) Name
0 1 Position X in 16px tiles
1 1 Position Y in 16px tiles
2 1
0x80 0x00
Offset Length Name
3 2 Unknown, bit 5 must be set for the chest to be openable
5 2 Value/Item ID, if bit 15 is set it is money (hex==dec)

0x8050 50gems

0x0010 Item ID 16 (S.Bulb)

7 2 Unknown
Offset Length Name
3 1 Item ID