[Solved][Fe8] Loading Chapter resets game?


#1

So I started using Fe8 to do hacking and I am still learning, but this is something odd because I don’t see how it works.

Febuilder asked for me to patch the rom with that anti-huffman patch or something and I did that, so does this problem come from that patch or something else I programmed?

I originally took out the warp command because it kept telling me it was wrong, so I did that and got the result the title is giving. I would also like to know about the warp command. I used the definition from EA, but it still doesn’t work/I don’t know what to do.
Thanks

Events are right here:

#include EAstdlib.event

EventPointerTable(0x07,PointerList)

ORG 0x1000000

PointerList:
POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno1 Dunno2 Dunno3 Tutorial
POIN Traps1 Traps2
POIN Units1 Units1 //This unit group determines the number and position of deployment slots when there is a prep screen
POIN $0 $0 $0
POIN $0 $0 $0
POIN BeginningScene EndingScene

TurnBasedEvents:
END_MAIN

CharacterBasedEvents:
END_MAIN

LocationBasedEvents:
END_MAIN

MiscBasedEvents:
CauseGameOverIfLordDies
END_MAIN

Dunno1:
END_MAIN

Dunno2:
END_MAIN

Dunno3:
END_MAIN

Tutorial:
END_MAIN

Units1:
UNIT Eirika EirikaLord 0x00 Level(1, Ally, 1) [23,26] 0x00 0x00 0x0 0x00 [Rapier, Vulnerary, Elixir] NoAI
UNIT Ephraim EphraimLord 0x00 Level(1, Ally, 1) [21,26] 0x00 0x00 0x0 0x00 [Reginleif, Javelin, Elixir] NoAI
UNIT Seth Paladin 0x00 Level(1, Ally, 1) [22,26] 0x00 0x00 0x0 0x00 [SteelSword, SilverLance] NoAI
UNIT

EnemyUnits:
UNIT ONeill Knight 0x00 Level(3, Enemy, 1) [7,2] 0x00 0x00 0x0 0x00 [Javelin] NeverMoveAI
UNIT 0x80 Soldier ONeill Level(1, Enemy, 1) [3,23] 0x00 0x00 0x0 0x00 [Javelin] NeverMoveAI
UNIT 0x80 Soldier ONeill Level(1, Enemy, 1) [2,17] 0x00 0x00 0x0 0x00 [Javelin] NeverMoveAI
UNIT 0x80 Soldier ONeill Level(1, Enemy, 1) [10,18] 0x00 0x00 0x0 0x00 [IronLance] NoAI
UNIT 0x80 Soldier ONeill Level(1, Enemy, 1) [15,18] 0x00 0x00 0x0 0x00 [IronLance] NoAI
UNIT 0x80 Soldier ONeill Level(1, Enemy, 1) [13,14] 0x00 0x00 0x0 0x00 [IronLance] NoAI
UNIT 0x80 Fighter ONeill Level(1, Enemy, 1) [21,4] 0x00 0x00 0x0 0x00 [IronAxe] NoAI
UNIT 0x80 Fighter ONeill Level(1, Enemy, 1) [22,8] 0x00 0x00 0x0 0x00 [IronAxe] NoAI
UNIT 0x80 Fighter ONeill Level(1, Enemy, 1) [23,13] 0x00 0x00 0x0 0x00 [IronAxe] NoAI
UNIT 0x80 Fighter ONeill Level(1, Enemy, 1) [24,14] 0x00 0x00 0x0 0x00 [IronAxe] NoAI
UNIT 0x80 Fighter ONeill Level(1, Enemy, 1) [22,18] 0x00 0x00 0x0 0x00 [IronAxe] NoAI
UNIT

LyonWarp:
UNIT 0x80 Necromancer 0x00 Level(3, Enemy, 1) [22,22] 0x00 0x00 0x0 0x00 [Javelin] NoAI
UNIT

Traps1:
ENDTRAP
ALIGN 4

Traps2:
ENDTRAP
ALIGN 4

