YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
15
First Language
English
Gathering System with No Variables

Hello, everyone! After MV came out, I had been on the lookout for gathering and crafting systems and plugins for this specific editor. I came across this thread on Mining, Smelting, & Synthesis by Syndicate (which was super helpful,) and used it as a springboard for my own system. This one, however, does not rely on individual variables for each gatherable node. Instead, it relies on self-switches and script calls.

I am by no means saying this way is better, only that I prefer to forego the use of multiple variables. I think that it's hard to keep track of them all and, if for some reason you want to edit the order of your variables later, you have to also edit each individual event. If you aren't incredibly strict about where your variables go, you may not care to use this system, but that's okay!

The pros to this system are the lack of variables, and a simple common event to regulate all of your nodes across the game.

The cons are that you can have no more than 4 "swings" from each individual node, you can always get more items per swing if you wanted. For me, this works just fine because I won't ever need to get more than 3 from a node in my game. If you need a node that will give you 5 or more swings, you may need to use variables in your project.

So, without further ado!

-----

Things You May Want/Need

Here's the Project Download

Yanfly's Engine and Message Core Plugins

(For reward messages that use the \ni[x] message shortcuts.)

Vlue of Daimonious Tails Advanced Time System Plugin

(Used to respawn events in this tutorial at 6:00AM, but you can use any time system that allows you to do an if/else check if the time is right. This can be done with other plugins, or variables.)

If you don't know how to install plugins, and want to know, go here, to Yanfly's "How to Install Plugins" tutorial video.

-----

Gathering System with No Variables Step-by-Step

1. Create a New Project (if you want,) and a new map. I created two just to be sure that events would still respawn when I was on a different map.

2. Go to the "Cog" or Database Button and go to the "Items" tab. Create the items you need. You can use the ones I made as a guide. Make the tools non-consumable, just in case your PC accidentally uses it up--we don't want that...unless you DO, I don't know.

2e660w1.png
3. Now go to your map and create an event. This one is going to be a tree for us to chop down! In the tutorial project I added a Gathering Sprite file so that you can "see" the changes in the node. Use it if you want! It can also be found here.

4. The first thing you do is add a Control Variable. Choose whichever variable you want to be the "randomizer." This will be the only variable you use, and even then it's not necessarily required. Set the variable to Random, 1-100.

5. Create a Conditional Branch with an "Else Branch," that checks to see if the Party has a Legendary Axe in their inventory.

24qskgp.png
6. Inside, give the chop a sound effect! I chose SE Move1, because it sounds like chopping a tree! Then, create another conditional branch (inside the first one, under the SE.) This branch is going to check to see what the random number from earlier was. Depending on what it was, you will get different items-- In this case, a Golden Apple, some Maple, Branches, or nothing. This Conditional Branch is going to check if the Random Variable is greater than or equal to 85, (the top 15%.) Give it an else case, as well.

14dec7q.png
7. Inside the Random Variable check, you are going to reward your player with a Golden Apple! Go to "Change Items" and Increase +1 Golden Apple into the Party's inventory. Underneath that, create a reward message. In this case, I use Yanfly's message core to use the shortcut "Got \ni[21]!" The reason I do this is that if I ever need to change Golden Apple's name into something else, the message will always work, and I won't have to go back in and change the messages for all the events later. Pretty handy! Under that, add a Self-Switch 'B' to ON.

8. Copy the Random Variable is >= 85 branch and paste it inside its own Else Branch. That is, NEST it. There's going to be a lot of nesting in this. This new conditional branch will instead check if the random variable is greater than or equal to 25, so change the 85 to 25 in this one. Also change the items gained to Maple, and the message to \ni[20]. Keep the self-switch to 'B'.

9. Do this one more time, copy and paste the branch into the else case of the >=25 branch, and make the random variable check for 2 or greater. Change the items to Branches, and change the message to \ni[19]. Again, keep the Self-Switch.

10. Lastly, to finish up the Legendary Axe Conditional Branch, put in the last branch (>=2) Else Case, a message that says "Got Nothing!" That means if they get less than 2, they get nothing!

