fizzly

Regular
Regular
Joined
Mar 23, 2012
Messages
1,695
Reaction score
1,287
First Language
Polish
Primarily Uses
RMMZ
@Shaz, thanks for the quick reply - it works! Thank you once again.
 

tvorimvsevmeste

Villager
Member
Joined
Nov 11, 2015
Messages
27
Reaction score
4
First Language
русский
Can I use this plugin in MZ?
If not, please tell me, will you port it to MZ and when?
This plugin is very necessary in MZ !
:LZSexcite:
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
This plugin will not work in MZ because it has plugin commands.

Will I port it? Initially I planned to port any plugin that people found useful. Now ... I don't know. The attitude people showed towards VisuStella and Yanfly was a major turnoff for me, and I don't know if I want anything to do with the engines or this community anymore.
 

Candacis

Pixel Pusher
Restaff
Joined
May 2, 2012
Messages
1,818
Reaction score
3,340
First Language
German
Primarily Uses
RMMZ
@Shaz
The attitude some people had towards VisuStella was disappointing to say the least, but not everyone in the community is like that. I'm still hopeful that the majority is grateful for all the assets that are created.
It is a shame that it doesn't get reflected more in the comments/posts.

I do hope you remain in the community, because I can't imagine someone more helpful and inventive than you. Ultimately it is your own decision, if you want to port something or not. It is a hobby and you should have fun doing it.

I can imagine a port is a lot of tedious work, but I loved your smart pathfinding, because it could make whole villages that much more engaging and real. I bet this plugin breathed live into so much npcs in a bunch of MV games. Even if you don't port it, you can be proud of that and I'm thankful this plugin exists for MV.
 

calunio

Villager
Member
Joined
Oct 13, 2020
Messages
5
Reaction score
1
First Language
Portuguese
Primarily Uses
RMMV
I'm sorry if this has been answered before, but is there a way to limit the number of steps the event takes? I want event 1 to move to event 2 but only X steps. How do I do that?
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
No, it will not do that. You would have to tell it to find the path, then wait a certain number of seconds, then cancel the pathfinding. But you may not always end up the correct distance away from the event that you want to.

Are your events moving? If not, then you don't need to use a plugin at all - you can just do a Move Route to make event 1 move in a fixed direction.
 

Cezar_cr

Regular
Regular
Joined
Feb 11, 2018
Messages
73
Reaction score
38
First Language
Pt
Primarily Uses
RMMV
I got here because I was having a problem with the script call for pathfing as it is found in the wonderful script call list assembled by @Archeia and incremented by many others.
I came here, found the solution and the answers to all subsequent problems I had.
Thank you @Shaz for taking the time to code it and share.
I am still amazed by how a piece of code made back in 2015 can still be useful to this day.
 

xabileug

Regular
Regular
Joined
Jul 1, 2014
Messages
663
Reaction score
279
is this possible to make compatible with Galv_Diagonal Movement? I want events to move diagonally when using the pathfinding.. thanks
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
I don't think I'd have time to do this, but you're welcome to post a new thread asking someone to make a patch.

However, have you tried swapping the order of plugins around?
 

xabileug

Regular
Regular
Joined
Jul 1, 2014
Messages
663
Reaction score
279
I don't think I'd have time to do this, but you're welcome to post a new thread asking someone to make a patch.

However, have you tried swapping the order of plugins around?
yes i tried swapping position of the two plugins, i even found a previous thread ..
Oh that thread is VE_Diagonal Movement.. ill check
 

AnchyMorgan

Villager
Member
Joined
Feb 27, 2014
Messages
11
Reaction score
4
First Language
English
Primarily Uses
This little plugin has made life so much better!

I've made a couple of little tweaks I thought I would share in case they would come in handy for anyone.

https://github.com/caseylutz/KCL-MV/blob/master/KCL_SmartPath.js

First off the ability to reference events by name. I actually created a separate module for this. It adds a findEvent call to the gameInterpeter to allow you to query events by numerical ID or canonical name. You can either include the FindEventsByName script and SmartPath by event names or you can not include it and just use the numbers. This version of SmartPath will only use the additional script if it's present.

