[FE8] Moving units post-REDA


I would like to move generic enemy units after they have been loaded in FE8, but I’m having difficulty figuring out what I should use to specify which one I would like to move. Moving units that are bosses or player characters is easier because I don’t get that problem (just specifying which character number they are seems to do the trick) but I am totally lost as to how I am supposed to tell the game which of the generic units generated from char 0x8E I want to move.

I looked at an earlier chapter where after the units were loaded and moved via REDA; they were then moved again. The code for it looks like this:

MOVE 0x46 [2,2] // This is the boss moving.
_SETVAL 0xB 0x60001       // This is what moves the other units post-REDA
_MOVE 0x18 0xFFFE [1,4]   
_SETVAL 0xB 0x60003
_MOVE 0x18 0xFFFE [3,3]
_SETVAL 0xB 0x80001
_MOVE 0x18 0xFFFE [9,5]
_SETVAL 0xB 0x70002
_MOVE 0x18 0xFFFE [8,3]
_SETVAL 0xB 0x80003
_MOVE 0x18 0xFFFE [5,6]
_SETVAL 0xB 0x90002
_MOVE 0x18 0xFFFE [3,6]

How do I specify which unit I want to move?

SETVAL 0xB usually means coordinates of some kind.

Just looking at the positions of the generics it’s pretty obvious that SETVAL 0xB 0xY000X (or 0xYY00XX) is the coordinates of the unit you want to move, and MOVE 0x18 0xFFFE moves the unit at the coordinates stored in slot 0xB.

In other words, to specify the unit you want to move, store its coordinates using SETVAL 0xB and then use 0xFFFE instead of a character number.

1 Like

Huh. That’s pretty elegant, actually.

Thank you for the help! Your response was very easy to understand and it works as expected when used that way.

1 Like