Can't figure out what's wrong with script

I’ve already combed through this script multiple times, and I can’t seem to find the issue. Event Assembler tells me everything is fine when I run it through, but whenever I open the ROM, the entire game is messed up. The script is written in the spoiler. If anyone can take a look through it and perhaps tell me if there’s something wrong, I’d really appreciate that. The title and opening scene of the game is fine, but when I go to the menu, it no longer works (screenshot below).

[details=The script]#include EAstdlib.event

EventPointerTable(0x7,ThisChapter)

ORG 0x8B0890
ALIGN 4
ThisChapter:

POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno Dunno Dunno
POIN Tutorial
POIN Ballista1 Ballista2
POIN Units1 Units1
POIN $0 $0 $0 $0 $0 $0
POIN BeginningScene EndingScene

TurnBasedEvents:
TURN

CharacterBasedEvents:
CHAR 0x12 JayRecruitment Eirika Gerik 0x00
END_MAIN

JayRecruitment:
MUSS 0x30
Text(0x099A)
CUSA 0x14
MURE 5
ENDA

LocationBasedEvents:
END_MAIN

MiscBasedEvents:
DefeatBoss(EndingScene)
AFEV

Dunno:
//DO NOT TOUCH
BYTE $00

Tutorial:
//DO NOT TOUCH
BYTE $00

Ballista1:
BLST

Ballista2:
BLST
ALIGN 4

Units1:
UNIT Eirika 0x02 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EirikaREDA [0x09,0x6C] NoAI
UNIT Ephraim 0x01 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EphraimREDA [0x78,0x6C] NoAI
UNIT Lute 0x26 0x0 Level(1,Ally,0) [9,12] 0x00 0x00 0x0 LuteREDA [0x38,0x6C] NoAI
UNIT

EirikaREDA:
REDA [7,10] 0x0 0x0 0x0 0x0

EphraimREDA:
REDA [9,10] 0x0 0x0 0x0 0x0

LuteREDA:
REDA [8,10] 0x0 0x0 0x0 0x0

