Chapter 1: Key Concepts
Before we get into the thick of it, I’d just like to take a few minutes to summarize some core concepts (this should look familiar if you’ve read Eventing for Dummies).
This is the basic FE7 event file template:
//Made by markyjoe1990 of Youtube
//Modified by Nintenlord
//Modified by Crazycolorz5 and Arch
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(EventTableID,Pointers)
ORG StartOffset
Pointers:
POIN TurnEvents
POIN TalkEvents
POIN LocationEvents
POIN MiscEvents
POIN TrapDataEM TrapDataHM
POIN BadENM BadEHM BadHNM BadHHM
POIN Good Good Good Good //Same order as the above line, but we probably don't need to differentiate between them
POIN OpeningScene EndingScene
BadENM:
BadEHM:
BadHNM:
BadHHM:
UNIT
Good:
UNIT
TurnEvents:
OpeningTurnEvent(OpeningScene) //Do not include this event if the chapter has a prep screen
END_MAIN
TalkEvents:
END_MAIN
LocationEvents:
END_MAIN
MiscEvents:
CauseGameOverIfLordDies
END_MAIN
OpeningScene:
ENDA
EndingScene:
MoveToChapter(NextChapter)
ENDA
TrapDataEM:
TrapDataHM:
ENDTRAP
MESSAGE Events end at offset CURRENTOFFSET
//The map for this chapter is at offset: ????????
The ORG command defines the offset to write data to. You can use the command at any time in your event file, if the need happens to arise. Generally, this functionality is more useful for EA build files than it is for constructing chapter events. The EventTableID corresponds to the Event Data Reference in the Chapter Data Editor.
The next part of the event file is our POIN array. This is the glue that holds everything together. Chapters read the event reference array to load events, which points directly to the POIN array in your event file. The game reads this list of pointers to find the locations of all of your event arrays (turn events, location events, your opening scene, enemy units, etc.).
POIN TurnEvents
POIN TalkEvents
POIN LocationEvents
POIN MiscEvents
POIN TrapDataEM TrapDataHM
POIN EnemiesENM EnemiesEHM EnemiesHNM EnemiesHHM
POIN AlliesENM AlliesEHM AlliesHNM AlliesHHM
POIN OpeningScene EndingScene
In the standard template, the ally/enemy labels just use “Good” and “Bad.” Actually, the four pointers are used for mode differences, which may or may not be useful to you.
The POIN array identifies our event arrays (more on these later), units for prep screen chapters, and the opening/ending scenes for prep screen chapters.
Event IDs
Before we move onto the actual events, however, there’s one more important concept to grasp. The Event ID is hex value assigned to each event. This is how the game checks to see if an event has occurred or not. Think of it like a switchboard of true/false vaules; events will automatically trigger their associated ID and set the value to “true” (these switches return “false” by default), and if an ID returns as true the game will acknowledge that that event has been triggered.
These switches can be utilized in a variety of ways, but the important fact to remember is that you’ll generally be associating one event ID per event. There will be a lesson later on manipulating Event IDs, however a basic understanding will suffice in the beginning stages of event hacking.
Event IDs 0x01-0x04 are used by the game, and IDs from 0x65 onward are “permanent” IDs that will transcend chapters (lower values are reset at the chapter’s end) but any other value is acceptable.
We’ve already learned the TURN code in the Opening Scenes chapter; due to the way they’re set up, (with the startTurn and endTurn), we don’t need an Event ID to check whether the event has occurred to prevent it from reoccurring. For turn events you can simply use 0x00 for your Event ID. However, the Event ID will be important for most every other type of event.
Two more codes to add to your list (they’ll become a lot more important in that later chapter on Event ID manipulation):
ENUT eventID //sets eventID as "triggered"
ENUF eventID //sets eventID as "not triggered"
Consider this brief little interlude finished.