e.g.:

SmartPath Lab_001_Hero Lab_001_ExitSmartPath -1 Field_001_CenterSmartPath 3 7I also added a plugin call for waiting until the smart path is reached.

SmartPath <event_target> WAITI also added an auto-cancelling trigger to clear the auto-path target once it's reached. This is useful if you are controlling the player and want to stop targeting at the end of the path. If you don't clear his target then he will constantly try to re-acquire it every time you move.

SmartPath <event_target> AUTO_CANCELIf your target is actually impassible for whatever reason I've also added a cancellation near (so if you're within 1 tile...)

SmartPath <event_target> AUTO_CANCEL_NEARNow if you have an event where you want the hero to walk to a given location, wait on him, do a cutscene or whatever, and then resume play you can do that like so:

Plugin Command: SmartPath -1 Event_LocationPlugin Command: SmartPath -1 Auto_CancelPlugin Command: SmartPath -1 WaitYou can also have some actions take place before the Wait if, for instance, you'd like to have a conversation but make sure the event waits for the target to reach its destination.
So I am having a bit of trouble with the Auto_Cancel command. I have a target event set to wander, but whenever it wanders away from the target coordinates in the SmartPath command, it immediately turns around to go back to those coordinates.1643126811657.png
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,718
Reaction score
16,528
First Language
Filipino
Primarily Uses
RMMZ
Still one of my favorite scripts that I may or may not be using in MZ.
Script Calls for those who need it.


JavaScript:
// Make Player go to X/Y
$gamePlayer.setTarget(null, X, Y);

//Make Player go to target event
const target = $gameMap.event(ID)
$gamePlayer.setTarget(target);

//Make event go to target event
const event = $gameMap.event(ID);
const target = $gameMap.event(ID)
event.setTarget(target);

//Make event go to player
const event = $gameMap.event(ID);
event.setTarget($gamePlayer);

//Cancel Pathfinding script calls. Use whichever you want.
$gamePlayer.clearTarget();
$gamePlayer.setTargetAutoCancel('on');
$gamePlayer.setTargetAutoCancel('near');

//Cancel Pathfinding script calls. Use whichever you want.
const event = $gameMap.event(ID);
event.clearTarget();
 

JulioManeiiro

Regular
Regular
Joined
Jul 19, 2017
Messages
40
Reaction score
8
First Language
Portuguese
Primarily Uses
RMMV
@Shaz,
Would it be possible to somehow make a script call to find a region id?
To avoid adding different events to points on the map?
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,250
Reaction score
1,665
First Language
English
Primarily Uses
RMMV
@Shaz,
Would it be possible to somehow make a script call to find a region id?
To avoid adding different events to points on the map?
You could write a script to randomly pick a tile in a region, then use Shaz's plugin to have an event go to those coordinates. Do you want to go to the closest tile of region ID x or a random tile?
 

JulioManeiiro

Regular
Regular
Joined
Jul 19, 2017
Messages
40
Reaction score
8
First Language
Portuguese
Primarily Uses
RMMV
You could write a script to randomly pick a tile in a region, then use Shaz's plugin to have an event go to those coordinates. Do you want to go to the closest tile of region ID x or a random tile?
Plugin command for the event or player to find the nearest specified region id.
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,250
Reaction score
1,665
First Language
English
Primarily Uses
RMMV
Plugin command for the event or player to find the nearest specified region id.
I just made the whole thing a plugin
Code:
 * This adds two extra script calls for Shaz Smart Path
 * this.moveToRegionRandom(regionId) - move the player or
 * event to a random tile of a specified region ID
 * Ex: $gameMap.event(8).moveToRegionRandom(2);
 * Moves event ID 8 to a random tile of region ID 2
 *
 * this.moveToRegionClosest(regionId) - move the player or
 * event to the closest tile of a specified region ID
 * Ex: $gamePlayer.moveToRegionClosest(4);
 * Moves the player to the closest tile of region ID 4
 

Attachments

  • Aqua_SmartPathExtras.js
    2 KB · Views: 5
