Pathfinding script for RMXP. Guaranteed to navigate any type of obstruction in the minimum possible number of steps, without brute-forcing the entire map, but longer solutions will obviously take longer to devise.
Will return an empty move list if no route exists, but it will exhaust the entire map if no route exists which is time-consuming so it's best used in cases where a route is guaranteed to exist.
References to Pathfinder must be inserted into the Game_Character#passable? method and I couldn't find an elegant way to accomplish this without just replacing the entire method. I am sorry. Take this into account if you have customized Game_Character#passable? in other ways.
As soon as I had inserted the script into a test project, this error kept occuring whenever I touched an event with the player character:
So in order to test if the script in itself works, I put the command into an autorun event, but this is what happened:
If this is all just due to me being clueless about how this script is supposed to be used, I apologize. But I thought I should at least mention it and ask what I can do about it. Thanks.