MZ Visustella MZ Event & Movement Core + Yanfly Foraging Script Issue

Hi,

I'm having trouble with event foraging breaking after a port.

This was/is working in MV (I still have the MV project data and self variables plugin):


I ported the project to MZ and installed the plugin list below.

I remembered to check the plugin settings for Event Core and point it to the appropriate Map ID for the templates (In this case 6, event 1 for collecting a Rock which I set as the event template name in the plugin interface)

I've included the variables list to check against the script using a single Self Variable which appears to have had its name tagged properly (The event correctly lets the player pick up an item from the two sample gathering nodes)

The event then never respawns.

I've included the sample event below.

I've been puzzling over this since I have the working MV code to compare to and can only conclude I've made a novice mistake and failed to set up the plugin parameters properly.

I know there should be some syntax and plugin parameter setup changes between the YEP Self Variables & Switches script and the Event and Movement Core scripts.

I'm still very early on in the project and a newbie at RPGMaker development, with no Javascript experience. Is there something simple I overlooked, or a configuration issue with my variables or the Respawn Day Cycle script?
Where did you get this.getSelfVariableValue() and this.setSelfVariableValue() from?

According to the Event and Move Core documentation, those are free-standing functions, not a method of Game_Event (there would be no reason to pass in an event ID if it's being called from the event).

I expect you'd see syntax errors for that if you opened up the Console.

Remove the this. from the front so your function calls match the examples in the plugin documentation.
I got that from here, my fault for not recognizing the plugin syntax had changed from MV but I suspected the problem was along those lines and was too afraid of touching the script itself before asking for help.

For the record the console error from pressing F8 or checking the browser dev console is attached as well.

Rerunning the same script without 'this.' from the YouTube video produces no errors with VisuStella.

Lesson learned, I have to check the console more often when playtesting script issues after assuming no issues with the plugin itself, read to see if the plugin documentation has updated between versions and get a bit more familiar with JavaScript syntax.

This matter is closed, I learned plenty and hopefully this is searchable for any other novices finding the same problem. Thank you very much for your time!

Original thread: https://forums.rpgmakerweb.com/threads/visustella-mz-event-movement-core-yanfly-foraging-script-issue.160656/