Shadow Dragon Shop and Chest Documentation

From EmblemWiki
Jump to: navigation, search

How to read/use pointers: Convert the pointer to an address and add 0x2C. Eg. 00 00 00 55 points to 0x55 + 2C -> 0x81.

Shop and chest data are located in the _ter.cmb files in the script directory.

Shop data

-- -- -- -- 1D XX XX 38 XX XX 01 20 ...
  • The first XX XX points to the item's IID label
  • The second XX XX points to Goods

To add more items, keep repeating the above string. To end the shop, add 19 00 39 to the very end.

You can also replace 1D with 1C if you only need one byte for your pointer.

If you want to make a larger shop than the original, expand the script file and put the shop code at the bottom. Find the location where the original shop data begins, create a pointer that would point to its location. Search for this pointer in the script file and change it to a pointer that points to your new shop.

Chest data

-- -- -- -- 19 00 38 XX XX 01 19 01 38 XX XX 01
19 02 38 XX XX 01 38 XX XX 03 20 1C XX 38 XX XX
01 20 19 00 39
  • The first three XX XXs should point to Arg
  • The fourth XX XX should point to TTDone
  • The single XX should point to the item's IID label
  • The last XX XX should point to TreasureGet

You should be able to utilise two bytes for pointers by replacing the preceding 1C with 1D.