Oh, crap. I actually looked into jump element 0x00 awhile ago, but I forgot to post it because I am stupid.
My notes about the comparison mode differs from yours though.
Byte 0x01 = Comparison method
00 : if byte 0x04 < memory then branch.
01 : if byte 0x04 <= memory then branch.
02 : if byte 0x04 == memory then branch.
03 : if byte 0x04 >= memory then branch.
04 : if byte 0x04 > memory then branch.
05 : if byte 0x04 != memory then branch.
You know how in FE12 certain enemies won’t move until another specific “trigger” enemy attacks? Well, it looks like the GBA FE’s already have built-in support for similar behavior. (It only gets used a few times in FE6)
AI1 0x0D
Move/attack if the unit’s leader has foe in range.
Switches AI1/A12 to 0x00/0x00 (aggressive) when leader is defeated.
The unit must be auto-leveled in order for the unit’s leader data to be loaded.
To create FE12-style enemy traps:
Leader/trigger enemy: AI1 = 0x00, AI2 = 0x03 (attack when foe in range)
Followers: AI1 = 0x0D, AI2 = 0x03 (make sure leader is set and unit is auto-leveled)
Strangely, FE6 mostly uses this AI with an already aggressive leader:
Leader/trigger enemy: AI1 = 0x00, AI2 = 0x00 (aggressive)
Followers: AI1 = 0x0D, AI2 = 0x00
So there might be more to this AI? Or maybe IntSys is just weird.
01 00 FF 00 00 00 00 00 BD A5 03 08 00 00 00 00 @Execute this routine. Do nothing if Support#7 is 00 or player unit
– Dropbox - AI Byte 1 Commands.txt - Simplify your life
From [the Unified FE Hacking Dropbox][1]
This loads the 0x38 byte of the unit data. For player units, this is Support #7. Am I to assume it’s the leader for enemies?
[1]:Unified FE Hacking Doc Dropbox
AI2 0x13, 0x14, 0x15, 0x16, 0x1D
Yeah, you’re right. There’s clearly a change AI command in there, but it doesn’t get used.
Here’s how it’s supposed to work:
If unit is within a rectangular area, switch AI1/AI2 to [0x00,0x00]
Otherwise, move unit towards a specific point (which should be located within the rectangle)
(X1, Y1) = Upper-left corner of rectangle
(X2, Y2) = Lower-right corner of rectangle
Routine 0803A548 checks whether the unit is within the rectangular area.
Currently, the parameters are formatted like this: X1 Y1 00 00 X2 Y2 00 00
But they should be formatted like this: X1 Y1 X2 Y2
Due to this error, units with this AI will just crowd around the interior point.
AI2 0x17, 0x19, 0x1A, 0x1E
These units won’t move back. After stepping on the target point, this AI essentially turns into AI1 0x00.
Is there a way to make the enemy target more units?
I know AI1 0x0A makes the enemy attack the character 0x03, but can you make them attack other units?
Like, 0x0A = Target 0x03, 0x1A = Target 0x04, 0x1B = Target 0x05 and so on.
I don’t know is this is doable, but is there something to force the enemy to attack certain units?
–But I suppose this haven’t been figured out yet, because I remember someone wanted to create the Provoke skill based on AI and he couldn’t.–
ok I think it’s better to just ask because my own tests are giving me something weird. For making the custom AI, is the order [A1,A2,A3,A4] or is it actually [A3,A4,A1,A2] like the first post was suggesting?
If you’re asking about when assembling events, the traditional [AI1, AI2, AI3, AI3] order still works, but I’m now recommending the format which I defined for the newest event assembler of [AI1, AI2] AI3 AI4.
If you’re talking about making your own AI, then it doesn’t matter; you specify whether it’s AI1 or AI2 by overwriting different pointer tables.