BeginningScene:
LOAD1 0x1 Units1 //0x0 instead of 0x1 seems to be for allies on maps with prep screens
ENUN
CAM1 [22,25]
CUMO [22,25]
CURE
MOVE 3 Ephraim [21,25]
ENUN
MOVE 3 Eirika [23,25]
ENUN
MOVE 3 Seth [22,25]
ENUN
CUMO [21,25]
CURE
TEXTSTART
TEXTSHOW 0xA47
TEXTEND
REMA
CUMO [22,22]
CURE
WARP_IN LyonWarp 2 2
LOAD1 0x1 EnemyUnits
ENUN // GotoPrepScreen
ENDA

EndingScene:
TEXTSTART
TEXTSHOW 0xA47
TEXTEND
REMA
MNC2 0x1 //go to ch1
NoFade
ENDA


#2

Anti-huffman just changes the way text works.
It makes it easier to insert new text, it doesn’t affect any already existing text either.
It’s certainly not the cause of your problem.

When you say reset, what do you mean exactly, when does this happen and what are the effects?


#3

As soon as I enter the chapter and after the little animation at the beginning stating what chapter it is, the game will reset immediately. All the way back to the health and safety.


#4

What amulator are you using?
Does it still happen if you use the events for another chapter?

You should probably make a report and let 7743 know.
We can sit here trying to guess all day but there’s really no way to know what you have done to your ROM.


#5

I’ll find a fix or workaround, or just use a completely different rom.

Anyways, for my other question, how do I get the WARP_IN to actually work in EA? I tried this:
WARP_IN LyonWarp [22,22]
ENUN

I keep getting stuff like:

Incorrect parameters in code WARP_IN Atom [Atom, Atom]


#6

Look at the raws in the Language raws folder, or use the macro.


#7

Just off a quick glance, I’d assume that “LyonWarp” is meant to be the unit name, rather than the event name. Try using just “Lyon” or something defined correctly.


#8

I’ll try it


#9

I’m pretty sure warp would use coords from a setval slot instead of taking them like that. Again, just check the raws, whatever those say is what goes.


#10

The raws say the following:
#Uses the coord data in rB
WARP_OUT, 0x4120, 4, -game:FE8 -indexMode:8
0xFFFF, 2, 2, -fixed

WARP_IN, 0x4121, 4, -game:FE8 -indexMode:8
0xFFFF, 2, 2, -fixed
Now the part I don’t understand is what to actually put into this line of code. Mainly 0xFFFF, I have understood most the raws pretty well up to this point.


#11

Well, there are no arguments for you to fill here, 0xFFFF is fixed so you don’t do anything with that, the raw is literally just WARP_IN, everything else it gets from memory slots.

An example from my second chapter of the first blitz:


#12

This may or may not be relevant, but have you edited the chapter map or the offset or the pointer to it? From my experience, if the map’s data is invalid/corrupted, the game will reset itself before any of the events can play out. Another possibility is that you/something may have overwritten some vital code for the game that causes it to malfunction(I am not sure where freespace starts in an FE8 ROM, though I expect this to be unlikely).


#13

I took another clean rom in place of the one I mentioned above, and it seems to work now.

I created my own freespace out of fear of replacing something important.


#14

thanks, I will check this out


#15

Okay so now I am making process, the warp animation pops up and I hear the sound effects.

The only thing now is how do I set the warp animation to where the unit spawns? For instance, lyon is supposed to load on [22,22] and the warp animation goes off somewhere else.

I understand that 0xB is supposed to deal with the coordinates, but I have no idea how to make 0xB make the warp animation go to [22,22].


#16

That stores data to the memory slot 0xB, which is what the opcode reads from, 0x20009 = 0x00020009 = [2,9]
So if you want 22,22 you want it to be 0x160016 (0x16 = 22).
Or you can do it the proper way and grab the coords from the unit and stuff like that but I don’t do events I don’t know how to even begin to attempt that.

Although I don’t remember if it’s absolute coords or relative to the screen, I do remember it being funky. I suggest you just join the discord and ask the eventers.


#17

The warp animation uses absolute coordinates.

I would suggest using the warp macros so you don’t have to deal with this stuff. They’re easy.

#define WarpIn(X,Y,UnitPointer) "SVAL 0xB Coords(X,Y) ; WARP_IN ; LOAD1 0x1 UnitPointer ; ENUN"
#define WarpOut(X,Y,Character) "SVAL 0xB Coords(X,Y) ; WARP_OUT ; DISA Character"

#18

Thanks!