To review, this is what we have done-- We created a branch to see if we had the legendary axe. If we DO, we check to see what the number from earlier was. If it was >=85, we get an apple, if it wasn't, we check if it was >=25, to get maple. If it wasn't, we check if it is >=2 to get branches. If it wasn't greater than 2, than it must have been 1! So that last 1% get's nothing.

This is what it should look like:

2woyu8n.png
11. The hardest part is over! Well, mostly. Now it's just a lot of copy and pasting and editing small parts. You will now copy the ENTIRE Legendary Axe Conditional Branch and Nest it into its' Else Case. We're going to edit the new conditional branch to check if they have the IRON Axe instead. First, we are checking if they have the Legendary Axe, but if they do not, it will check if you have the Iron Axe instead.

Again, inside the IRON AXE Else Branch, paste the same Legendary Axe Conditional Branch. Change this one to the RUSTY Axe. If we don't have the Legendary Axe, we check for Iron Axe, if we don't have the Iron Axe, we check for Rusty Axe. Hope this makes sense. Make sure to download the project to see what I mean, but here's a brief idea.

If: Party has Legendary Axe

Play SE: Move1

If: Random Variable >= 85

Change Items: Golden Apple +1

Text: Got \ni[21]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 85>

If: Random Variable >= 25

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 25>

If Random Variable >= 2

Change Items: Branches +1

Text: Got \ni[19]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 2>

Text: "Got Nothing!"

End

End

End

Else <If Party does NOT have Legendary Axe>

If: Party has Iron Axe

Play SE: Move1

If: Random Variable >= 90

Change Items: Golden Apple +1

Text: Got \ni[21]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 90>

If: Random Variable >= 40

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 40>

If Random Variable >= 10

Change Items: Branches +1

Text: Got \ni[19]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 10>

Text: "Got Nothing!"

End

End

End

Else <If the Party Does NOT have the Iron Axe>

If: Party has Rusty Axe

Play SE: Move1

If: Random Variable >= 95

Change Items: Golden Apple +1

Text: Got \ni[21]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 95>

If: Random Variable >= 60

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 60>

If Random Variable >= 20

Change Items: Branches +1

Text: Got \ni[19]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 20>

Text: "Got Nothing!"

End

End

End

Else <If the Party Does NOT have the Rusty Axe, we assume they are BARE HANDED.>

Play SE: Knock <Because it sounds like a fist hitting the tree.>

If: Random Variable >= 85

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 85>

If Random Variable >= 35

Change Items: Branches +1

Text: Got \ni[19]!

Control Self-Switch B = ON

Else: <If Variable is NOT >= 35>

Text: "Got Nothing!"

End

End
If you can tell, the last nesting for Barehanded-ness only allows for you to get Maple, Branches, or Nothing-- no golden apple! So we can choose if we want to not allow them to get rare items without specific tools. Another thing to note is that the chances to get these items change depending on the tool used. If you have the Legendary Axe, you have a 15% chance of obtaining an apple, but with a rusty axe, you only have a 5% chance!

12. Copy the Event page. Paste it. We will only make two changes-- One, make this page dependent on the condition of self-switch A. This way, self-switch A must be on to activate THIS page. In the Contents, make sure to add "Self-Switch A = OFF" underneath every Self-Switch B=ON. This way, when you go to Self-Switch B, you should turn off Self-Switch A! Kind of like this:

If: Party has Legendary Axe

Play SE: Move1

If: Random Variable >= 85

Change Items: Golden Apple +1

Text: Got \ni[21]!

Control Self-Switch B = ON

Control Self-Switch A = OFF

Else: <If Variable is NOT >= 85>

If: Random Variable >= 25

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch B = ON

Control Self-Switch A = OFF
13. Copy THIS PAGE (Page 2,) and paste it. Edit it the same way as before, but change self switch dependency to 'B' and change the switches in the Contents to C=ON, and B=OFF.

If: Party has Legendary Axe

Play SE: Move1

If: Random Variable >= 85

Change Items: Golden Apple +1

Text: Got \ni[21]!

Control Self-Switch C = ON

Control Self-Switch B = OFF

Else: <If Variable is NOT >= 85>

If: Random Variable >= 25

Change Items: Maple +1

Text: Got \ni[20]!

Control Self-Switch C = ON

Control Self-Switch B = OFF
See where we're going with this?

14. Do this ONE MORE TIME. Page 4 will be changing the dependency to Self Switch C, and changing the Contents to D=ON, and C=OFF.

