[FE8][WIP][DOC][TUTO] How to edit a bit the FE8 tutorial

Hi everyone,
This is a work in progress where i will put data and explanations on how to edit the tutorial, and where to search.
Any help would be welcomed.
I’m using FEBuilderGBA Event Editor (Adv) to search and edit all of this. So a big thanks to @7743.

Let’s start with the most basic data:
Some pointers to table of pointers:
89E85FC → Most of the tutorial events pointers of Chap0, not all of them. It’s splitted in two by a NOP, tutorial events pointers are before this NOP → after the NOP that’s places used to repoint to tutorial events.

[details=Let’s picture this]
[/details]
It also appears that tutorial pointers (at least for chapter 0) are 0x89EFXXX-like.

Now let’s have a look to this first pointer: 0x89EF2B0

[details=The First Pointer]
[/details]
So what do we have here? Let’s have a closer look. As you can see, we have two hex values like this ; 0x91X → these are Text ID. If you open a Text Editor to these text ID, you may see that’s these are dialogues about, well, “how to move”.
0x50004 → This is the coordinates of the flashing cursor appearing to tell you where to move.
The 5 correspond t0 the Y axis. It’s starting at 0. So here the cursor is on the 6th tile from the top of the screen. This can’t be high than F. That’s a one bit instruction. (By the way, the basic GBA screen is like 10 tiles in height and 15 for the width, so that’s not a problem, you won’t make a cursor that is out of the map.)
So the 4 correspond to the X axis. Startint at 0 and going left to right.
Do you see those two 0x80058? That’s for tutorial box. the left 8 and the 5 are coordinates (Y - X as for the cursor) of the top left hand corner tiles of the tutoBox. The right 8 is doing, well i have no idea of what it’s doing… Oh wait breaking news:
This second 8 is a kind of “precision” coordinate. It makes you able to move the position of this INSIDE a normal tile size. That’s interesting.

Now you can see 3 pointers to events. The first one is a pointer to the next event of this part of the tutorial. It’s where the “real” cursor is. Because the cursor we saw at 89EF2B0 is just a decoration, to picture what the tutorial box is telling you.
The second pointer, well it’s pointer where we already are. I don’t know why, I don’t know the routine that’s behind this.
And the last pointer is a link to the magic part that made this working properly.

Let’s go to the 0x89EF328 pointer.

Pretty similar to the precedent

Well that’s the same as before: 0x50004 coordinates of the cursor. Except this time this cursor is not a decoration. It’s where you need to click/move. Give it a try, just move coordinates of the precedent cursor and not these ones, you will understand.
The final 0x10A value may be a routine that’s waiting for the player to press the A button. Don’t edit it.
The 0xFFFB3D20 value should be to edit which value of the menu you need to press (but there’s only one which is wait in the original tutorial.)

The following event pointed by 0x89EF388:

Here's a screen

I don’t really know what’s doing the 0x10B41 value, but the second WORD BIN is the next important event.
In fact this event at 0x89EF398 is happening after 0x89EF060: And both of them are not Tutorial Events.
0x89EF060 is just when Seth gives the rapier to Eirika.

As you may see, here we completed observations of the 4 first pointers of the table.

Let’s move to 0x89EF46C:

New pointer, new event, new cursor !"

So thanks to @circleseverywhere we now know that these pointers are for the storage, but not for the logic. But to edit just a bit the tutorial, editing what is stored is enough.
Let’s look what we have now. So this is the first part of “how to attack”. You know, when it’s telling us to put the cursor on Eirika ? Well it’s here that it’s telling where the cursor needs to be drawn and some dialogues coming with it.
In the “logic” part, they already have a function to point to the lord, so there’s no other cursors but the decorative one. This is the 0x50004 value. Still Y - X. There’s also the coordinates of the tutorial box.
Well there’s nothing new.
I still don’t know what’s the EVBIT_T is using for, and I don’t know too for the valued stored in 0x03000010 thing . But I think that the value stored in 0xD and 0x1 are label ID.

Let’s move to the next one: 0x89EF4EC

I have no idea of what's happening there..."

So let’s move again…

I won't have many things to say"

I still don’t really know what’s happening there, but here we are when we need to select Attack and press the A button. How it’s working → the magic logic part obviously :man_shrugging:

3 Likes

This post will be use for Tutorial, and the precedent for documentation.

I was impressed by your enthusiasm.
Supported the tutorial event list which is automatically executed with ver 20180131.22.

A tutorial has been added to the type of “event”.

2 Likes

Oh thanks for this 7743 !
Keep doing your great job on FEBuilderGBA. :smiley:

1 Like

Looked a little further into it - specifically the CALL 9EE6F4 part

SLOTS_SETFROMQUEUE will take the values out of the queue by SAVETOQUEUE in this part:

