[FE7] Only 127 available classes?

I currently have 144 classes, but if I set a character with a class beyond 0x7F it sets a different class after restarting the chapter.
Is there a way to fix this problem?
It doesn’t affect the enemies thoug.

It’s likely an issue with the way the game remembers allied units’ classes, if it doesn’t affect enemies/NPCs. I vaguely remember Nintenlord mentioning this yearrrrs ago.

Probably the game only allocates seven bits to storing a unit’s class ID in the save file; meaning the maximum class ID that would persist between saves would be 0x7F. Higher class IDs would just have the 0x80 bit shaved off.

The game regenerates enemies/NPCs when you restart a chapter, but if you Suspend/Resume the chapter instead of restarting, it would likely affect them too.

Wait, you can’t expand past 0x7F for the class array? Or, you can, but it has this bug? Surely, there’s some way to fix this right…

Does this bug only affect enemies and allies but not the player?

If what Venno is saying is true then any classes with IDs greater than 0x7F (7 bits) will have the significant bit truncated when it’s saved due to the way data is tightly tightly packed. So no classes above 127 can exist between saves unless you change how save data is stored which is a fucking pain in the fucking ass but I’m pretty sure the game stores pointers to that class instead of the actual u8 ID’s so I don’t know if that’s what the problem is

It’s the other way around, If I read the previous post right, it affects mostly player units due to saving. (but also apparently effects enemies if you suspend/resume due to the save system)

Basically what Lindsy said, when suspend or stop playing the game packs all that data and stores it in a specific spot based on save file. If you don’t ever suspend it’ll work fine but if you store the data and try to reload it later the game truncate the top bit effectively subtracting 128 or 0x80 from whatever it was as a u8 before getting packed
IF that’s the problem then you’re basically SOL because most people (except maybe me and CrazyColors) don’t really know how the game packs and stores data and how to allow for an 8 bit class ID and I’m guessing if that’s a thing then the same should be true for character IDs

It’s not a thing for Character IDs, I’m sure - vanilla FE7 uses up to 0xFD character slots and they all persist between saves.

I’m not 100% that the game converts the class pointer in memory to a 7-bit packed ID for the save file, but it would explain why the OP gets problems with class IDs above exactly 0x7F.

It doesn’t affect allies nor enemies if you Suspend/Resume the chapter.