[Buildfiles] How do I do battle/boss conversations? And how do I move a unit immediately after spawning it?

I looked at Zim’s tutorial and a few project buildfiles but I just can’t figure this out.

For battle conversations, there is an aptly named BattleQuoteTable (0x9EC6BC). Each entry of this table either has what we call a Specified battle quote or an Unspecified battle quote.
A specified battle quote occurs only between 2 characters you define. An unspecified battle quote only defines 1 character tied to the quote. You can get handle this table through CSVs, but I personally prefer just to use macros:

#define SpecifiedBattleConvo(Character1,Character2,Chapter,EventID,TextID) "SHORT Character1 Character2 Chapter EventID TextID 0x0 0x0 0x0; SHORT Character2 Character1 Chapter EventID TextID 0x0 0x0 0x0"
#define UnspecifiedBattleConvo(Character,Chapter,EventID,TextID) "SHORT Character 0x0 Chapter EventID TextID 0x0 0x0 0x0; SHORT 0x0 Character Chapter EventID TextID 0x0 0x0 0x0"

Each use of this macro in the table acts as an entry in the table. (There are also a variants that use a pointer to events to run which I don’t have on hand right now actually.)

The table is terminated with

BYTE 0xFF 0xFF 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 // Terminator

If you want to repoint the table, the only pointer to it is here:

ORG $846AC
POIN BattleQuoteTable

As for moving units while loading them, there are 2 parameters to the UNIT raw that are relevant:

UNIT *Char ID* *Class ID* *Leader char* *Misc data* [Loading position X, Loading position Y] Flags Byte1 *Data count* *REDA data pointer* [Items 1, Items 2, Items 3, Items 4] [AI 1, AI 2, AI 3, AI 4] 

See REDA data pointer and Data count? This is what we’ll use. (This works entirely differently from FE7, btw.)
With the REDA data pointer, we’ll point to a list of REDA codes. These codes define how your unit will move.

REDA [New position X, New position Y] Flags Speed *Rescuing character* Delay 

For example:

UNIT Gerald Mage Gerald Level(10,Enemy,True) [9,1] 0x00 0x00 0x02 SomeREDAs [Elfire] GuardAI

REDA [12,3] 0x00 0x00 0x00 0x00
REDA [18,3] 0x00 0x00 0x00 0x00

This will load this mage dude at [9,1], immediately have him moving to [12,3], then [18,3].
If you don’t like this and don’t need to do special movement, you the system, REDA helpers, at your disposal in this post.


That tutorial is super outdated and incomplete (and probably should be marked so if it isn’t already). You’ll have better luck at tutorial.feuniverse.us (which also isn’t perfect but is much better).

Yikes I know that’s a lot. Lemme know if any of that needs clarification.


I managed to figure out movement thanks to your REDA helpers, but I couldn’t find the BattleQuoteTable. I tried making a BattleQuotes.event file, like I saw in another buildfile, but POIN BattleQuoteTable gives me an undefined identifier error when compiling.

That’s because you haven’t defined BattleQuoteTable. Are you trying to start from scratch with all battle quotes or edit vanilla quotes?

If you’re editing vanilla quotes, then a CSV file will be best.

If not, then the macros I posted above will be your friends.
For the macros, you need a format like the following:

BattleQuoteTable: // This is in free space
    // All your battle quote entries go here.
BYTE 0xFF 0xFF 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 // Terminator

Here, we’re starting a brand new table. BattleQuoteTable is an EA label (similar to a definition). Your repointer (the one with the PUSH/ORG/POIN/POP) should work now that your table is defined.