Better NPC AI

NPC's are dumb. 

When they walk into a wall, they could possibly stay looking at that wall for an eternity, because they're constantly trying to move up (which they obviously can't because there's a wall in the way)

Is there a way to make their movements more varied? I don't like seeing the villagers of the town staring at a tree forever 🙁

Perhaps there's a plugin for this?
 

I'm talking about when you set their movement to random.

Thanks!
that's strange, with me they never stuck 🙁
yanfly has a region restriction plugin that is easy to use, you could set a tile around the tree or buildings that you do not want your npc near.
yanfly has a region restriction plugin that is easy to use, you could set a tile around the tree or buildings that you do not want your npc near.
That just shifts the problem down a tile. If you want your NPC's to actually move intelligently you need to go into where the 'random' path is determined and change the behavior there.  You could probably do something with events doing random choices between different move routes. but that would be very map-dependent. The 'elegant' solution would be to have the NPC pick a point and then use a path-finding algorithm to set a route to get there, but I don't know what kind of performance drain that would put on a busy map.

Personally, in ACE I would just 'leash' them with blank events and map geography. Not sure how I'm going to handle it in MV.

Note: NPC's moving 'intelligently' is a new thing in games. I remember mobs in Star Wars Galaxies wading through rivers in town rather than walking thirty feet out of their way to use a bridge.

Original thread: https://forums.rpgmakerweb.com/threads/better-npc-ai.50006/