How to bar a unit from a chapter?

I’m trying to make an FE7 romhack where a previously recruited unit becomes unavailable for a while. (In the same way as Matthew in Chapter 8 of Lyn’s story.) I’ve searched for tutorials, but I can’t find any. Could anyone point me to a tutorial, or otherwise tell me how to do it?

Since it may be important to specify, I’m working with FEBuilderGBA.

EDIT: I found a really simple solution. I placed the unit I wanted to be unavailable on the map where he couldn’t be seen, changed him from an ally to an enemy unit, and erased him from the map. I doubt this is the best solution, but it works for what I want it to do.

Well at the start of the map, you can just REMU them and when you want them to come back just REVEAL them.

…What’s REMU exactly? (I’m brand new to this, so I don’t know much.)

it’s an event command, much like REVEAL. what it does is it removes the unit from the party, but stores the unit data.

I’m not seeing that command anywhere. I’ve done a little digging, and from what I’ve found, it doesn’t work in FE7, which is the rom I’m working with. Is there a workaround I could use (outside having two of the character in the rom and killing one)? Or do I have to rebuild what I have in FE8?

Well if you’re in FE7 you can just use whatever happens with Matthew in chapter 8

I tried a quick look and couldn’t find anything removing Matthew, but l haven’t played the prologue in years. l don’t remember when exactly he leaves. That being said, FE7 has DISA and REPA to disappear and reappear a unit. Might work the same way as FE8? Worth trying. l wanted to figure this out, too, but l’ve yet to get around to it.

I would, but I can’t identify what it is that actually kicks him out of the chapter.

They may get a unit off the map, but I want them un-selectable from on the prep screen. And that’s not something DISA/REPA seem to do.

Also, Matthew leaves because he has “errands” to run in Chapter 8. And it seems to be an event that’s called from the prep screen, meaning I can’t find it in the event editor. (Or at least that’s where his dialogue seems to be called from. Either way, I can’t find that event, so I can’t see exactly what it does.)

You want to use UNCM 0x2000000, which is the “prevents deployment” state, this greys the unit out in preparations. Matthew’s case is special since it’s hardcoded and not in an event. It happens during preparations, like some other dialogue, so it’s not easily reversible.

2 Likes

Uh… How do I use UNCM 0x2000000? I’m not seeing it in the command list, and I’m too much of a noob to know any other way to put in commands.

It’s an event command, it should be there. Type in only UNCM and you should see it.
That being said, l’m also interested in this knowledge, and it’s not working for me. The “Sortie not allowed” flag keeps getting undone when the prep screen comes up. It saves between chapters, but the prep screen just turns it back off even with an empty start event. @Shuusuke, does this UNCM method have something specific you need to do?

Right, now that you mention that, I remember that that was the actual problem. I was thinking that it was weird how I somehow had the solution to something I was unable to figure out before. Calling the preparation screen clears several unit states, Dead is one of the few exceptions, but not the deployment prohibition.

The way it works for Matthew is that his state gets set AFTER preparations are called, in a hardcoded manner that isn’t through events, so in his specific case, it works. So, since events are out of the picture here, you’d really need to figure out the ASM way to do it, maybe starting from analyzing the Matthew case.

What already exists is a patch for that functionality in FE8, so if you want to port it to FE7, that’s another option, but how to do that is beyond me, so I’d recommend asking people who are experienced with ASM. From my understanding, after preparations are called, the list is “hooked” and the units in the list that match the chapter and route are given that unit state, so it’s not cleared.

2 Likes

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.

3 Likes

The issue was not of just how to hide a unit from a chapter, this is indeed possible with setting the Escape/Capture states, which do not get cleared. The question was about replicating Matthew’s case, which uses a different state, the one that makes it so he just can’t be deployed, but he still appears greyed out in preparations and his items can be moved. If you set them to escaped, they won’t appear and you can’t manage their inventories.

FE7 has ASM functions to copy stats between units, so you’d have to look into them if you want them to happen with other units. FE8 has patches for both preventing deployment and copying stats (“unit take over”), though.

…I’m not entirely sure how this works, but I’ll be sure to try and figure it out so I can do a better version of this next time I want something like this to happen!

Edit: …I just realized that this doesn’t exactly solve the thing I was asking about, but considering the circumstances, it’s actually a better solution than I had hoped for.

D’gohhhhh! Trading items, completely forgot that part. I even acknowledged the lack of it for a short second during my tests, but didn’t realize what it meant. Oh, well…it’ll do as a “good enough”, l guess.

Good explanation of REMU / REVEAL :+1:, too many people use these commands without ever paying attention to unit state

I used to think that Tequila was a fire emblem character I didn’t know after seeing “Tequila’s capture” on febuilder, haha

Posting here since a while ago I found where the addresses were, so it’s good for documentation even if the initial post has apparently already been solved with an alternative. Forgot to post it earlier, but anyway, these are the addresses related to the units that can’t be deployed and the chapters in which they can’t be deployed.

0x8DECC : Matthew’s ID (0x23)
0x8DEBA: Matthew’s prohibition chapter (0x09)
0x8DED8 : Oswin’s ID (0xB)
0x8DEBE : Oswin’s prohibition chapter (0x29)
0x8DEE4 : Nils’s ID (0x26)
0x8DEB6 : Nils’s prohibition chapter (0x2A)

They’re already patches in FEBuilder, so if you’re satisfied with at most 3 blocked units on 3 specific chapters, they’re all you need. If you want more, then you’d look into making this a list, just like the FE8 patch does.

2 Likes