Zoning AI

Fire Emblem has the AI functionality built in to “zone” out the player. That is, to have enemies approach, but stay just outside of your attack range. As far as I know, this AI isn’t actually used in FE8.

Safety = 0 (no risk)

They approach but won’t enter your range. I think this gets a little boring, personally. Once you’re in their range, they do attack.

I am certain some romhacks must use this sort of AI, but I haven’t noticed it yet. With the discussion of turtling, I thought bringing this to attention might help with design. (If too many enemies clump together just outside of your attack range, the game becomes more difficult, or even impossible. Personally, I would avoid making it impossible for us Turtles, but it’s your choice.)

My preference for ‘safety’ so far:

Safety = 8, all 3 on zoning AI

They will charge you, however, if the risk might pay off. (In this case, if the Myrmidon is 1 tile left, they charge.)

However, this is easily abusable:

Safety = 8, all 3 on zoning AI

Two of the enemies are trying to zone you out, but one is in range and charges.

I want clumps of enemies to charge at once.
(We have the two subordinates use AI1: ‘D’ so they don’t charge by themselves. Then we set their commander as the Bael.)

Typical example (Safety = 8, attack if enemy in range of commander):

Ex 1

They come somewhat within range on the first turn. Then, the boss/commander moves and is now in range of the enemies, so the others charge towards the player. Placing the boss as the last character in the unit placer usually makes it move after other units, so they might zone a bit smarter that way. However, if you can lure the boss far away from the subordinates, it becomes problematic.

Abusable example:

Ex 2

(This does not make them clump together, your map does, eg. corridors. But it does stop the subordinates from charging out towards you by themselves.)

More abuse:

Ex 3

GJdqvry9nX )
Their commander is not in range of anybody, so they straight up don’t attack.

But more typical:

Ex 3.1

The commander moves first and gets in range of enemies, so the subordinates attack this time.

Add it in yourself:


Under AI2, add an entry with the command “Attack12 Safety” in FEBuilder.

12000800000000000000000000000000 //Attack12 [Safety:0x8]
0300FF00000000000000000000000000 //EXIT [id:0x0]

(You should create a new AI2 rather than overwriting “Move towards enemy”.)


Zoning AI can be fun too.

What are your thoughts on this sort of AI? I’m giving it to boss encounters in my game, where the lackeys are scared to engage without their leader.

P.S. forgive me if this has been discussed extensively already. I have not read the entirety of the official AI documentation thread. Just thought it might be helpful for some people. :slight_smile:


I’m reminded of a certain WIP one-chapter project I had back in the FE7 days. It didn’t use any sort of “zoning out” AI, but it did use the “move to defined location” AI (which is also worthy of a shout-out) to great effect.
I had the map set up so there were plenty of juncture points for the enemies’ movement to branch off, and they would be set to have AI that would move them to their respective fork until they reached it, whereupon they would switch to more typical “pursue” AI. However, some units like cavaliers would instead switch to “attack in range”, giving the impression that they would wait at the most opportune places to run out and attack. I don’t remember if I quite ironed out all of the kinks, but in an ideal scenario, any player who wouldn’t quickly spread themselves throughout the castle complex would find themselves getting pincer attacked. In a setup where most of the starting units were either squishy or very specialised, it was pretty darngosh thrilling.

Definitely excited to give the zoning AI a go next time I attempt to start a project. I don’t think I ever really appreciated it before.


This was a super informative thread! I love hearing about this kind of stuff, like different ways to use the existing AI, anything that gives more tools to hack creators. I’ll have to think over the ramifications of this stuff and how it could be used appropriately

1 Like

That sounds fun. I think that sort of AI should be used more often! It can be a bit of a pain to manage AI with range events or to map design with enemies approaching a specific type of terrain, though.

Just in case anyone wants to try it…
Here’s a super quick example of vanilla fe8 chapter 5 with it:

If you turtle, enemies will be too clumped together to beat without Orson I think.

This patch brings you straight to ch 5 to try it out, if you’d like. That said, this chapter was not designed for the AI to have all enemies charge at you but zone you out, so it may not be very fun. I think their defenses are a little more realistic this way, though. You should still be able to lure one enemy out at a time, as I did not group them to have commanders nearby.

Zoning in Ch 5 FE8

(I simply overwrote ‘move towards enemy’ and ‘do not move’ to be the zoning AI instead. Ch5 is simply a difficult example to try, due to the long corridors.)


Difficulty selection exists.
I think that an hardest mode based on smarter enemies would be much more interesting than the standard buff to enemy stats.

Thank you for sharing this, I’m already having a lot of fun trying it.

1 Like