15. Page 5, with a dependency on Self-Switch D, only has a message telling you there's nothing left to gain! Page 1 and 2 have the same full tree graphic. Page 3 has a slightly chipped tree graphic, page 4 has a teetering tree graphic, and page 5 has a stump. This will allow you to see the changes when you use the event!

16. We are done with the event!! It was a lot of work, but the cool thing is, we will never have to make another tree again! Remember the MAP ID number and EVENT ID number for the next part. In my case, the event was Map 1 and Event 1.

17. Go to the Cog again, to the Database, and this time, go to Common Events tab. Make it dependent on a Parallel Process Trigger. The Switch should be a switch you always plan to have on, or can turn on and off to allow the respawning of events as you choose. Name the Switch something like "Gathering Respawn".

18. Inside the Common Event, we are going to run another nested conditional branch. They are going to use Vlue's time system plugin, but you can do this any way you want. Whatever conditions you want met to respawn will go here. In this case, the conditional branches will use Script Calls.

19. When you have created a conditional branch with NO else case and selected Script Call on the last tab, put this inside of it: $gameTime.inBetweenHour(6,7)

This checks if it is after 6AM but before 7AM.

Inside this conditional branch, make another conditional branch with a similar script call that says: $gameTime.inBetweenMin(0,1)

Together, these branches continuously check if it is 6:00AM. This is when we want to have our gathering nodes respawn!

Inside both conditional branches, put a Script Call:

//Map 1, Event 1 Gather

$gameSelfSwitches.setValue([1, 1, 'A'], true);

$gameSelfSwitches.setValue([1, 1, 'B'], false);

$gameSelfSwitches.setValue([1, 1, 'C'], false);

$gameSelfSwitches.setValue([1, 1, 'D'], false);
This script call turns Event 0001 on Map 0001's Self Switches A to True and B, C, and D to False. It's important that you do not just do A on and D off, as this will skip the other pages. For instance, if you were to mine a tree ONE TIME, it would be on page B, and if you do not turn the switch off, it will then have Switches A AND B on at the same time. Bad juju!

20. For every event you create, just copy and paste the Script Call into the Common Event inside the Conditional Branches, changing the map and event IDs to the event you want to reset. Where we save on Variables, we make up for in Script Calls! But this way, we can rearrange them however we like in any order, and not worry that it will effect the events themselves.

21: Go back to your map and create an event, like a bed, that will change the time to 5:55 AM. We choose this time because we want to see the event change at 6:00! To do this using Vlue's plugin, we create a plugin command that says "GameTime set x 55 5 x x x x" The "x's" are parts of time we want ignored, only 5 hours and 55 minutes matter! Another Plugin Command should be used after this one, "GameTime add day 1" -- This moves it to the NEXT DAY. :]

If you need an idea of how this works, check the tutorial project's campfire event.

22. SAVE!

23. Try it! When you enter the game, be sure that you enter the Debug menu by pressing F9 or FN+F9, and check to see your Respawn switch is ON. I don't know how many times I forgot this and thought I had messed up my script somehow. It won't respawn if the switch is off!

24. Chop down a tree using your bare manly hands and when it is completely a stump, or you have gathered 3 items from it, go talk to your time warp event and change time. At 6:00AM, it should have the tree pop back up!! If you only gather one item from it, it will still respawn as the first switch.

-----

So that's the GIST of it. If you want more events, all you have to do is copy and paste them where ever you want! Make sure to add the script calls to the Common Event so that they are affected by respawn. Check out the tutorial project to see how you can do this for Mining and Fishing, as well. It's the same principle! Just edit the pages to use different tools and get different materials.

The reason I used TWO MAPS, was to make doubly sure that my events were changing even when I was not on the same map as them-- and it works! You can leave the map and wait til 6:00AM passes and come back, they will still respawn as long as the Common Event Switch is on!

Another thing-- some of you may be wondering why the duplicate pages on the event. The reason I did this is because the time starts at 6:00AM in my game. The switch to reboot the nodes is not on, so the events would not set themselves to Self-Switch A using the reboot. HOWEVER, if you set a switch at the start of your game, you can have the reboot run right away and have self-switch A turn on right away as well. Doing this can free up a page. You could then turn switch A off, and have FOUR items come from the event instead. Hope that makes sense.

-----

If you have any questions about this, let me know. Again, I don't think that this is the only way to do this, and it IS a bit of work. However, I think that it is worth the effort to forego variables and keep things organized.

Hopefully this helps you somehow. Feel free to use this any way you want! Have fun!

Edit: Found a cosmetic mistake in the project, where Branches should have been Ruby lol. oops.
 
Last edited:

Syndicate

Pandora Network
Veteran
Joined
Dec 20, 2012
Messages
98
Reaction score
77
First Language
English
I think this is brilliant, I learned a lot myself! Very well written, thanks for sharing! :D
 

Unmercyful

Veteran
Veteran
Joined
Oct 25, 2015
Messages
123
Reaction score
31
First Language
English
Hi there, I think this is a really awesome system you have created. Is it possible for this to work with Terrax's Lighting Plugin, which has a day/night system in it. I have tried and cannot figure out how to get it work. Because of error $gameTime not defined. If you can help with any info that would be much appreciated. Thanks again for an awesome system! Hope I can use it.
 

YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
15
First Language
English
Hi there, I think this is a really awesome system you have created. Is it possible for this to work with Terrax's Lighting Plugin, which has a day/night system in it. I have tried and cannot figure out how to get it work. Because of error $gameTime not defined. If you can help with any info that would be much appreciated. Thanks again for an awesome system! Hope I can use it.

Hey! I never used Terrax's plugin before, so I downloaded it really quick and took a look. For his/her day/night system, they use in-game variables to store the hours so you can call them that way. When you go to your plugin menu, and edit the plugin, Terrax's plugin has a list of parameters.


Save DaynightHours


Save DaynightMinutes


Save DaynightSeconds


When you download the plugin and load it, the initial values of these parameters are set to 0, however, from what I can tell, you can set a number in them that equals the in game variable you would like to use to call the hour, minutes, and seconds. For instance, if I were to set the Save DaynightHours to 1, DaynightMinutes to 2, and DaynightSeconds to 3, I would use THOSE values to check for whatever time you needed to change the reboot.


In the common event, instead of the conditional branches using Vlue's scriptcalls, you would instead use a regular old Variable conditional branch.


If Variable 1 (The hour variable) is set to 6


If Variable 2 (The minute variable) is set to 0)


Reboot scripts go here.


End


End


^^^ No else cases are needed unless you really want them to be for some reason. So just set the variables to what you want, and then use this way instead. :]


Hope this helps, let me know if it  doesn't work out~
 

Unmercyful

Veteran
Veteran
Joined
Oct 25, 2015
Messages
123
Reaction score
31
First Language
English
Lol, it must of been a noob question, because you made it sound so simple and it worked just perfect! Thanks so much for help and going out of your way. I owe you!
 

YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
15
First Language
English
No problem! I'm glad it worked out for you! :)
 

Belrindor

Warper
Member
Joined
Apr 11, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Hi! I tried to download this and it was not available.
 

YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
15
First Language
English
Hey, everybody! I'm back from the dead and I realized that all my links broke, so I fixed them. Sorry to anyone who may have tried to download the project file and couldn't. :)
 

Azineum

Warper
Member
Joined
Dec 31, 2020
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
When I harvest more than one node the system lags like a boss when I open the menu shortly after.
 

Latest Threads

Latest Profile Posts

I need help on what I should add to this fighter game.
Should I add:
Rain
Sleet
Snow
Leaves
Wind
If you can come up with anything else let me know.
Final day of the kickstarter campaign and my team and I decide to cap it off by doing ... musical numbers online.

These are clearly definitely My People.
6 hours and 35 minutes until it is December first here :3
Charon.png
Spending the day doing concept art! It's so comfy! I'mma draw the full party and take it from there. Hope everyone else is having as good of a day!
"Never argue with a Narcissist. No matter how sound in your logic, they'll always see themselves as correct and you too beneath them to understand.

The best you can do is take things with a grain of salt and leave them alone to wallow in their own delusion. If you're lucky, you'll catch the time where they inevitably destroy themselves!"

Forum statistics

Threads
117,084
Messages
1,104,419
Members
153,072
Latest member
AdWhimGame
Top