Hey, wait! I just figured it out! The game has a few things going on where if Escaped (0x10000) is flagged on a player unit, then it’ll set Tequila’s Capture Departed (0x4000000) on them right after the chapter title. This makes another thing happen, where if Tequila’s Capture is on when the prep screen shows up, Escaped is turned on. So, both of these work in tandem with each other to remove the specified unit from your party until you want them back. Matthew might be a hardcoded thing, but Cog of Destiny just applies Escaped to Ninian in the events to accomplish the same thing for several chapters. l’ve done a lot of quick testing on this method…it works on other characters not just Ninian, it retains their stats, and it keeps them out of the party through a whole bunch of chapters until that Departed flag is turned off.
So basically, the answer is UNCM and UNCR after all, you just gotta set or unset Escape+Departed (0x4010000). Well, actually just the single one you need, but that might be hard to remember, and both get set anyway. Now, l don’t know what’s up with that name, but I think Tequila is an ASM modder? It probably doesn’t affect any patches if “capture” only happens to enemy or NPC units, right?
Edit: I dunno how, but l got the names wrong. The numbers were correct, but l somehow got the Tequila’s Capture and Departed names mixed up. Even though l checked and double-checked this stuff, but w’ever…two names that are fully separate from each other.
Your method of changing the team does work, but it’ll remove their stats, l imagine. Another stat-losing method is to spawn the unit on a different team, which auto-deletes that character ID on the player’s side. But with this method, you can keep stats and take up less ROM space since it’s only one command.