[FE7] Ch25H Fort Seizing Dialogue

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 _0x15 0xSOMEOFFSET
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.

Cheers~

5 Likes

Good job on figuring out one of the unknowns, and also good job on finding something applicable to numerous situations. Should make setting up character-specific location dialogue much easier.

So, each character in the hack will use the same index into these arrays every time you use this technique? I guess that’s a little bit limiting, but would be practically impossible to design around otherwise. You could always expand the tables and give everyone a unique ID if necessary I suppose.

How about updating the Nightmare module and labelling that byte? We could call it, like, “personality index” or something, since it controls the way units speak in certain situations.