File Setup
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(EventTableID,Chapter)
ORG StartOffset
Chapter:
POIN TurnEvents
POIN TalkEvents
POIN LocationEvents
POIN MiscEvents
POIN TerrainEvents TerrainEvents
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN OpeningScene EndingScene
Bad:
UNIT
Good:
UNIT
TurnEvents:
TURN
CharacterEvents:
CHAR
LocationEvents:
LOCA
MiscEvents:
CauseGameOverIfLordDies
AFEV
TerrainEvents:
BLST
ALIGN 4
OpeningScene:
ENDA
EndingScene:
MoveToChapter(NextChapter)
MESSAGE Events end at offset currentOffset
//The map for this chapter is at offset: ????????
This is the basic template for FE7. So, let’s go ahead and walk through it. Templates for all three games come in the Event Assembler download (so don’t fret, FE8/6 fans).
First up we have the commands to disable tutorials and include the Event Assembler Standard Library (more on that in the Macros & Definitions chapter). We just sort of leave those alone.
Next up is the EventPointerTable command, which automatically handles writing the pointer for this set of events in the table for you (in lieu of using the Event Reference Editor in Nightmare). You’ll be using the value of events associated with the chapter.
To replace Lyn’s Prologue, I’d use:
EventPointerTable(0x06,Chapter)
The Chapter bit remains static, since it’s acting as a label. To find the value you need, reference Pointers.txt in the Event References module’s folder.
Next up we have ORG, next to which you’ll need to write the offset to write the events. I generally reserve the D80000-DA0000 range for events, but any free space (including new space made by expanding the ROM) will do. It’s completely up to your discretion, so long as you’re sure you aren’t writing over something important!
After that we have the POIN Array. This is basically the root of our chapter’s events, it identifies all the major components. It tells the game where your data for the 5 types of events are, which scene is played before the opening, which units are enemies/allies, which units to load for different modes (if your base game supports that), etc. An apt analogy would be to call it the game’s map for reading your chapter.
Units are the most self-explanatory parts of the structure. Ya know, the blue/red/green guys that do stuff on a map? Those guys. Just list away! Start each list with a label (the “Bad:” and “Good:”), use one UNIT code for each unit, and then end the list with a UNIT with no parameters.
Units are loaded in scenes, but some groups of units are identified by the POIN Array.
Following units, we have our event arrays. One for each type: TurnEvents (which trigger at the start/end of specific turns), TalkEvents (also called “CharacterEvents,” the “talk” command conversations) , LocationEvents (chests, villages, etc.), TerrainEvents (ballistae and traps), and MiscEvents. Just as the unit groups listed units, these are lists of events.
The codes themselves will be covered in Arch’s Guide to Chapter Construction.
After that you have the pointers to the OpeningScene and EndingScene which, again, you’ll learn how to build later.
That’s pretty much all there is to it.