[FE7] How does the game know which version of a map to load?

I asked on the discord, but figured I’d ask here as well before I go to bed, since I dunno how many people who know this, actually frequent there or not.

Basically the question is, how does the FE7 game, know which map(or I guess more specfically events) to load if you are in Eliwood or Hector mode? Is it like FE8 where there is a mode switch of sorts, and it checks\uses that to determine it. Or is it something else entirely?

I checked the maps in FEbuilder and noticed theres only 1 version of each map, so I know there is not separate maps its loading(unless I’m wrong about that). So it must have some kind of check its running.

Sorry if its a dumb question, all the info I found on here for this was about forcing starting in one mode or the other, but none actually seemed to explain how the game knows what mode you are on.

Similarly, difficulty is at 0x0202BC0C
It checks those values, probably with some event code, to check which units to load and all that, probably, I don’t actually know.

Really search engine, that’'s probably the most relevant to my search, yet it didn’t pop up? Anyways, you are probably right, I’ll leave this marked unsolved in case anyone has anything to add for a bit.

Anyways, you are probably right, I’m just leaving it open so that if someone who knows more comes along in the next few hours they can go ahead to add their input. I mean they could do that even if I mark a solution, but if I do mark it, they might not even look at this.

Branch processing is implemented in various ways.
There are several methods and it is difficult.

Which chapter to load next is determined by the end event.
(This is also true for FE 8)

For example, look at the end event of MAPID 0x20 of FE7U.
If it is in Elliwood mode, we will load MAPID 0x22 in the next chapter.
Otherwise (Hector mode), load MAPID 0x21.

There are various branching methods in the event.
In FE 7, event branching using ASM is frequently used.
I am naming it based on research materials that the author of the heavenly sword has investigated.
However, I still have information that is still missing.
Please let me know if there is anything that knows the name in the asm routine.

Start placement
The starting placement is determined by EVENT.

Turn condition branching
Unlike FE 6 and FE 8, the turn condition of FE 7 can be branched according to the mode.

However, regarding the setting of this mode, there is still a mystery part.
Please let me know if you find a mistake.

In FE 7 turn event, event data generated with Generation = 1 rarely exists.
This is data with a small data structure size.
FE 7, the structure of other series different turn, turn condition is big.
Normally there is a 16 byte structure with Generation = 2.
However, if Generation = 1 it will be a structure of 12 bytes.
(I think this is a misconfiguration.)

I noticed writing articles.
It is not good how FEBuilderGBA’s branching function name in FE7 is given.

First, the person who analyzed the event instruction assumes the C language if statement and writes the document.
In practice, however, branching is done like cmp x, y AND beq label 1 of the asm instruction.
In other words, the branch condition is opposite to the if statement.

I will fix it later.

Hmm intersting, Very intersting. Thanks for the info I’ll think about it and see if I have further questions.

I have no clue what you just said, but I guess thats because I lack the programming knowledge. Even so, good luck fixing whatever it is. :slight_smile: