MV Eventing a Foraging System

Hello, Today I would like to share with you a problem encountered with a particular method.
This is "Eventing a Foraging System" by Yanfly
http://yanfly.moe/2018/07/13/eventing-a-foraging-system-rpg-maker-mv/

I followed the entire tutorial, unfortunately it doesn't seem to work. The problem is that the berries don't grow back.
The event remains on page 2 and does not return to page 1.

I share with you all my work, and thank you in advance.

[ISPOILER]
01.png
02.png
03.png
04.png
05.png
06.png
07.png
08.png
09.png
[/ISPOILER]

I'm a bit lost, I'm really counting on your help to show me the right way.
Thank you
Are you using the Self Variables plugin?
yes, sorry I didn't specify it, but I do use "Event Copier (YEP)" and "Self Switches & Variables (YEP)"

10.png


11.png
can you give a screenshot of your plugin manager so that we can see if the plugins are in the correct order and a few other things?
Thanks for taking the time to help me.
12.png
I'm trying to figure out the point/logic of your events.

Your Update Day Respawn calls the Respawn Day Cycler three times in a row, which right away looks like it might be unnecessary.

Then, inside Respawn Day Cycler you do a loop 999 times, which seems like a lot.

So my questions are...why do you want the day cycler to go 2,997 times, when you're only setting your respawn days variable to 3?

And what is the point of that variable 11, which you set to three different values inside Update Day Respawn but never use inside of Respawn Day Cycler?
Hello and thank you for helping me understand this system.

I followed the "Eventing a Foraging System" tutorial.
To answer your questions dear Turan, yes you are absolutely right, my Update Day Respawn calls the Respawn Day Cycler three times in a row, and it is useless. Because variable 11 in the specific case where it is set up in "Update Day Respawns", is linked to the maps in which I want the "Berry" event (mapId (1), eventId (1)) to be renewed. (But maeby i do not understand the tutorial, my english is limted).

13.png


You say that the "Temp Variable 3" has a number that is too high (999). You are probably right, I only followed the tutorial.
After reading your message, I modified it at the moment to 3. Unfortunately nothing to change.

15.png

16.png


I hope I have answered your questions, to move forward in this problem.
Thanks again.
You say that the "Temp Variable 3" has a number that is too high (999). You are probably right, I only followed the tutorial.
After reading your message, I modified it at the moment to 3. Unfortunately nothing to change.
I misunderstood the intent of that loop - it's looping through all of the events on that map. So, as Yanfly says, 999 is the max you'd ever have, but you could put it at a lower number if you know you have fewer events on any map.

it is useless. Because variable 11 in the specific case where it is set up in "Update Day Respawns", is linked to the maps in which I want the "Berry" event (mapId (1), eventId (1)) to be renewed.
Except it isn't. In Yanfly's tutorial, that variable that stores the map ID is variable #1 (the first line of the Script box in the Respawn Day Cycler event). But in your events, you're setting variable #11 in Update Day Respawns, but you left that line as using the value of variable #1.

That's why I pointed out that your variable 11 was being set in one event but never being looked at in the other event.

So this isn't working because map ID 1 is never getting touched, it's only changing the self variables on whatever map your variable 1 is.

You need to change that first line of script to read
Code:
var mapId = $gameVariables.value(11); // This variable contains the Map ID.

Then it will correctly update the events on maps 1, 2 and 3.
I only followed the tutorial.
A tutorial is not there to be "followed", it is there to help you understand how something works.

understanding how something works requires a lot more time than just stupidly following without understanding.
That is why I always say that reading (watching) a tutorial is always a waste of your time - you need to work through the tutorial to understand it before it is worth that time working through it.

and only by understanding a tutorial can you really use what is described there, because otherwise the smallest change or error will leave you stranded.
I understand your point of view, I just changed the "var mapId = $gameVariables.value" to 11 as you advised me. I had understood that it was necessary to mark the value of the map where my event is located, namely map 1.
17.png

As you can see in this image, I changed that, but nothing worked. I'm terribly sorry, I hope I'm not bothering you Turan.
Maybe you see another way out?


Dear Andar,
I took the time to fully understand the tutorial. I think I've done all of the mechanics, as you can see in all these images I've shared.
But tell me sir, maybe you have a suggestion for the smooth running of the operation?
The next line of your script has the exact same mistake. It's looking at the value of variable 1, but in your event you're using variable 12 to track the event ID.
Yes, I follow your advice carefully. Save the project and test. Picked the berries, rested for 3 nights and more, and the berries weren't back.
I don't know if you saw my edited post:
The next line of your script has the exact same mistake. It's looking at the value of variable 1, but in your event you're using variable 12 to track the event ID.
Dear Turan, everything is working now.
With my limited English and my little knowledge of RPG MAKER, I failed to understand that it was about the relationship "Temp Variable 2" and "Temp Variable 3". I thought it was about the event(01) "Beery" placed in the map (01).
You helped me relentlessly and I thank you, now I can continue my project.

18.png
i just looked at this system and .... got to ask is this system usable WITHOUT the paid plug-ins if yes i love to know how to...... IF NOT then is there another system like this that doesn't cost money to get running?
i just looked at this system and .... got to ask is this system usable WITHOUT the paid plug-ins if yes i love to know how to...... IF NOT then is there another system like this that doesn't cost money to get running?
You just need an event copier/spawner and a self switch/variable plugin. There are a lot of alternatives to the Yanfly ones.

Original thread: https://forums.rpgmakerweb.com/threads/eventing-a-foraging-system.145425/