[FE7] Class Roll Mechanics

Another day, another question thread!

This time, I’ve got a few questions about the Class Roll that appears after the title screen.  It rolls through different sets of characters depending on how far you’ve progressed in the game.

For example, a brand new game shows 6 units (Lyn, Kent, Florina, Wil Dorcas & Serra).  After you have cleared a set number of chapters, the next set of 6 (Erk, Matthew, you get the idea) are added to the start of the class roll extending it to 12 units.

My main question is how would I find what causes the list to change to the longer list?

I’ve located the pointer to the full table, and tracing it was a doozy.  Basically it’s a table of pointers to pointers … to pointers of actual unit entries.  I’ll spare the thread from the finer details unless anyone out there is particularly curious as to how it was organized.

I now understand the architecture of the different tables, but I don’t know what makes the game load each different pointer for the next, longer list as you progress.

  1. Is there a set chapter that changes it (say after you beat chapter 5 it loads the next list)

  2. Is there another mechanism that changes it?

Perhaps most importantly:
3) Could the mechanism be altered to suit ones need?  How would I go about learning these details?

Any tips or advice to begin this quest of madness are appreciated!

1 Like

Tell me where the table is. It should be simple enough to track down with a break-on-read.

Here’s what I found through tracing the pointers:

B02C8 - offset to pointer table

CE6BDC: table of pointers for each full list of pointers to classes (13 entries total)

The first 11 entries are what the game seems to load, moving to the next entry after a certain point.  Each subsequent entry adds a new pointer to the front of the previous entry, which seems to add more units to the class roll.  Entry 12 is an inverse of entry 11, while entry 13 seems to be a much longer list of classes that might be used elsewhere.  I’m not sure how it’s used (maybe a beta or for testing) but I don’t think it gets used by the class roll.

I can post the full list that gets used in a cleared game if that would be a helpful resource, along with the pointers to each unit displayed.

0x02024EC7 - 1 byte specifying which pointer in the aforementioned table to use. The byte after this tells which class in the roll to show (while doing the roll).

The number to write there is fetched by… the routine at 080125D0(which calls 0801252C to do its dirty work)

This code is too complicated for me to analyze deeply right now (read: I’m too lazy), but my guess is that:
The loop from 08012540 to 08012572 finds the most progression from among the 3 save files. the bl call at 08012550 find something about that file and puts it into r4, which you can see by the tables below, corrispond to an r0(which is ultimately the index in that pointer table)

it can’t be most progression from save files because if you clear a game and delete all of your files it still will show promoted classes

if this was programmed the way i think it was there’s probably an event ASMC at the end of certain chapters that sets a flag in the overall game state

Well, FE7 does have a playthrough counter. It could just check that (in regards to all the files being deleted, anyway)? http://i.imgur.com/hI9HYxC.png (upper right corner)
So that would account for deleting all the files right?

Though flagging the chapters accounts for that too. (Too bad redoing the final over and over doesn’t up pt count :c )

Well, it loops through SOMETHING 3 times. It was just a hunch anyway.

I think the event ASMC makes the most sense, and I would have guessed that.

what it might be is that each save file has a flag set, and before it displays the class roll it checks the three save files to see if they have a higher flag set than the overall game state (either a redundancy check or it updates at a different time than I thought)

It sounds like you could code your own events to trigger the next entry in the table if you know the corresponding ASMC code? That could be useful for appending new units at your choosing.

I’m no master hacker, but I might look over the events for the first transition to see if I can find that code. I’m sure there are easier methods, but that’s about my speed at this point.

Yeah, try looking at the events at the end of Lyn’s mode/start of eliwood mode and let me know if there are any suspicious ASMC codes.

There’s quite a handful of codes in the events, but one in particular stands out.

ORG $CC0F30
label35:
ENUT 0x83
LYN_END
_0x1
ASMC 0xB85D5

STAL 0 0
ENDA

This one triggers after Lyn gives her speech to Mark, and triggers after Lyn mode ends. There are some other in the ending events for the chapter, but I would imagine it would flag the class roll change after all of the major events are finished.

Is there a way to check these codes? I’d be happy to lend a hand if it could help!

Yes, use a disassembler. You need to know assembly though. In any case, I plan on checking out any suspicious codes you hand me.

the easy way to check would be to debug them

you can also try removing that from the chapter, then resetting the game to see if the class roll changes

I’m going to backtrack through the chapters since I’m pretty sure there’s another class roll change between chapter 10 and the initial start. Would the same ASMC code be used each time it changes? Because that would be very simple to determine.

@Crazycolorz5 Looks like I’ll be passing codes to you until I learn some assembly in that case. I should really get around to learning it myself!

@CT075 I could just remove it and reassemble the chapter events right? I’ll have to get around to that if I can get a clean save at that chapter.

Possibly, but probably not. The structure of it being near the start or end of the chapter will probably be the same, though.

Causes the epilogue scene where it scrolls through your characters and tells their afterstory. Odd since it should show that in lyn’s mode O.o. But okay.

Edit: Also, I ran through it and confirm that it does not change the class roll… try looking for a different ASMC.

Ok, there is another label with a bunch more codes:

These are the ASMC codes in the beginning scene for chapter 10; There didn’t seem to be any other codes in the chapter events besides them.
ASMC 0x18831
ASMC 0x18889
ASMC 0x7A7D9

EDIT: After looking at the event code more closely, it seems the above offset is referenced in multiple chapter events. It might not be relevant to the class roll.

EDIT 2: Replaced with the ASMC codes in the beginning events (the previous set are for checking for Lord deaths, hence the need for them in all chapter events).

After reading through the thread several times and trying to follow the pointers to pointers, I still don’t know what I’m doing lol. How would I go about editing the classes that show up in the class roll? It seems that the “classes” that do appear in the class roll appear according to the character pointer, EX. the thief is matthew 0x23 in nightmare. The mage is Erk 0x13. I changed most of the default character palettes and the changed palettes show up in the class roll. I just want to replace the list in the class roll with a new list of characters.