The FE8 research topic

Was reading old FEU’s docs, and, well

“Indeed, back when it was asked, it wasn’t known. It is now, I have some very few info on it. Only thing I couldn’t change yet is the walking “Grid”, like roads and stuff. But if we try enough it will be found soon enough. And then someone could code a very simple app to work as a “World Map Maker”.” - Ryrumeli - 17th November 2010 01:10:35

–4 years later-- :wink:

It’s a damn shame Ryru’s girlfriend destroyed his computer and all his notes.

Which is why nowadays, the FEcommunity’s notes are on the cloud in dropbox!

Hopefully.

If not, WHAT IS WRONG WITH YOU.

edit: or on forums like this. idk most of my docs are scattered here somewhere. I swear, someday I’ll compile them into comprehensible, well-ordered notes.

you should just have a public database of hacking notes like i do

I’ve updated my event/world map code listings.
Chapter Codes
World Map Codes

Here’s an example of one of the newly documented codes:

$08010110 - _0x332X commands, one parameter
Generally these check something about a character of the given ID
-Loads last digit of command to r4
-Loads parameter to r5 and signed version parameter to r0
-Branches to $0800BC50(finds unit deployment data of unit to check):
    -If param was 0xFFFF: checks active unit (currently selected for moving/attacking at $03004E50;used for AREA, village events)
    -If param was 0xFFFE: checks unit that's somewhere on the map?? (loads from 030004E6,0202E4D8...)
        -May just return 0x0, however... this is unused in the normal game
    -If param was 0xFFFD: checks unit with ID stored in memory slot 2

-With the offset of the unit data to check, filter out by r4's value
    _0x3320: Always return True (store 0x1 to slot 0xC)
    _0x3321: Loads byte 0x30 (Unknown) from the unit's character data and stores to slot 0xC
    _0x3322: Check if unit is alive (has bit 3 set in state bitfield - return 0x1 if it does not)
    _0x3323: Check if unit is deployed
    _0x3324: Check if unit's character number = signed version of parameter. Store 0x0 if not. (wut)
    _0x3325: Checks unit's allegiance; in mem.slot 0xC, store 0x2 if enemy, 0x0 if Player, 0x1 otherwise
    _0x3326: Stores unit's coordinates (XXXXYYYY) to memory slot C
    _0x3327: Stores unit's class number to memory slot C

And for those that are interested, here are some more general notes on the workings of the world map:
Notes
Coordinate Notes

Random note on FE8: The 8 pointers located at D77BC determine which minimug to load for the generic soldier characters (with the next 8 pointers being which palette to use for the minimug). Playing around with those, you get things like

_0x0228 0x7// (aka the "terminate events" code, used before ENDA or ENDB)

Please note that this code is absolutely necessary before ENDA, otherwise you'll get a random fade in/out effect.
Also note that this should be used ONLY before the LAST ENDA in your current event. For example, if you've something
like this:

BeginningScene:
CALL PuledraNaked
STAL 0x20
_0x0228 0x7
ENDA

PuledraNaked:
Text(0x0A60)//lewdstuff
ENDA

As you can see, I didn't put _0x0228 0x7 in the event I CALLed, because that wasn't supposed
to be the last event in the BeginningScene. Why is this important? Well, when you press
"Start" and skip the events, the game executes a fade in/out effect and automatically goes
to the ENDA with _0x0228 0x7 before it. If there's more than one _0x0228 0x7, the game doesn't
understand where it should go, and it'll just speed up the events instead of skipping them. (see: it looks like shit)

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-

ENDB// (aka the "you shall not pass, bitch!" code)

This code is boss. It's like ENDA, but it instantly ends your events.
What does this mean? Well, if you CALL an event that ends with ENDA,
you'll return to the previous event after the CALLed one is resolved.
But if you end the CALLed event with ENDB, it'll stop there.
It's particularly useful with conditional events.

For example, if you want to repeat an event until a certain condition is met, you could do this:

MiscBasedEvents:
AREA 0x10 control [22,16] [24,19]
AFEV

control:
_0x3322 0x4C// is unit 0x4C alive?
 _SETCONDITION 0x2C 0xC 0x0// set a condition with condition ID 0x2C
CALL notyet// calls the notyet event if it's alive
ELSE 0x2D// sets the alternate conditional ID 0x2D in case it is NOT alive
ENIF 0x2C// reads till this point if it's alive
Text(0x09DE)// shows text 0x09DE if unit 0x4C is dead
ENIF 0x2D// reads till this point if it's not alive
Text(0x09DF)//shows text 0x09DF
_0x0228 0x7
ENDA

notyet:
_0x0221 0x10//marks event ID 0x10 as unused
_0x0228 0x7
ENDB

How does this stuff work?
Say that I want to show a specific dialogue if a unit steps in an area when the character 0x4C is dead.
Firstly, you activate the "control" event with event ID 0x10 if you step in the area included between [22,16] (top left corner)
and [24,19] (bottom right corner).
Then you check if the unit 0x4C is alive or not. If it is alive, then the designed text shouldn't be displayed yet. This is
when the "notyet" event is called, which basically marks the AREA event ID as unused (so that you can activate it
again by stepping there). Then it instantly ends the events with ENDB. What if there was ENDA there?
Well, you'd have returned to the "control" events, and proceeded after the conditionals, displaying Text 0x09DF.
This way, we display 0x09DF only when we don't call "notyet", meaning when 0x4C is dead.
This was just a lame example to show how ENDB works.

----------------------------------------------------------------------

_0x2720 triggers tile changes manually.
It can be written in two ways:

_SETVAL 0xB 0xYY00XX// [XX,YY] coordinates of top left corner
_0x2720 0xFFFF// trigger tile changes

or

_0x2720 0xID

where "ID" is your tile changes ID, which you can set in Tiled.

---

Similarly, _0x2721 cancels the tile changes.

Just some very random documentation about some codes.

3 Likes

Link’s broken :confused: