Chapter 2: The Event Arrays
The POIN array tells the chapter what’s what, our event arrays list all of our triggerable events.
We’ll start with a quick explanation of the TURN code.
TURN eventID SceneLabel [startTurn,endTurn] phase 0x00
This is the TURN code, which triggers events based on the turn count and phase. Turn events don’t usually have an event ID assigned, since their scope is naturally limited by the turn count. However, event IDs can be useful for turn events that involve additional conditions within the scene’s code (more on this later).
The first question is: are you using the prep screen or not? Although you specify the OpeningScene in the POIN array, this only applies to chapters with the preparations screen enabled. Without the prep screen, you’ll have to specify the opening event in the turn event array.
The “SceneLabel” will be the label designating our OpeningScene. For startTurn, we want 01; endTurn will be 00 (this is the default value for events that only happen once). For phase, we’ll use 0x00 (before player phase). That code should look something like this:
TurnEvents: TURN 0x00 OpeningScene [01,00] 0x00 0x00 END_MAIN
For chapters with the prep screen, the OpeningScene is designated to play before the screen comes up. This requires a special code to end the scene. While any other scene uses the ENDA code to signify that the scene is ending (thus telling the game to stop reading for more code), an OpeningScene with a preparations screen needs to end with the ENDB code.
It’s also worth noting that for the opening scene example we used 0x00 for our phase value (since it was the first event to trigger, it needed to occur before the player phase). However, you can run an event before any phase. 0x8 will run the event before the enemy phase, and 0x4 will run before the NPC phase.
Note: In the FE6 Template, OpeningScene is not a POIN like FE7 and FE8. The template instead specifies the opening event with a Turn Event. This is always done in FE6, regardless of whether there’s a prep screen. However, all events will occur after the preparations screen, unlike FE7 and FE8 where the OpeningScene occurs before the preparations. If you wanted to use an FE6-style OpeningScene after the prep screen, you could use a combination of the TURN designation and the POIN array, which would simply point to a blank OpeningScene with only ENDB.
Sometimes called “Character Events.”
CHAR eventID SceneLabel char1 char2 0xXX00YY
- char1 is the character who initiates the conversation (the one who gets the ‘Talk’ command).
- char2 is the one who receives the conversation (no ‘Talk’ command).
In order to have a reciprocal conversation (where both units get the ‘Talk’ command), you’ll need to list the event twice, like so:
TalkEvents: CHAR 0x0E NinianNatalie Ninian Natalie 0x110003 CHAR 0x0E NinianNatalie Natalie Ninian 0x110003 END_MAIN
You’ll also notice how I filled in that last parameter. This makes it so that the ‘talk’ command won’t appear until after eventID 0x11 has been triggered. It’s a built in condition; if you aren’t using that, simply use 0x000000.
Note for FE6: You guys don’t have that last parameter. Sorry.
Normally, I’m trying to teach the raw code over macros. If you learn the raw version, the macros will come naturally. This, however, is an area where the macros really help, since the LOCA events are distinguished by one byte and it can be burdensome to remember which one to use.
LocationEvents: Village(eventID,SceneLabel,X,Y) House(0x00,SceneLabel,X,Y) Seize(X,Y) //This will automatically load EndingScene Seize(eventID,SceneLabel,X,Y) //This can be used for multiple-seize chapters ala FE4. Chest(item,X,Y) ChestMoney(amount,X,Y) Door(X,Y) Armory(ShopList,X,Y) Vendor(ShopList,X,Y) SecretShop(ShopList,X,Y) END_MAIN
There’s the list of codes. They’re all quite straightforward. For houses, we don’t use an eventID (that allows them to be retriggered for the revisiting effect). For shops, you can write the ShopList in your events:
Armory(ShopData,4,5) ... ShopData: SHLI IronSword IronLance IronAxe IronBow Fire
Using that SHLI code as demonstrated above.
We’ve come to the fourth of our five major POIN arrays. MiscEvents basically cover else (aside from ballistae and traps). The only tricky thing here is remembering what goes in this list.
The three most common MiscEvents are victory/loss conditions: Defeat All Enemies, Defeat Boss, and Cause Gameover If Lord Dies.
MiscEvents: DefeatAll(EndingScene) DefeatBoss(EndingScene) CauseGameOverIfLordDies END_MAIN
These two codes work for all 3 GBAFE games (including FE6, even though FE6 only had Seize missions in its main game). If your CauseGameOverIfLordDies or DefeatBoss aren’t working, it’s logical to check the eventIDs triggered by the character-in-question’s death event. In the Death Quote Editor for your respective GBAFE, boss deaths should trigger Event ID 0x02, and lord deaths should trigger 0x65. There are only two other events that go under the Misc. Events array.
AFEV eventID SceneLabel eventIDofPreviousEvent
This is the “AFter EVent.” It triggers an event directly after a specified eventID has been triggered. “EventIDofPreviousEvent” is the event that our AFEV will follow. AFEVs have their own Event IDs, so incredibly long strings of AFEVs would be theoretically possible.
You can also put AFEVs under TurnEvents so that they’ll only be checked when a phase ends.
AREA eventID SceneLabel [StartX,StartY] [EndX,EndY]
The last of our MiscEvents is the AREA event. It’s quite simple, an event is triggered when any unit steps within the specified tiles. StartX/Y and EndX/Y create a rectangular area for the event to be triggered. Everything between the two points you specified (in that rectangular shape) will trigger the event the AREA points to, regardless of a unit’s affiliation.
Last and probably least, we have TerrainEvents to cover.
Note for FE6: 6 doesn’t have a TerrainEvents POIN, nor does it have an array for them. FE6 handles the placement of Ballistae through mapping. Certain tiles (made unique by the existence of a letter embedded into the grass) make Ballistae appear on those tiles.
K = Killer Ballista
I = Iron Ballista
L = Normal Ballista
BLST [X,Y] type
Fairly simple. For type, 0x34 = Normal Ballista, 0x35 = Iron Ballista, and 0x36 = Killer Ballista.
Another small note for our Ballistae array: you need to re-align everything after it. These events have the annoying property of not being divisible by four, and they leave everything after them in the event file in shambles. An ALIGN 4 is included in the template I provided, but I thought I’d mention it regardless.
Traps also go under the BallistaData POIN Array. What exactly is a trap? Well, think of FE7’s chapter where Hector gets Armads. Remember the tiles that spat poison at your units? That’s what is called a “trap.” Our knowledge of traps and setting them up with the EA is limited. FE6 doesn’t have a BallistaData POIN Array, so I assume traps are linked to a certain tile like Ballistae. FE8’s traps are also unknown, so the following information is currently only for FE7.
TrapData: FIRE [X,Y] 0x0 [1,1] GAST [X,Y] direction [1,1] ENDTRAP
For the fire trap, essentially all you need to change is the coordinates. For both codes, that second set of numbers will always be [1,1] (that’s the only value that works). You also need to set the gas trap’s direction: 0x0 Left, 0x1 Right, 0x2 Down, 0x3 Up.