Pay-to-recruit Events

Waaay back in the day I was working on FE4A and came to a point where I couldn’t keep procrastinating on Beowulf’s recruitment. I spent the last half an hour figuring out how these pay-to-recruit events worked. I figured I’d share my findings in case anyone else wanted an event like this.

CODE 0x87 0x0 0x0 0x0
TEX1 0xCC4
IFAF 0x3 0x7D3F9
CODE 0x1D 0x0 0x0 0x0 0xB9 0xA3 0x7 0x8 0xC6 0xC 0x0 0x0 0xC5 0xC 0x0 0x0
CODE 0x1E 0x0 0x0 0x0
IFYN 0x4
ELSE 0x5
ENIF 0x3
TEX4 0xCC8
ELSE 0x9
ENIF 0x4
CODE 0x5A 0x0 0x1 0x0 0xB9 0xA3 0x7 0x8
TEX4 0xCC7
TEX4 0xCC9
ELSE 0x9
ENIF 0x5
CODE 0x5A 0x0 0x1 0x0 0xB9 0xA3 0x7 0x8
TEX4 0xCC7
MUS2 0x42
CODE 0x7A 0x0 0x6 0x0
CUSI 0x1F $00
ASMC 0x7D415
ENIF 0x9
CODE 0x89 0x0 0x0 0x0

This is the event disassembled from Chapter 25H (with some edits done by me) which recruits Farina. Farina is the game’s Pay-to-recruit character.

At 0007D410 the first two bytes should be 1F 4E, that means 19999 in hex.

At 0007D420 the first two bytes should be 20 4E, 20000 in hex.

Farina wants 20000 gold for her recruitment. You can keep this amount if you so desire, but you can also change the amount of gold required to recruit the unit. The 1F 4E is one below the amount required. The ASM condition is checking for the amount of gold you have. If you have 19999 gold or below the game won’t give you the Yes/No option on recruiting Farina. Change 20 4E to the amount it will require to recruit and 1F 4E to 1 gold below that. This ASM condition also takes care of subtracting the gold (the game subtracts 20 4E or whatever you replace it with). To get the hex values for whatever amount of gold you want you can use MS Calculator.

In the original event Farina joined when you ended your turn, one of my edits is that the unit will now join right after you hire them. The unit you use for this event can be any unit, just change the value 0x1F next to the CUSI command.

Copy the above event into your events file and customize it to your heart’s content. For the sake of convenience I left the text commands from the original event (personally I’d just edit those text slots, less of a hassle that way). Enjoy!


~This is for FE8 only!~
Aaaaand after hours of disassembling and testing (and some help from Vennobennu) I finally managed to isolate Rennac’s payment conditions from the rest of the events.
With this, you can:

  • set the amount of money you want to be paid directly in your events (no ASMC required)

  • set whatever condition you want. For example, if you want to hire some NPC mercenaries that will help you for the chapter, with this code you can do it! ^-^ Really, just get creative!

     _SETVAL 0x4 0x03E8 // this sets the amount of gold that must be payed (in this case, 03E8 in hex=1000)
      _0x1928 // unknown, but necessary to execute the "question" properly
      _0x0C45 0x0 0xC 0x4 // Do you have the money? Memory slot 0x4 has the money stored
      _0x0220 0x3 // unknown, but necessary
      Text(0x0B14) // this has a [Yes] command. Just use any text with a [Yes] command
      _SETVAL 0x7 0x1 // Checks for a 'Yes' being chosen
      _SETCONDITION2 0x1 0xC 0x7 // checks for 0x7, the value of Yes
      _0x0620 0x32 // these three codes subtract the amount of money from your funds
      _0x0620 0x43 // see above
      _0x3722 // see above
      //CALL events that happen "if you have the money and you choose Yes". Better to include ENDB or things may screw up
      ELSE 0x2
      ENIF 0x0
      //CALL events that happen "if you don't have the amount of money." The Yes/No choice isn't even displayed.
      ENIF 0x1
      //CALL events that happen "if you DO have the money, but you said No".
      ENIF 0x2

Enjoy! :wink:


You the man, Alfred! I really appreciate all of the FE8 support you’ve been contributing.

I’ll go look into FE6 too, and we’ll have documentation for all three games on this one.

Haha great! :wink:

Also, thanks. I’m glad to know I’m being helpful. I had a hard time with FE8 because of tha lack of documentation, and I don’t want anybody else to go through the same pain. XP


Thanks for stepping up, Alfred!

This almost makes me want to hack FE8 instead of FE7.