I am in need of a gathering script that is easy to set up nodes, and each node will have individualized counters for how many have been gathered/can only gather x amount before depletion. These values need to be saved outside of the variable database to save room, as there will be TONS of gathering nodes. There also needs to be item and/or skill/profession requirements for gathering. It would also be awesome if you could include a function that changes the current map tile to a new map tile upon depletion. These values also need to be saved between saves.
Gathering Script
RGSS3 Script RequestsThere might be a way to do it without a script. Look for a script that lets you have more self-switches on events, then the first time the node is gathered, set the self switch to A. Then, next time set it to B. Keep that up until you hit the number of times you want the node to be used, and make it empty at that point.
If you never intend to make a node gatherable more than 4 times, you don't even need that script, as you can use self switch D for empty then, and just jump the sequence for the occasions you want to gather it less than 4 times (for instance, if you want the node to only be gathered 2x, you can go 1st gather -> set switch A on. second gather, set switch D on).
I'd recommend this approach, as you can set it to only work if item exists (a check box on the event lets you set that). Otherwise, you would also need a scripter to implement your entire skill / profession requirements as well (or provide them with how you are setting those up), as there are no native skills to RPGMaker.
If you never intend to make a node gatherable more than 4 times, you don't even need that script, as you can use self switch D for empty then, and just jump the sequence for the occasions you want to gather it less than 4 times (for instance, if you want the node to only be gathered 2x, you can go 1st gather -> set switch A on. second gather, set switch D on).
I'd recommend this approach, as you can set it to only work if item exists (a check box on the event lets you set that). Otherwise, you would also need a scripter to implement your entire skill / profession requirements as well (or provide them with how you are setting those up), as there are no native skills to RPGMaker.
I still need integration for skills/professions, as you said, and it still needs a random chance modifier. How would I go about that?
For professions, you might be able to add a check inside the event if class == this, add a bonus? You could also do something similar for the random chance (if rand < 10, give gold, else give silver). For skills, if they are to progress as the game moves on, that is going to be a totally different script, and I'm afraid I'm zero help on that. Maybe there is a skill script already out there that I don't know about?
I appreciate the help, and ideas. Hopefully someone will come along who can make a professions/skills script. ^^
Take a peek on CSCA scripts:
http://www.caspergaming.com/Developer_Tools.html
There is a Gathering script there, and a Profession script too, AND these can be tied together.
http://www.caspergaming.com/Developer_Tools.html
There is a Gathering script there, and a Profession script too, AND these can be tied together.
I tried the gathering script and couldn't get it to work. =/
After configuring the base node type, and setting up gather events, I am left with this error.
EDIT2: I NEED the gathering script to provide functionality for multiple gathers, up to a limit, and to change the map tile after limit is reached. If this could be accomplished through CSCA Gathering, it would be preferable. If not, a completely new script with all of the aforementioned features would be ideal. Thanks for the help.
Edit: Disregard, as I did not have the core script installed.
After configuring the base node type, and setting up gather events, I am left with this error.
EDIT2: I NEED the gathering script to provide functionality for multiple gathers, up to a limit, and to change the map tile after limit is reached. If this could be accomplished through CSCA Gathering, it would be preferable. If not, a completely new script with all of the aforementioned features would be ideal. Thanks for the help.
Edit: Disregard, as I did not have the core script installed.
Bump. See previous thread for edits.
It is possible for you to store each node's counter in just one game variable. Game variables can store more than just numbers. They can store strings, hashes, arrays, and other objects. To set a game variable to something other than a number, you need to use a script call in an event. Here, is a tutorial by seita explaining how to store other things in variables and this post explains how to store hashes. I recommend that you use a hash to store your data and give each node a unique name. A good way to do that would be to use a "formula" such as "MapID_EventID" (e.g event 38 on map 12 would be "012_038"). However, before you use any of the data in the game variable you are using you have to put a hash in it by calling this script in an event:
$game_variables = Hash.newBe sure to replace 'i' with the number of the game variable you want to use. I recommend doing this at the very beginning of your game (make sure to do this only once, otherwise you will delete all the data you already stored). Now you can set the entries of $game_variables to whatever you want:
$game_variables["012_38"] = 10$game_variables["pet"] = "Dog"$game_variables[2] = :symbol$game_variables["hash"] = {"cat"=>"meow","dog"=>"woof"}$game_variables["Array"] = [1,2,5,2.03,"woof",0,nil,true]You can use this in a conditional branch by going to the fourth page and selecting the option 'Script' and typing in something like:
$game_variables["012_38"] > 0However, if you didn't set $game_variables["012_38"] to something before you tried calling the above script the game will crash and give you an error that says something like "undefined method > for nil object". To avoid this you could set up all your entries at the beginning of the game, right after you make $game_variables a hash, or the first time the player visits a map with nodes, you can set up the counters for all of the nodes in that map.
To decrease the value of a counter, you can call this script:
$game_variables["012_38"] -= 1Note that the above warning applies to this script as well.
For the professions system you want, I happen to be working on an Abilities System that you might find helpful.
$game_variables = Hash.newBe sure to replace 'i' with the number of the game variable you want to use. I recommend doing this at the very beginning of your game (make sure to do this only once, otherwise you will delete all the data you already stored). Now you can set the entries of $game_variables to whatever you want:
$game_variables["012_38"] = 10$game_variables["pet"] = "Dog"$game_variables[2] = :symbol$game_variables["hash"] = {"cat"=>"meow","dog"=>"woof"}$game_variables["Array"] = [1,2,5,2.03,"woof",0,nil,true]You can use this in a conditional branch by going to the fourth page and selecting the option 'Script' and typing in something like:
$game_variables["012_38"] > 0However, if you didn't set $game_variables["012_38"] to something before you tried calling the above script the game will crash and give you an error that says something like "undefined method > for nil object". To avoid this you could set up all your entries at the beginning of the game, right after you make $game_variables a hash, or the first time the player visits a map with nodes, you can set up the counters for all of the nodes in that map.
To decrease the value of a counter, you can call this script:
$game_variables["012_38"] -= 1Note that the above warning applies to this script as well.
For the professions system you want, I happen to be working on an Abilities System that you might find helpful.
Original thread: https://forums.rpgmakerweb.com/threads/gathering-script.38392/