TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,206
Reaction score
7,474
First Language
Indonesian
Primarily Uses
RMVXA
About:
This plugin generates the shortest move route for you.
Because you're too lazy to do it yourself.

Preview:
pathfind2.gif

Download:
Save as a new JS file

Terms of Use:
Read here

P.S:
The code is kinda fragile. Tell me if something is broken, I'll try to fix it.

I hope you find this useful
 

starcrescendo

Stargazer
Veteran
Joined
Mar 13, 2012
Messages
205
Reaction score
43
First Language
English
Primarily Uses
I love the idea of this plugin but I can't seem to get it to work right. Throwing this out there just in case it's "broken". :rhappy:

I would like to have two characters (one being the player, two being an NPC) walking to a specific location (each to their own tile) but right in front of each other. The map is 50x50, in case that matters. I set the player to move to 18,5 and the NPC to move to 18,6.


If I set the move events to Wait for Completion, one moves, and then the other follows only after they have completely reached the end of their path. I'd like them to seemingly follow each other.

If I set the first one to NOT Wait for Completion, and then set the other to Wait for Completion, which is how I usually do the Move Events, the second one moves one tile and then blocks the path and the player cannot move at all so it just starts running the cutscene (event though "Skip if Can't Move" is NOT even checked.

Is this possible with this plugin?

See my move event below:

Code:
◆Set Movement Route:Fat Cat  (Wait)
:                  :◇Script:this.generatePath(18, 5)
◆Set Movement Route:Player (Wait)
:                  :◇Wait:10 frames
:                  :◇Speed:3
:                  :◇Script:this.generatePath(18, 6)
◆Set Movement Route:Fat Cat (Wait)
:                  :◇Turn Down
◆Show Balloon Icon:Player, Silence (Wait)
◆Text:???, SF_Actor3(4), Window, Bottom
:    :So\..\..\.. Do you have it?
◆Set Movement Route:Fat Cat (Wait)
:                  :◇Turn Down
:                  :◇1 Step Backward
:                  :◇Turn Up
:                  :◇Wait:5 frames
:                  :◇Turn Down
◆Text:???, Evil(1), Window, Bottom
:    :Hold on\.. We'll speak in the back. Just give me a minute
:    :to prepare a room.
◆Show Balloon Icon:Player, Anger (Wait)
◆Text:???, SF_Actor3(4), Window, Bottom
:    :\..\..\..You OWN this place. You really need to clear
:    :up a room?
◆Text:???, Evil(1), Window, Bottom
:    :Yes. Surprisingly, I make money by filling my rooms, not
:    :keeping them empty for random low-life hackers to squat in.
◆Set Movement Route:Fat Cat (Wait)
:                  :◇Through ON
:                  :◇Move Up
:                  :◇Transparent ON
◆Show Balloon Icon:Player, Anger (Wait)
◆Text:???, SF_Actor3(4), Window, Bottom
:    :"Lowlife?!" That hurts my self-esteem. Well, better have
:    :a look around. Maybe I'll play a slot.
◆Fadeout Screen
◆Control Self Switch:A = ON


I've double and triple checked the path in game IS passable. The player has a 10 second pause because I thought perhaps they were getting held up bumping into each other. That doesn't seem to help. I've also tried combinations of the Movement Route options of "Repeat Movements" "Skip if Cannot Move" and "Wait for Completion" but have been unable to get this to work.

There are random NPCs walking around, I recall an old plugin for VXAce that calculated the whole route at the start instead of continually finding its path which led to the characters pausing at the start of the route for a long time, or getting held up while walking if the path changed. Does this plugin recalculate the path continually?

Just trying to make sense of this all. I'm on the MZ bandwagon but one welcome improvement of being able to see the move events on the map is kind useless if they get held up by a random NPC walking in the way which is why I turned to this plugin!


This works fine. It seems they don't like small corridors. I tried making the path an extra tile wider and you can literally watch them dosey-do around each other continually. That was the issue all along. There was one "choke point" that caused them to glitch out and I guess when it calculated the route it just said "f*** it" and glitched out. :)
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,007
Reaction score
1,521
First Language
Dutch
Primarily Uses
RMMV
I dont have MZ or can test this, but I wonder if it works for lava tiles too
that can burn the player or if it goes around those things as well?

or just straight through it :p

if it can walk around those obstacles as well, it is a pretty neat plugin for MZ :)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,206
Reaction score
7,474
First Language
Indonesian
Primarily Uses
RMVXA
This does not check floor damage. So, yeah... no.
This also does not assume that the one that moves is the player.
It just simply a move route generator, for the player, and the event.
 

Latest Threads

Latest Posts

Latest Profile Posts

Modern Town Overworld, World of Solaria Dungeon, 80's Retro-Futuristic Font | RPG Maker News #73

I been slowing down and not focusing on project currently.
I had this idea for VTubers vs MOTHER and its a bunch of Vtubers finding eight melodies to fight a psychic alien and a fat kid. IDK, kinda find it hard to use RPG Maker for more than 15 minutes
Working on some wizard/magic bases:
TestChara-10-hover.gif

I mean, technically it's a flying base but I haven't made any wings yet, so magic hovering is it for now.
Dear developers, exp gain scaling (reduced gain when you are over-leveled) suck. Please don't do it. Thank you.

Forum statistics

Threads
112,293
Messages
1,067,142
Members
145,920
Latest member
skycloudrain
Top