Last edited:

JulioManeiiro

Regular
Regular
Joined
Jul 19, 2017
Messages
40
Reaction score
8
First Language
Portuguese
Primarily Uses
RMMV
I just made the whole thing a plugin
Code:
 * This adds two extra script calls for Shaz Smart Path
 * this.moveToRegionRandom(regionId) - move the player or
 * event to a random tile of a specified region ID
 * Ex: $gameMap.event(8).moveToRegionRandom(2);
 * Moves event ID 8 to a random tile of region ID 2
 *
 * this.moveToRegionClosest(regionId) - move the player or
 * event to the closest tile of a specified region ID
 * Ex: $gamePlayer.moveToRegionClosest(4);
 * Moves the player to the closest tile of region ID 4
Thank you very much my friend, the plugin works perfectly.
I just wanted to make a suggestion.
It would be possible for there to be a condition that the event or player only moves if they are in another specific region, for example:
The event/player is in no region (0) and has to move to region (4).
The script call could be something like: this.moveToRegionClosest(0, 4)
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,250
Reaction score
1,665
First Language
English
Primarily Uses
RMMV
Thank you very much my friend, the plugin works perfectly.
I just wanted to make a suggestion.
It would be possible for there to be a condition that the event or player only moves if they are in another specific region, for example:
The event/player is in no region (0) and has to move to region (4).
The script call could be something like: this.moveToRegionClosest(0, 4)
That's something you can do by putting a conditional where you're calling it
if(this.regionId()==1)
{this.moveToRegionClosest(regionId);}

if($gameMap.event(8).regionId()==1)
{$gameMap.event(8).moveToRegionClosest(4);}

If event 8 is in region 1, move event 8 to the closest tile of region 4
 
Last edited:

JulioManeiiro

Regular
Regular
Joined
Jul 19, 2017
Messages
40
Reaction score
8
First Language
Portuguese
Primarily Uses
RMMV
That's something you can do by putting a conditional where you're calling it
if(this.regionId()==1)
{this.moveToRegionClosest(regionId);}

if($gameMap.event(8).regionId()==1)
{$gameMap.event(8).moveToRegionClosest(4);}

If event 8 is in region 1, move event 8 to the closest tile of region 4
Can you turn this into a single script command, to make it easier in the movement route text box?
 

AquaEcho

Script Kitty
Regular
Joined
Sep 20, 2021
Messages
2,250
Reaction score
1,665
First Language
English
Primarily Uses
RMMV
Can you turn this into a single script command, to make it easier in the movement route text box?
No, because I consider it a non-issue. I give you my permission to edit the plugin for your use case.
 

Latest Threads

Latest Posts

Latest Profile Posts

What the heck is happening in A Christmas Story that requires Perla to swing a Tree?
Actor_Perla[ActionSP1_ed].gif
(Hehe, i'm working on the battle sprites and i did this so i wanted to share)
I have some more lovely nightmare fuel for ya'll:

JO_AvatarofCerebellum_Upscale.gif

This is the second phase of the Manor Experiment boss enemy that I shared before. In this phase, it is possessed by Cerebellum, one of the four eldritch horror villains of the game.
And with that all the in game menu busts are replaced fo the party
The full artwork versions of all of them can be found on my tumblr, linked as my bio website
Just search Menu Status in the search bar

(since they're pretty big I wasn't going to post the artwork versions here)
Screenshot (19).png
TERMS OF SERVICE.png
I don't remember if a plugin like this already existed, but just in case, I'll do it anyway.

Add a professional touch to your game by requiring users to accept the typical license agreement that obviously no one reads, but it doesn't matter xd

And yes, you must get to the bottom of the text for the Accept button to be enabled, otherwise it makes no sense haha
It would be kind of brutal, but I lowkey want to add in a secret boss battle against a literal bucket, just so that if you use the kick attack on it, it says "[character] kicks the bucket," and drops you down to like 1 HP.

Forum statistics

Threads
136,727
Messages
1,269,180
Members
180,441
Latest member
Aeden71
Top