Units2:
UNIT 0x86 0x13 0x0 Level(2,Enemy,0) [6,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x81 0x19 0x0 Level(2,Enemy,0) [7,6] 0x2 0x0 0x0 0x0 [0x2D] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [8,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x84 0x09 0x0 Level(1,Enemy,0) [3,3] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [6,4] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x14 0x0F 0x0 Level(2,Enemy,0) [4,2] 0x00 0x0 0x0 0x0 [0x1] GuardTileAI
UNIT 0x46 0x4E 0x0 Level(5,Enemy,0) [10,2] 0x00 0x0 0x0 0x0 [0x14,0x1C] GuardTileAI
UNIT

BeginningScene:
CAM1[7,7]
FADU 30
LOAD2 0x1 Units1
LOAD1 0x2 Units2
ENUN
Text(0x0908)
CAM1 Gerik
Text(0x090E)
FADU 30
ENDA

EndingScene:
STAL 0x01
Text(0x03,0x0954)
ENUN
MUSC 0x29
Text(0x20,0x0962)
MNCH 0x02
ENDA

MESSAGE Events end at offset currentOffset[/details]

Are you able to scroll through to different options, or does the game simply lock at that screen?

Try ORG’ing the data to guaranteed freespace(somewhere you know is guaranteed to have no pre-existing data). I recommend going to a working back-up and trying on a copy of that back-up. Try inserting the data a couple lines ahead of the end of the ROM and see if the issue persists.

Is this definitely free space? I’m not really familiar with the FE8 ROM but this is the first thing I’d look at.

It isn’t actually, i used the hex editor of FEBuilder to look at the pointer and the program says that is the
start of a “map setting”.

I placed it in some free space, but now the game just skips over the chapter and plays the opening intro again.

[details=Summary]#include EAstdlib.event

EventPointerTable(0xA,ThisChapter)

ORG 0xB2A610
ALIGN 4
ThisChapter:

POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno Dunno Dunno
POIN Tutorial
POIN Ballista1 Ballista2
POIN Units1 Units1
POIN $0 $0 $0 $0 $0 $0
POIN BeginningScene EndingScene

TurnBasedEvents:
TURN

CharacterBasedEvents:
CHAR 0x12 JayRecruitment Eirika Gerik 0x00
END_MAIN

JayRecruitment:
MUSS 0x30
Text(0x099A)
CUSA 0x14
MURE 5
ENDA

LocationBasedEvents:
END_MAIN

MiscBasedEvents:
DefeatBoss(EndingScene)
AFEV

Dunno:
//DO NOT TOUCH
BYTE $00

Tutorial:
//DO NOT TOUCH
BYTE $00

Ballista1:
BLST

Ballista2:
BLST
ALIGN 4

Units1:
UNIT Eirika 0x02 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EirikaREDA [0x09,0x6C] NoAI
UNIT Ephraim 0x01 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EphraimREDA [0x78,0x6C] NoAI
UNIT Lute 0x26 0x0 Level(1,Ally,0) [9,12] 0x00 0x00 0x0 LuteREDA [0x38,0x6C] NoAI
UNIT

EirikaREDA:
REDA [7,10] 0x0 0x0 0x0 0x0

EphraimREDA:
REDA [9,10] 0x0 0x0 0x0 0x0

LuteREDA:
REDA [8,10] 0x0 0x0 0x0 0x0

Units2:
UNIT 0x86 0x13 0x0 Level(2,Enemy,0) [6,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x81 0x19 0x0 Level(2,Enemy,0) [7,6] 0x2 0x0 0x0 0x0 [0x2D] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [8,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x84 0x09 0x0 Level(1,Enemy,0) [3,3] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [6,4] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x14 0x0F 0x0 Level(2,Enemy,0) [4,2] 0x00 0x0 0x0 0x0 [0x1] GuardTileAI
UNIT 0x46 0x4E 0x0 Level(5,Enemy,0) [10,2] 0x00 0x0 0x0 0x0 [0x14,0x1C] GuardTileAI
UNIT

BeginningScene:
CAM1[7,7]
FADU 30
LOAD2 0x1 Units1
LOAD1 0x2 Units2
ENUN
Text(0x0908)
CAM1 Gerik
Text(0x090E)
FADU 30
ENDA

EndingScene:
STAL 0x01
Text(0x03,0x0954)
ENUN
MUSC 0x29
Text(0x20,0x0962)
MNCH 0x02
ENDA

MESSAGE Events end at offset currentOffset[/details]

If you were trying to hack MissingNo into FE, that’s working properly

…On a more serious note, if the whole game fucks up like that, that just means that you haven’t inserted your events into free space. If the events are glitchy, your problems usually start when the events are executed (i.e. whenever you enter the chapter). If the problem is (from the looks of it) on the main screen, that means you’ve overwritten some important data.

My suggestion would be to create a big area of free space in your ROM, or even at the end of your ROM, and assemble your events there.

The events seem fine anyway. Just don’t use “ALIGN 4” twice. It’s not gonna cause issues most likely, but it’s better to have a single one of that.

I decided to test it with a clean ROM and it worked (after I made some tweaks to the script), but it still is giving me the same issue with the ROM I need to actually change, since that ROM has the prologue chapter edited as well.

[details=Summary]#include EAstdlib.event

EventPointerTable(0xA,ThisChapter)

ORG 0xE57180
ALIGN 4
ThisChapter:

POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno Dunno Dunno
POIN Tutorial
POIN Ballista1 Ballista2
POIN Units1 Units1
POIN $0 $0 $0 $0 $0 $0
POIN BeginningScene EndingScene

TurnBasedEvents:
TURN

CharacterBasedEvents:
CHAR 0x12 JayRecruitment Eirika Gerik 0x00
END_MAIN

JayRecruitment:
MUSS 0x30
Text(0x099A)
CUSA 0x14
MURE 5
ENDA

LocationBasedEvents:
END_MAIN

MiscBasedEvents:
DefeatBoss(EndingScene)
AFEV

Dunno:
//DO NOT TOUCH
BYTE $00

Tutorial:
//DO NOT TOUCH
BYTE $00

Ballista1:
BLST

Ballista2:
BLST
ALIGN 4

Units1:
UNIT Eirika 0x02 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EirikaREDA [0x09,0x6C] NoAI
UNIT Ephraim 0x01 0x0 Level(1,Ally,0) [17,8] 0x00 0x00 0x1 EphraimREDA [0x78,0x6C] NoAI
UNIT Lute 0x26 0x0 Level(1,Ally,0) [9,12] 0x00 0x00 0x0 LuteREDA [0x38,0x6C] NoAI
UNIT

EirikaREDA:
REDA [7,10] 0x0 0x0 0x0 0x0

EphraimREDA:
REDA [9,10] 0x0 0x0 0x0 0x0

LuteREDA:
REDA [8,10] 0x0 0x0 0x0 0x0

Units2:
UNIT 0x86 0x13 0x0 Level(2,Enemy,0) [6,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x81 0x19 0x0 Level(2,Enemy,0) [7,6] 0x2 0x0 0x0 0x0 [0x2D] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [8,7] 0x2 0x0 0x0 0x0 [0x01] AttackInRangeAI
UNIT 0x84 0x09 0x0 Level(1,Enemy,0) [3,3] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x85 0x05 0x0 Level(2,Enemy,0) [6,4] 0x00 0x0 0x0 0x0 [0x14] AttackInRangeAI
UNIT 0x14 0x0F 0x0 Level(2,Enemy,0) [4,2] 0x00 0x0 0x0 0x0 [0x1] GuardTileAI
UNIT 0x46 0x4E 0x0 Level(5,Enemy,0) [10,2] 0x00 0x0 0x0 0x0 [0x14,0x1C] GuardTileAI
UNIT

BeginningScene:
CAM1[14,0]
FADU 30
LOAD2 0x1 Units1
LOAD1 0x2 Units2
ENUN
Text(0x0908)
Text(0x090E)
FADU 30
ENDA

EndingScene:
STAL 0x01
Text(0x03,0x0954)
ENUN
MUSC 0x29
Text(0x20,0x0962)
MNCH 0x02
ENDA

MESSAGE Events end at offset currentOffset[/details]

1 Like