In Chapter 25 of Hector Mode (Crazed Beast), you’re tasked with seizing 3 forts with any character on your team. When a unit waits on a fort, they say a small snippet of dialogue. But, how does the game know what text slot to display? It’s not a huge IF/ELSE event structure, thankfully.
#define SayOneFortLine "_0x15 0xCB7F24" #define SayTwoFortsLine "_0x15 0xCB7F5C" #define SayThreeFortsLine "_0x15 0xCB7F94"
There’s 3 tables/arrays that get used (for when you’ve captured the 1st fort, the 2nd, and the last one). Each character is assigned a number that says which entry in the table to use (An index into an array).
When one of these lines I’ve defined is called, the game gets the number of the active character and finds which text slot it should display.
Where is this number? It’s one of the ‘Unknown’ bytes in the Character Editor. Specifically, the one immediately after the Supports pointer.
I’ll use a character from my hack, Hugo, as an example. Hugo has a “Dialogue Index” of 0x06.
Each entry in the table/array is 4 bytes long. If we start counting from 0 at the start of the table, entry 6 says “D6 0C 00 00”. The zeroes I don’t really care about, but if we flip the D6 0C we get 0x0CD6, which is the text slot that get’s used.
Now, if we change Hugo’s Dialogue Index to 0x05, we get:
I haven’t tried it, but I’ve got a hunch that you could set up your own text array at some free space and call
and it would go retrieve the text based on the active character’s Dialogue Index.
Or at the very least you can use something like 25H and know who’s using what text slot, and why.