I wanted to consolidate some documentation regarding a function that can be found at these addresses:
FE6 = 0x08017764
FE7J = 0x0817DAC
FE7U = 0x08179BC
FE8J = 0x08017BDC
FE8U = 0x08017EBC
In laqieer’s function library they are listed separately, with the FE6/FE7 versions labeled “func_fe6_0817764” and the FE8 versions as “FixROMUnitStructPtr”.
I call it ALT_PID_Setter because it’s called during unit initialization and reduces the unit’s current PID by 1 if the Alt PID bit is set.
The function takes a unit structure as an argument and checks the character/class bitfield found in it’s PInfo for x00800000 (the top of the 3rd byte). If set, it subtracts 1 from the PID and writes the pointer to the new PInfo into the unit structure. This is presumably an alternate copy of the character and is used to turn Gonzalez B into Gonzalez in chapter 10B of FE6.
Despite there being a fair bit of documentation for these functions, it seems mostly scattered and information on it is poorly circulated.
Using FE8 with FE Builder has the Alt PID bit labeled as “NPC” with a hover text of “Unknown” while in FE7 it is ominously labeled “Usage prohibited” and a hover text of “Bugs the game. Don’t use without replacing default function”. This label makes sense as changing the PID of crucial units does indeed break many of the earlier game cutscenes most people do their testing on, often violently so.
To summarize, this function is present and fully functional in all versions, although it is only ever used natively once in FE6. FE6 is the only game to feature any characters with the alt PID bit set, and 9 out of 10 of those character slots go unused, with Gonzalez B being the sole case.
It’s not really hard to see why. The only unique feature of this incredibly inefficient system is being able to deploy a unit with a different weapon rank. I suspect this function is very old and a hold-over from an outdated and less flexible event engine early in development.
(Although this is just conjecture, I would say there’s even evidence that Gonzalez B was probably intended to be removed and was left in anyways.)