Hey, has this been updated since 1.3.1? Current Version?
This has not been updated since the original version. Does it need to be updated? Are you running it in 1.3.1 and is it not working?
Hey Shaz,
Yes, I have updated the game to version 1.3.1. The game seems to be a little crashy on PC. Im about to try to run some diagnostics on it soon to try and isolate the problem. (it also runs like crap on Android). I just thought I would try to update all available plugins before I try. I use very few plugins outside of Yanfly and thought I would see if I can find all the latest updates for all plugins, thats all.
I think the 1.3.0 and 1.3.1 updates really focused more on Pixi and how stuff is displayed, and I'd be surprised if they changed anything to do with pathfinding (this plugin is based on the method of pathfinding for the player, so if that's changed, I should probably look at applying the same changes to the plugin for NPCs). I think this should work, but by all means disable the plugin and see if it's any better, and if you think there's a difference let me know and I'll take a look. 1.3.1 still has a few issues too, so that could be the cause of some of your problems.
Any suggestions on getting around a block? I mean I can set a route but if I or another event walk in front of the moving event, then it seems to wait indefinitely until I move to finish the route. Is there any way (without causing some crazy loop) that I can reaquire/ rebuild a route if the event is stopped?
I don't understand - this plugin isn't about move routes. You should not be using them both at the same time. You should actually say what the "block" is. You haven't stated a problem.
Sorry, the problem turns out to be from another plugin - Orange pathfinding. I use it to increase the iterations of the route search since the default pathfinding cannot get out of a room unless the door is right in front of them to go to a room next door. That Orange pathfinding is blocking the new route discovery and uses a cached route instead. So if I block the events path it waits for me to move.
So my only problem then with your smart pathfinding is that it is too hard to find a path.
I still don't get it. This plugin uses exactly the same logic as the default pathfinding for the player. By default, it requires that the destination be 12 tiles or less away from the player/event. If you're telling it to find a path that's a greater distance, it probably won't work.
Then I suggest you use some waypoints. Work out how many steps it is, then path-find 12 steps at a time until you get there (or if it's more than 24 steps, just figure out how many points you need and how many steps for each, to even it out).
Someone wrote an add-on or an alternate version of this plugin that makes the event wait until the end of the path has been reached. Use that instead of my plugin (the link is on the first one or two pages, but I don't know if the scripter created their own plugin release thread), and make the character travel the path in sections.
Doorway 1 > Doorway 2 > Target might be a good starting point, though it depends on the distance between your doorways.
Thanks Shaz,
Your script does what it says it will do but the pathfinder algorithm of MV is just not optimized to do what I hoped for. Thanks for your waypoint idea too but I was hoping to bring people together from different locations to a single location. It would become a bit complex (for me) to manage a lot of shorter destinations... I will have to think on that some more.
Don't get me wrong, the script you wrote is great!
thanks again.
Thanks for this pluggin and it's extra. Unfortunatly, im dommed. Im not able to make it work with wait command.
I follow what i see anwsered for another with same problem but get an error.
My code:
SmartPath 0 69 66 (This is my first pluggin call)
SmartPath WAIT (This is my second pluggin call, in a different call box)
I get the error: Cannot read property "toUpperCase" of undefined
I past fw hour trying to fix it, but alway fail.
I try:
SmartPath 0 69 66 WAIT
SmartPath 0 WAIT
SmartPath WAIT 0
SmartPath (0 69 66 ,WAIT)
SmartPath (WAIT,0 69 66)
Etc..
Please can you help?
I desactivate other plugin and your right, But i faced another error. In fact wait jsut did't work. After many time of debugging script, i found that:
if (subject._target && !subject.isOnTarget(subject._targetX, subject._targetY)) {
subject._target return null.
I removed it and now it's work. But im scrary to make something else broke.
What did you think?
That's not a part of my plugin. If you have troubles with an add-on, you need to ask the person who made the add-on, not me.
Removing stuff from scripts when you don't know what you're doing is always a bad move.
ok, i fixd my prvious issue. Now I facing somes new one.
First was pathfinder that did't alway work. I guess it's because it's over 12 step. So i separat my path in many shorter step.
But my big problem is there:
In many place in my game, i want to use this pluggin to make many NPC move to somewhere. Doing that, they all pass by a tunel of only one in wildth.
But one a NPC enter that tunel, all other NPC because crazy. I guess its because the path is not avalable anymore at their point of view....
So any way to make them folow the destination path and wait for get block by somthing before callulate a new path?
It'd be good if you explained how you tried to do this in the first place, and explain what "crazy" means. My initial thought would be to do a Set Move Route on each NPC, add the findpath script call into the move route, and set it to repeat. That way, each time it's able to move it will do a path find, and if it's blocked, it'll keep trying, until it's able to move again.
By default it's seem that while blocked, they try to find the closed place they can be from destination. SO that make them move all arroud.
Of course adding moveroute will work but it's what i try to avoid for developpement time reason.
Your scritp can't be call in moveroute right?
Ideally, The programm will calculate path without calculating other npc or player position. Then if he encounter a npc he find another way to get to the destination.