MZ [Solved] Built-in Pathfinding Settings?

Guys, my question is about the function event.findDirectionTo(x, y).

Are there settings available to change its behavior? Namely, I would like it to either make NPCs ignore that they can pass through obstacles in their pathfinding, or ignore the NPCs / events / player when pathfinding, and stick to the map tiles only. Is it possible?

Here is the context - my bar gets traffic jams. (I use a "JS backend" to move folks around, although the NPCs themselves are traditional events dynamically spawned. This is so there is a persistent world with townfolks who go to work, go home, and sometimes patron the bar.) These backlogs are cleared by letting an event move through obstacles. But this is when the problem with findDirectionTo(x, y) starts - the event, i.e. the circled one starts moving though the walls (screenshot at the bottom of the post).

This is what the current kerfuffle looks like:



This could be easily cured if, say, the event continues to behave as if it can't walk through obstacles or if findDirectionTo(x, y) would ignore player and other NPCs, but I do not know how to change the settings on findDirectionTo(x, y).

Untitled.png
Are there settings available to change its behavior? Namely, I would like it to either make NPCs ignore that they can pass through obstacles in their pathfinding, or ignore the NPCs / events / player when pathfinding, and stick to the map tiles only. Is it possible?
I forgot the function name, but if you change the search range, they will actually use the correct path. However, the default value of this search range is too short that if you need like 20 tiles to get to the destination while the search range is like 10, the algorithm won't reach the destination and the algorithm will just pick the shortest next tile to the destination.

Do note that the "findDirectionTo" function uses expensive code just to determine the next correct tile to walk so you need to call the function each time they make a move. Increasing the search range and increasing the range of the target destination are likely to put a burden on your game.

EDIT:
If you mean the passability, there should be a function called isPassable/IsMapPassable (the latter is for map settings, the former includes character IIRC). Play around with those functions.
Gave up on the idea of modding / making custom pathfinding. Ended up testing if path was interrupted by an NPC/player, and acting accordingly. Worked out pretty well:

Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/solved-built-in-pathfinding-settings.150907/