Hello, i'm new here so first things first: Thank you for this wonderful script! It is a lifesaver. Or worksaver, at least
Now i want to give a contribuition before i ask for some help. As some already noticed, VASP it's currently not working for Essentials v21.1. I've, however, figured out what's the incompatibility issue and it's pretty simple. Since there's no official update, i wanted to help you guys with this.
Basically, the only thing that has changed between versions which conflicts with the script it's the movement command names. You know: Move Up, Move Down, etc.; So I wanted to help you with how to update.
First, you have to open the script itself, on the Plugins folder.
Plugins > Voltseon's A-Star Pathfinding > 001_VASP. Open with VSCode if possible or other code editor.
Then you'll use the search function, Ctrl + F, and write:
PBMoveRoute (This is not case sensitive but it's the green one - or other color - that we're looking for).
You'll notice that your's different than mine on the following screenshot.
View attachment 20107
Yours should be like: PBMoveRoute::TurnDown; PBMoveRoute::TurnUp, etc. Basically, the Essentials v21.1 changed how these names are spelled on the root script for character movement and that makes a huge difference.
What you'll have to do is change every PBMoveRoute command name to match the new spelling for these commands. You can find the new ones directly on the scripts, on RMXP. They should be at the Overworld script, right below the [[Overworld]]. Then you hit Ctrl + F again and search for PBMoveRoute. So TurnDown becomes TURN_DOWN, and it follows this pattern. Words sepparated with underscore and all caps. If you do it correctly, the plugin should run perfectly fine now.
Right!
Now, about the help that i need:
What i need it's not very much about the plugin itself, just an little light on how the base script for essentials works. Maybe i shouldn't be asking here... Anyway:
If i use the
move_to_event function, when trying to make the player pathfind to an event, it works pretty fine. But if i try to do the opposite, the event trying to pathfind to the player, it just freezes. And i know why: Because the player coordinates is where the player are standing at the moment, therefore it's blocked and the event cannot reach there.
The thing is: I've also tried to use the
move_to_location and pick the player coordinates to use as parameters, but the same happens. Afterall, it's the same logic: The player are standing at the final destination, therefore it's blocked, therefore the pathfinder can't reach.
I've then tried to overcome this with the following: instead of picking the player coordinates, i just pick the player X axis + 1. So it should try to pathfind to the next right tile. And it works! But i can't rely on hardcoded, because if the tile directly at the player's right it's also blocked, the problem remains. However, i've tried to overcome this by making a verification and set two different pathfindings based on if the right tile around the player it's blocked. (Now i've realized that i'll need to make four of these verifications, but anyway...)
Then we've finally come to my problem: the script
passable?() keeps returning true even when i've verified that i've not messed up on the selected tile. I've tried to use the
$game_map.passable? instead of the game_character one, which actually should be the right one to use, but i don't know what exactly are all the parameters.
The function: "passable?(x, y, d, self_event=nil)" needs 3 or 4 parametes. What the the D stands for? That's my question. Thank you if you at least read until here, even if you can't help me.
EDIT: I've read this again and thought that i could've not have been clear about my issue. Thing is: the script
passable?() when called directly from the event page uses the Game_Character.passable?(), which only needs two arguments: x and y coordinates of the targeted tile. This one is that keeps returning true even if the tile is selected correctly and that tile is not passable.
The Game_Map.passable?() is different, needing all 3 or 4 arguments (since one's already set by default). And since i don't know what the D stands for, i don't know what to put in that parameter.