Male
Seen 2 Weeks Ago
Posted March 14th, 2020
207 posts
3.7 Years
You may have noticed that some specific tiles run scripts without having a green script tile or any sort of event there in Amap. For instance, Pokemon Centre's PC, Stack of books, T.V. in Player's house etc.
So here's a tutorial on how to execute the same effect!

1)
Paste the provided HexTable (at the end) in an 4-aligned free space.

2)
Goto 0x6D1F0 and place there;
Spoiler:
09 06 88 0D 01 49 40 18 00 68 F7 46 XX XX XX 08

Here, XXXXXX is pointer to the HexTable with endian format (reverse).
NOTE: Don't add +1 in the pointer.

The table consists of 256 entries, 4 bytes each, which are pointers to the script that will be executed on interaction.
To find a specific behavior pointer offset; Use the following Formula:
Spoiler:
(BehaviorByte * 4) + HexTable Location

(Calculation is all in hex),
For example;
I wanna use BehaviorByte 0xAF, so 0xAF * 4 = 0x2BC, and suppose I placed the HexTable at 0x990000, so I'll do 0x990000 + 0x2BC = 0x9902BC.

Place pointer to your script or asm there and then you can assign that Behavior Byte to a tile so that it runs the corresponding Script/Routine.

P.S. > You can use Behavior Bytes from 0xA4 - 0xCF and 0xD2 - 0xFF safely as they are unused in a vanilla FR rom.

HexTable:
Spoiler:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 76 1A 08 0F 76 1A 08 55 69 1A 08 00 00 00 00 32 6C 1A 08 4E 76 1A 08 E7 76 1A 08 DE 76 1A 08 57 76 1A 08 60 76 1A 08 69 76 1A 08 72 76 1A 08 D8 BF 1B 08 A7 B8 1B 08 02 77 1A 08 18 76 1A 08 F0 76 1A 08 F9 76 1A 08 3C 76 1A 08 7B 76 1A 08 84 76 1A 08 8D 76 1A 08 2A 76 1A 08 96 76 1A 08 9F 76 1A 08 A8 76 1A 08 B1 76 1A 08 00 00 00 00 00 00 00 00 CC 76 1A 08 D5 76 1A 08 33 76 1A 08 21 76 1A 08 45 76 1A 08 9C 54 1C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00