[CGMZ] Gathering (Patreon)
Downloads
Content
Add an easy to use gathering, farming, mining, foraging, etc. system to your game that also integrates with [CGMZ] Professions.
! SEE BOTTOM OF POST FOR UPDATES !
Hi all,
This port of my CSCA Gathering for VX Ace took a while longer than I expected, mostly due to how many different areas of the engine it touches. I think it is finally far enough along to be useful to people though, so I am releasing it into Alpha today with some already-planned updates to make it even better soon!
This plugin implements a gathering or "farming" system into your game. Basically, you set up a node in the plugin parameters, add stages of growth to the node, and the plugin takes care of the rest. It will automatically progress the node from stage to stage and allow the player to harvest it when ready. You could use this for farming, foraging, mining, or any time when you want a "node" of something to grow automatically in the background.
This plugin also integrates with CGMZ Professions to allow you to make profession level requirements as well as receive profession exp automatically when successfully harvesting a node. It also works with CGMZ Toast Manager to show a toast window with the results of the gather, whether it is successful or not.
Each node is based on a normal event, and the event commands can run (if the player can harvest the node), so you can use any regular event command while the player is harvesting the node too.
Let me know if you have any suggestions for features you'd like added to this!
Alpha Update April 28, 2023: Hi all, this plugin has been updated today to add some better eventing features. Now you can opt to run a common event on gather success/fail, and these common events can be different per node. You can also have the node change the event priority based on the growth stage, so you can make it so the player can walk on top of a small planted seed but maybe not once it matures into a full plant.
There were also plugin commands added to get the node's current stage, to advance the node's stage by 1, and to reset the node. This should make it easier to event a way to have the player "plant" a gathering node.
This update adds success and fail sound effects which will play when gathering succeeds or fails. You can have global sound effects which can play for any node, or node-specific sound effects which will only play for that node. In the case there is more than one possible sound effect, a random sound effect will be chosen.
This update also added per-node messages for not having the required tools or not having the required [CGMZ] Profession level to harvest the node. These node-specific messages will override the default messages shown if set. See gif below for different messages per-node:
This update also added some smaller quality of things things, such as the option to change the message window background style for gathering messages. It also added a plugin command to advance every node's stage by 1, which might be useful if you want every node to advance a growth stage if you require your player to sleep before they can advance stages.
This update also fixes a few bugs. You can now harvest nodes which do not require any tools. Node events will have their priority set accurately as soon as they start growing, instead of waiting for a stage advance. The game will no longer crash when loading into a saved map that has a growing node. Lastly, this plugin will no longer crash when invalid JSON is detected in your plugin parameters, instead it will warn you in the dev tools console. These warnings are still important to fix, as the parameters with invalid JSON will not function properly until fixed.
This is a small update to fix a pretty serious bug with the plugin that could cause the player or events to randomly appear above star passability tiles. If you noticed your player, followers, or events randomly seeming to briefly walk on top of a tree tile, or some other star passability tile, this may have been the issue.
This update also fixed a bug with the variance for items, where it would actually vary by 1 less than the amount set in the plugin parameters. Now it should correctly vary by the amount set in the parameters.
This update adds the concept of an expired gather node. This is marked with a new property on your stages called expired. When expired is true, the node in that stage will instead award different items and apply an exp penalty when gathered. You can now mark certain items as expired, and when gathered in the expired state the node will award the expired items. Items gathered when the node is not in the expired state will award items not marked as expired items.
This update also adds the option to advance only certain nodes by id when using the plugin command to advance every node stage. This allows you to more easily advance multiple nodes at once, but without needing to advance every single node. For example, you may have carrot nodes that you want to advance every night, but lettuce nodes you only want to advance once every other night. Now you can do that via eventing and with the plugin command to advance nodes by id.
This update also fixes some bugs. Previously, it would select tools to use for harvest even if it was not the best tool for the job in the player inventory. This should now be fixed, and it will look at every item the player has and choose the one with the highest success bonus. This update also fixed a bug that could occur when not using [CGMZ] Professions, as the gather fail flow could have still tried showing a profession failure message in some cases.
This latest version adds some more customization to the gathering progress window. You can now change some standard window options such as windowskin, tone, padding, and back opacity. You can also customize the gauge color on a per-node basis, so your mining nodes can be more of a brown color while your farming nodes can be more of a green color. See below gif for how it can look:
This update also added some statistic tracking for how many of each node type have been harvested by the player. You can access these statistics by using the new plugin command, Get Harvest Amount.
An integration with [CGMZ] Rumble was added to allow you to rumble the gamepad when a gather succeeds or fails.
A bug with event priority was also fixed, your gathering events should now properly reset their priority when harvested.
This version added the ability to plant an item that turns into a gathering node. This uses a plugin command and includes a plantable selection window to select what the player wants to plant. When using a plantable, you do not need to include the gathering comment. See below gif for how it can look:
The plugin command Advance Every Node now allows you to advance every node except for nodes that match an id (exclusion mode). While making this I noticed that there seemed to be a priority bug with manually advancing a node, which has been fixed.
Some quality of life changes were made. With RMMZ 1.9.0, a new map select ui parameter type was added so this plugin now uses that when asking for a map id. The order with [CGMZ] Toast Manager in the Plugin Manager should no longer matter. Your rumbles can now have a start delay.
This version is full of smaller requests and some bug fixes. This update adds instant gathering, which is for people who want nodes to be gathered instantly without showing the progress window. This is a per-node feature, and can be enabled by setting the gather time for a node to 0.
This update also adds a bunch of customization for the gather progress window. You can now set the gauge height, customize the gathering text, add a Y offset to the window, set the window width, and show the text over the progress bar. Speaking of the gather progress window, this update fixed a small bug that could cause the map name window to interact poorly with the gather or planting windows. See below gif for how these customizations can be used:
This update also fixes a pretty major bug that caused planted gathering nodes to disappear when transferring maps in some cases.
This update also makes the Start Planting plugin command much easier to use, as you no longer need to wrap it in a conditional branch that checked if something was planted already or not.
This version adds the gathering journal, a new scene where your player can view information about each gathering node they have found in the game.
To use it, you will need to add category ids and any info you want to show in the journal to your nodes. You will also need to set up the categories. Many supporting options for customization have been added for this new scene, including standard options across many [CGMZ] plugins like background, list window width, text alignments, disabling touch ui, etc. See below image for how it can look:
This update also changed the gathering and plant select window options for things such as windowskin, style, tone, etc. These are now handled by an integration with [CGMZ] Window Settings.
This version adds the option to allow your players to harvest nodes more than once before they reset. This includes a variance so you can make it between 3 - 7 harvests per growth, for example. Of course, you can also still make gather nodes that reset after one gather as was previously how all gather nodes worked. See below gif for how it can look:
The [CGMZ] Toast Manager integration has been improved, as it now uses the preset id system. You can control any toast parameter via the preset, which is much less limited than before. This also allowed for per-node presets, in case you want a special toast window to display for some of your rare gathering nodes. If no node specific preset is found, it will use the global gather success or fail preset set up in the plugin parameters. You can use %item to show the item that was harvested, and %amt to show the amount that was harvested.
The journal windows can now be customized with [CGMZ] Window Backgrounds and [CGMZ] Window Settings.
The plugin will now automatically set your last growth stage's growth time and variance to 0, fixing an extremely common user error.
This version refines the fail messages the plugin comes with, which can by default be a bit annoying because they use the game message window that interrupts player movement. This is still the default, as this is the default way the game can show text to players without any integrating plugins. However, you can now set the fail message parameters to be blank, and the message will not show at all. You can also use a new integration with [CGMZ] Floating Text to show the error message as floating text. This can be more fluid as floating text does not interrupt the player.
See below gif for how it can look:
Along with the updates to how the failure messages display, I added a new one for when the player tries to harvest a node that is still growing.
This update also adds the ability to require weapon or armor tools to be equipped to count. Item tools still go by party inventory only.
This update also added a cancel key and gamepad button you can press during a gather to cancel it. This will not affect the node, and will not provide any fail or success outputs.