[FE7] Talk-to-lord AI Notes

In FE7 there is a specific AI command that tells Farina to talk to Hector. I’ve had to use this AI for FE4A and I figured I should post my notes on making things work for others just in case they want to use this feature.

First of all, without ASM hacking you can only do this once throughout your entire game. The AI command doesn’t say “talk to the main lord” as some people have previously suggested. You must specify which character to talk to and which two characters the conversation is between.

0x06,0x0B,0x0A,0x00 is the AI we’ll be using. Simply give the character you want to move and talk to another character this AI.

b97FE0: the ID of person the character will move toward.
1D3B54: The IDs of people who have the convo. First the initiator (character with the AI) and then the other character.

In FE4A I used this AI to have Alvis (7A) talk to Sigurd (03) in the prologue. At b97FE0 I wrote 03. At 1D3B54 I wrote 7A 03.

Special thanks to Nintenlord for his huge help with this. My notes are nearly 100% based off his findings.


I made a macro for custom Talk-To AI.

#define SeekAndTalkThenOtherwise(convoChars, target, startLabel, thenLabel, otherwiseLabel) "MoveTowardsIfOutOfRange(target); ConditionalGoto(4,EQ,otherwiseLabel); ConditionalGoto(2,NE,startLabel); InitiateTalk(convoChars); Goto(thenLabel)"
//convoChars is a list of 2 bytes of the characters. First the initiator, then the talk-to person.
//target is the actual targetted character
//startLabel is a label right before this command.
//thenLabel is a label number to GOTO after they talk.
//otherwiseLabel is a label number to GOTO if the one to look for is not deployed.

With these being the definitions of the macros inside the macro:

#define MoveTowardsIfOutOfRange(charID) "BYTE 0x0D 0x00 0xFF 0x00; WORD charID; WORD 0x00000000; WORD 0x00000000"

#define ConditionalGoto(constant, comparator, label) "BYTE 0x00 comparator 0xFF label; WORD constant; WORD 0x0203A972; WORD 0x00000000"

#define Label(label) "BYTE 0x1B 0x00 0xFF label; WORD 0x00000000; WORD 0x00000000; WORD 0x00000000"

#define Goto(label) "BYTE 0x03 0x00 0xFF label; WORD 0x00000000; WORD 0x00000000; WORD 0x00000000"

#define Routine_AI(routine, paramPointer) "BYTE 0x01 0x64 0xFF 0x00; WORD 0x00000000; POIN routine; POIN paramPointer"

#define InitiateTalk(charsPointer) "Routine_AI(0x0803A58D, charsPointer)"

And here’s a demo of it in action:

AI1PointerTable(0x01, TalkToLyn)


UNIT Sain Cavalier 0x00 Level(1,NPC,False) [14,9] [14,9] [IronSword] [0x1, 0x3, 0x0, 0x0]


TURN 0x00 OpeningScene [01,00] 0x0 0x00
AFEV 0x0B SainJoins 0x0A

CHAR 0x0A SainLyn Sain Lyn $00000000
CHAR 0x0A SainLyn Lyn Sain $00000000


CUSI Sain $47

TEX1 0x838


SeekAndTalkThenOtherwise(TalkCharacters, Lyn, 0, 1, 1)
DefaultAction //AttackInRange... I'm trying to find a better, untaken name for it. Or free up the name.


BYTE Sain Lyn 0x00 0x00

I’ll probably make a Tech Demo of this eventually.

What this does is that Sain seeks out and talks to Lyn. Once he does, he turns into an Other Unit and will attack enemies in his range.