Battle/Death Quotes via Event: Macros

Hey guys! Just some quick macros I put together for doing your death quotes and specified battle quotes by events. The idea is to completely abandon the Nightmare modules but you can use both if you like.

Doing these by events have several particular advantages over using Nightmare, including being able to set specific battle music for character 1 fighting character 2 (e.g. songs with an introduction, like Tearing Shadows from FE12), the ability to set special death music for certain characters, bigger control over event IDs when characters die e.g. setting their death quote to trigger both 0x23 and 0x02, which changes the map music and allows you to use 0x23 for something else. Sometimes NPC characters won’t have their death quote IDs properly register or won’t have the “death” theme play when they die, which can be easily rectified by instead using events.

Simply put, if you know how to do events, there’s no reason to not use them in these instances.

Anyway, without further ado, here they are:

Death quotes:

#include EAstdlib.event
#define DQTableOffset 0xC9F2EC
#define DeathQuoteTable(index,CharacterID,TextPointer,EventPointer,TriggerID) "ORG DQTableOffset+(16*index); BYTE CharacterID; BYTE 0x43; ALIGN 4; SHORT TextPointer; ALIGN 4; POIN EventPointer; BYTE TriggerID; ALIGN 4"

A sample:

//obviously set this to include your own definitions files, too
#include EAstdlib.event

//Death quote events
#define DQTableOffset 0xC9F2EC
#define DeathQuoteTable(index,CharacterID,ChapterID,TextPointer,EventPointer,TriggerID) "ORG DQTableOffset+(16*index); BYTE CharacterID; BYTE ChapterID; ALIGN 4; SHORT TextPointer; ALIGN 4; POIN EventPointer; BYTE TriggerID; ALIGN 4"

//The List
DeathQuoteTable(0x00,Henrick,0x43,0x00,HenrickDies,0x65)//TextPointer MUST be 0x00 if you want to use events

//Death Quote Events

ORG 0x71ED5C//you should only need to do this once

HenrickDies:
MUS1 HeroHasFallen
TEX1 0x7A8
ENUT 0x45
ENUT 0x02
ENDA

Specified Battle Quotes (note that Unspecified Battle Quotes do not seem to support event-hackery)

#define BQListOffset 0xC9EDA0
#define BattleQuoteTable(index,Character1,Character2,Chapter,TextPointer,EventPointer,ID) "ORG BQListOffset+(16*index); BYTE Character1; BYTE Character2; BYTE Chapter; ALIGN 4; SHORT TextPointer; ALIGN 4; POIN EventPointer; BYTE ID; ALIGN 4"

These of course assume that each table is in its default address–obviously you can adjust that as needed.

1 Like

If you take out the Chapter ID part, will it trigger on any chapter?

I think you need to set it to 0x43 Any Chapter? I’ll have to have a look at another time.

1 Like
#define DeathQuoteTable(index,CharacterID,TextPointer,EventPointer,TriggerID) "ORG DQTableOffset+(16*index); BYTE CharacterID; BYTE 0x43; ALIGN 4; SHORT TextPointer; ALIGN 4; POIN EventPointer; BYTE TriggerID; ALIGN 4"

If you add this, it’ll function as @TheSws64 describes.

1 Like

Does this have to be in a separate text file or could it be in the FE7 Definitions file? And where about should I put the Offset? I know there isn’t really a set answer to the second question, but for organization, where is a good place to put it?

I suppose you could put it in the FE7 definitions file if you wanted to–it would just mean that it would get written to the game every time you write other events, too. As for the offset… well, where do you put your events normally? :confused:

I also (finally) amended the macro as such. Thanks @Arch!

What is the offset for on the table? I mean, I know what offsets are and such, but what is written in this one?

the answer is in the first post, my boy

There is another offset:

What is this one for? And should I use the offsets you used? I’m using FE7, and I’m guessing you are too? Sorry to ask all these questions. It sucks to be new to something like this…

That offset is one I used on my own, you just need to use any free offset which you need to figure out on your own. In my ROM that is free space; in yours, probably not. You should not be changing anything else within the macro.

(This is an event issue and would best be solved by making a more general enquiry, by the way)

At first it appears that FE8 cannot do events via Battle/Death quotes, since it isn’t in the nightmare module and it is never actually used in the game.

#However!
It turns out that the last 4 bytes of the Death Quote table and the Battle Quotes table are actually pointers to event data!

So here are some macros for FE8.

Death Quotes:

#define DQTableOffset 0x9ECD4C
#define DeathQuoteTable(index,CharacterID,TextPointer,EventPointer,TriggerID) "ORG DQTableOffset+(12*index); BYTE CharacterID; ALIGN 2; SHORT 0xFFFF; SHORT TriggerID; SHORT TextPointer; POIN EventPointer; "

Alternatively if you want death quotes to change by chapter:

#define DQTableOffset 0x9ECD48
#define DeathQuoteTable(index,CharacterID,Chapter,TextPointer,EventPointer,TriggerID) "ORG DQTableOffset+(12*index); SHORT CharacterID; BYTE 0xFF; BYTE Chapter; SHORT TriggerID; SHORT TextPointer; POIN EventPointer; "

Battle Quotes:

#define BQListOffset 0x9EC6BC
#define BattleQuoteTable(index,Character1,Character2,Chapter,TextPointer,EventPointer,ID) "ORG BQListOffset+(16*index); SHORT Character1; SHORT Character2; SHORT Chapter; SHORT ID; SHORT TextPointer; ALIGN 4; POIN EventPointer;"

And some updated Nightmare Modules to reflect the new findings:

EDIT: Updated some problems with the macros, i.e. that Death Quotes are 12 bytes long, not 16. This is also true for FE7, which means the original macros by @Agro probably also need fixing.

1 Like