ORG $9EE6F4
TUTORIALTEXTBOXSTART
CHECK_ACTIVE (store active unit ID into slot c)
SLOTS_SETFROMQUEUE 0x2 (contains Eirika character ID 0x1)
BNE 0x0 0xC 0x2 (go to LABEL 0x0 if active unit is not eirika)
      (if eirika)
      WORD 0xFFFF3120 (draw cursor at active unit? _0x3120 0xFFFF)
      SLOTS_SETFROMQUEUE 0xB (coords 0x50004)
      WORD 0xFFFF3B24 (flash cursor at coords in slot B? _0x3b24 0xFFFF)
      STAL 18
      SLOTS_SETFROMQUEUE 0x2 (text ID 0x91B "move anywhere in blue zone")
      SLOTS_SETFROMQUEUE 0xB (text coords 0x80058)
      TEXTSHOW 0xFFFF
      TEXTEND
      CURE
      STORETOSOMETHING 0x10A (stores 0x10A to 0300:0010 - changing it to 0x10B makes you unable to press A in your movement range!)
          SLOTS_SETFROMQUEUE 0xC (text ID 91A is for if you didn't select eirika, so just take the value out and ignore it)
          SLOTS_SETFROMQUEUE 0xC (text coords for 91a, same)
      SLOTS_SETFROMQUEUE 0x2 (POIN 9ef328 - set up the queue for next event?)
      WORD 0x30B41 0xFFFFFFFF (unknown) (_0xb41 0x3 0xFFFFFFFF)
      GOTO 0x1
            LABEL 0x0 
            (if not eirika)
            SLOTS_SETFROMQUEUE 0xC (waste coords, these values are for if you selected eirika)
            SLOTS_SETFROMQUEUE 0xC (waste text id)
            SLOTS_SETFROMQUEUE 0xC (waste text coords)
            WORD 0xFFFD3B25 (flash cursor at Eirika? _0x3b25 0xFFFD is unit in slot 2 i.e. Eirika)
            STAL 8
            WORD 0xFFFD3820 (move cursor to eirika???)
            SLOTS_SETFROMQUEUE 0x2 (text ID 91a "select eirika, stupid")
            SLOTS_SETFROMQUEUE 0xB (text coords)
            TEXTSHOW 0xFFFF
            TEXTEND
            CURE
            SLOTS_SETFROMQUEUE 0xC (waste next tutorial pointer, you need eirika selected for that)
            SLOTS_SETFROMQUEUE 0x2 (pointer to original tutorial queue setup again)
            WORD 0x20B41 0xFFFFFFFF (Unknown, same as previous except with 0x2 instead of 0x3 _0xb41 0x2 0xFFFFFFFF) 
LABEL 0x1
REMA
ENDA
1 Like

Tutorial event analysis.

It consists of the following two instructions.
Since the argument is too long, it is queued and executed.
I will look individually.

The first command prompts the user to move the unit to a specific coordinate.

//Urge the movement of the unit coordinates
40050D0000000000 //Set MemorySlot D (queue length) to 0. Reset to use the queue for future use.
40050100XX000000 //this value is unit ID to be act.
21070000 //SAVETOQUEUE (push queue)
40050100YYYYYYYY //Map coordinates to emit the cursor XX00YY00.
21070000 //SAVETOQUEUE (push queue)
40050100ZZZZ0000 //String ID of the description.
21070000 //SAVETOQUEUE (push queue)
40050100UUUUUUUU //Screen coordinates (dot coordinates) to give a message of explanation.
21070000 //SAVETOQUEUE (push queue)
40050100WWWW0000 //String ID of reminder message for when the user did not operate properly.
21070000 //SAVETOQUEUE (push queue)
40050100PPPPPPPP //Screen coordinates (dot coordinates) to give a reminder message.
21070000 //SAVETOQUEUE (push queue)
40050100VVVVVVVV //The next event pointer after the operation.
21070000 //SAVETOQUEUE (push queue)
40050100TTTTTTTT //Write the current event pointer (I do not really understand the meaning).
21070000 //SAVETOQUEUE (push queue)
400A0000F4E69E08 //Execute EVENT FE8U=089EE6F4 FE8J=08A6082C

Another command is used to point to a specific place such as a private house, not a unit.

40050D0000000000 //Set MemorySlot D (queue length) to 0. Reset to use the queue for future use.
40050100XXXXXXXX //Map coordinates to emit the cursor XX00YY00.
21070000 //SAVETOQUEUE (push queue)
40050100ZZZZ0000 //String ID of the description.
21070000 //SAVETOQUEUE (push queue)
40050100UUUUUUUU //Screen coordinates (dot coordinates) to give a message of explanation.
21070000 //SAVETOQUEUE (push queue)
40050100VVVVVVVV //The next event pointer after the operation.
21070000 //SAVETOQUEUE (push queue)
40050100TTTTTTTT //Write the current event pointer (I do not really understand the meaning).
21070000 //SAVETOQUEUE (push queue)
400A000094E79E08 //Execute EVENT FE8U=089EE794 FE8J=08A608CC

Both were supported by FEBuilderGBA.