Meaning of the Different Event Bits

Hi,

I did a quick search on this and wasn’t able to find anything solid. Some of the common ones include “EVBIT_T 0x7”, which seems to clear the event without the black screen.
Other ones like “EVBIT_MODIFY 0x4”, which sets bits 5 and 6 and clears 7, but I have no idea what this does.
Does anyone have the functions of the different bits charted out?

Thanks a lot!

EVBIT_T 0x7 is the one that’s best known, in fact the EA Standard library calls it NoFade.

CHECK_EVBIT 0x8 is used in the conversation background loading event, seemingly to show that the screen is already dark and FADI is not needed?

loadbg:
CHECK_EVBIT 0x8
BNE 0x80D2 0xC 0x0 //if EVBIT 8 is set, skip the FADI
FADI 16
LABEL 0x80D2
REMOVEPORTRAITS
BACG 0xFFFF
FADU 16
ENDA

As for EVBIT_MODIFY, I’m not sure but the world map events use EVBIT_MODIFY 0x1 at the start, EVBIT_MODIFY 0x0 after spawning the lord and the text frame, and then EVBIT_MODIFY 0x1 again after the destination is loaded. I suspect bits 5-6 have something to do with fading and/or player control.

Hey, thanks for the reply again.

Since you’re here, I might as well ask about the turn event trick that FE8 uses in chapter 1 which spawns reinforcement on the first EP when an AREA event gets activated…

////// Turn Event to Load Reinforcement //////
TurnBasedEvents:
TURN 0xC label17 [1,255] 0x0

label17:
SVAL 0x2 0x8E4F014 // reinforcement location
CALL label38
EVBIT_T 0x7
ENDA

label38:
EVBIT_MODIFY 0x4
CALL label27
EVBIT_T 0x9
LOAD_SLOT1 0x1
ENUN
EVBIT_F 0x9
EVBIT_MODIFY 0x0
ENDA

label27:
EVBIT_MODIFY 0x1
EVBIT_F 0x2
CHECK_EVBIT 0x8
BEQ 0x0 0xC 0x0
FADU 16
LABEL 0x0
EVBIT_MODIFY 0x0
ENDA

////////////////////////////////////////////////////////////

////// AREA Event to Trigger Turn Event //////
MiscBasedEvents:
AREA 0xB label23 [6,0] [14,8]

label23:
SVAL 0x2 0x0
CALL label37
ENUF 0xC
EVBIT_T 0x7
ENDA

label37:
CHECK_ALLEGIANCE 0xFFFF
BEQ 0x0 0xC 0x2
CALL label25
LABEL 0x0
ENDA

label25:
CHECK_EVENTID
SADD 0xC2
ENUF_SLOT2
EVBIT_T 0x7
ENDB

This is taken from FE8 Chapter 8. Once an ally activates an AREA event, it does an “ENUF 0xC”, which re-activates the reinforcement event quoted above and spawns the reinforcements.

My question is, how does the above event know not to load reinforcement on the very first turn since the reinforcement load event runs from turn [1,255]. When I copied the above code from Chapter 8 to a different chapter and changed the reinforcement pointer as well as the event IDs, the reinforcement gets loaded as soon as turn 1. I suspect it had something to do with the event bits, which I don’t know much about.

Thanks again!

1 Like

lol, literally right after I posted the above question I realized that there was probably something in the beginning of the chapter that’s turning off the load reinforcement event.

And lo and behold, it is indeed in the BeginningScene event. There’s a “ENUT 0xC”.
Welp, I thought this was some sort of magic through bit setting/modifying in the event execution bits.

Should’ve realized this sooner. Oh well, mystery solved :slight_smile:

1 Like