[FE8] Autopromotions

Finally figured out where all the code responsible for the special trainee promotions are… now we can have autopromotions happening in the prep screen :smile:

0xCC6D4 - 0xCC900 contain the various checks for when this promotion can take place. It loops through your characters until it finds one that is in the trainee promotion table array (located at 0x207044), and makes sure that character is alive, has sufficient level, is the right class, and has a promotion option in the promotion branches table. If all those are true, then it does a bunch of stuff that causes the character to promote.
Note that autopromotion will not happen on chapters without a prep screen.

The offsets 0xCD7FC, 0xCD898, 0xCD8F8, 0xCD958, and 0xCD9B8 contain five pieces of very similar code, designed to load the five sentences (four, in the case of Ross) your character says before promoting. The text IDs for the sentences are located in a table at 0x20707C.

6 Likes

Autopromotions: Done!
Three (or more) promotions: Maybe coming next!

Posting and quoting @circleseverywhere for more documentation:

080CD80A 8D50 ldrh r0,[r2,#0x2A] @get character ID
080CD80C 2812 cmp r0,#0x12
080CD80E D007 beq #0x80CD820 @if 0x12 go to Amelia quote
080CD810 2812 cmp r0,#0x12
080CD812 DD09 ble #0x80CD828 @if less than 0x12 go to Ross quote
080CD814 2818 cmp r0,#0x18
080CD816 D005 beq #0x80CD824 @if 0x18 go to Ewan quote
080CD818 E006 b #0x80CD828 @anything else go to Ross quote

One instance of this or very similar instructions occurs for each of the 5 sets of dialogue boxes that the trainees say when they promote, so if an originally non-trainee character ID has a trainee autopromotion, these branches must also be edited, otherwise everyone will just use Ross’s promotion quote.

2 Likes