I've been playing with the fire emblem modding tools for a few days now, and I finally got around to writing custom events. I Injected the event into my own custom map, and it loads up fine: All the units I placed are there, everything works, I can attack enemies, etc. But, after turn 1 is finished (as in both player and enemy parties have finished their first actions) the game goes back to the main menu. I can't for the life of me figure out what the issue is.
Here's the event I wrote, nothing special, just a custom test map with some random enemies, no cut scenes or anything:
#define DISABLE_TUTORIALS
#include EAstdlib.event
EventPointerTable(0x06,Pointers)
ORG 0xD80000
Pointers:
POIN Turn_events
POIN Character_events
POIN Location_events
POIN Misc_events
POIN TrapData TrapData
POIN Bad Bad Bad Bad
POIN Good Good Good Good
POIN Opening_event Ending_event
Good:
UNIT 0x03 0x02 0x00 Level(3, Ally, 1) [16,11] [16,11] [0x0A, 0x6B] NoAI
UNIT 0x61 0x0A 0x03 Level(3, Ally, 1) [16,11] [17,10] [0x05, 0x6B] NoAI
UNIT 0x61 0x2A 0x03 Level(1, Ally, 1) [16,11] [15,10] [0x03, 0x21] NoAI
UNIT 0x61 0x20 0x03 Level(3, Ally, 1) [16,11] [17,12] [0x37, 0x6B] NoAI
UNIT 0x61 0x12 0x03 Level(4, Ally, 1) [16,11] [18,11] [0x26, 0x28] NoAI
UNIT
Bad:
UNIT 0x61 0x16 0x00 Level(1, Enemy, 1) [3,1] [3,1] [0x16, 0x20] [GuardTile]
UNIT 0x5F 0x1D 0x00 Level(4, Enemy, 1) [5,1] [5,1] [0x4D] [Heal]
UNIT 0x5F 0x14 0x00 Level(2, Enemy, 1) [4,4] [4,4] [0x14] [AttackInRange]
UNIT 0x5F 0x14 0x00 Level(2, Enemy, 1) [2,4] [2,4] [0x14] [AttackInRange]
UNIT 0x5F 0x14 0x00 Level(2, Enemy, 1) [10,8] [10,8] [0x14] [AttackInRange]
UNIT 0x5F 0x39 0x00 Level(2, Enemy, 1) [15,7] [15,7] [0x1F] [AttackInRange]
UNIT 0x5F 0x39 0x00 Level(2, Enemy, 1) [17,8] [17,8] [0x1F] [AttackInRange]
UNIT 0x5F 0x39 0x00 Level(2, Enemy, 1) [10,2] [10,2] [0x1F] [AttackInRange]
UNIT 0x5F 0x38 0x00 Level(3, Enemy, 1) [9,12] [9,12] [0x14] [AttackInRange]
UNIT 0x5F 0x38 0x00 Level(3, Enemy, 1) [9,10] [9,10] [0x14] [AttackInRange]
UNIT 0x5F 0x38 0x00 Level(3, Enemy, 1) [2,8] [2,8] [0x14] [AttackInRange]
UNIT 0x5F 0x38 0x00 Level(3, Enemy, 1) [4,8] [4,8] [0x14] [AttackInRange]
UNIT 0x5F 0x0A 0x00 Level(3, Enemy, 1) [2,12] [2,12] [0x01] [AttackInRange]
UNIT 0x5F 0x13 0x00 Level(1, Enemy, 1) [15,2] [15,2] [0x1F] [AttackInRange]
UNIT 0x5F 0x18 0x00 Level(2, Enemy, 1) [13,0] [13,0] [0x32] [AttackInRange]
UNIT 0x5F 0x28 0x00 Level(3, Enemy, 1) [11,5] [11,5] [0x15, 0x02] [AttackInRange]
UNIT
Turn_events:
TurnEventPlayer(0x0,Opening_event,1)
End_MAIN
Character_events:
End_MAIN
Location_events:
End_MAIN
Misc_events:
CauseGameOverIfLordDies
End_MAIN
TrapData:
End_MAIN
Opening_event:
OOBB
LOU1 Good
ENUN
LOU1 Bad
ENUN
ENDA
Ending_event:
ENDA
// Events
// Manual Movement
// Scripted Fights
// Units
// Shop Data
MESSAGE Events end at offset currentOffset