Features
– Plant seeds anywhere or specify where they can be planted with terrain tags.
– Fertilize seeds, Water seeds, Harvesting, Erosion
– Cyclic plant behavior
– Use skills to plant seeds


This video explains how to set up a very simple plant (for the full features you’ll need to read the documentation or look at the demo)
Script: ** Please see demo **
Demo: v0.71 (Updated 17Jan2016)
Older Versions:
v0.61 (Updated 13Aug2013)
Add-ons (these should be placed underneath the main script and all of its dependencies. They are not required but provide extra functionality):
Variable Seed Rates (Updated 27Dec2012)
Plow Terrain (Updated 12March2013)
Water Start (Updated 9March2013)
Dependencies: Highlights, Unique Items, Custom db, Reproduce Events. You’ll need to make a sprite sheet inside your character folder called “Fertillizer” (yes it’s mispelled) as well. See the demo if you’re not sure what to do.



it crash if you have a event who move randomly… please fix it, i love this script ❤
It should work now, it was a careless mistake on my part. Thanks for pointing it out.
Error :
Line 1315: NoMethodError occured. undefined method ‘keys’ for nil:NilClass”
sometimes crash the game
Are you using other scripts in addition to this one? That error shouldn’t happen if you’re just using this script. I posted a temporary solution on the rpgmakervxace.net forums. I suspect this isn’t a problem on my end though.
I get the same error:
Error :
Line 1315: NoMethodError occured. undefined method ‘keys’ for nil:NilClass”
sometimes crash the game
When I try and load a game using Yanflys Menu Engine. Only thing is when I look at it it seems that the save functionality is the same and he only changed the menu looks. Maybe something worth looking into.
Removed Yanflys Menu Engine. No success. Did a search for keys in the script editor and only your script uses keys along with RPGVXA core of course. Seems that you don’t have a method set for keys. I couldn’t find one either.
I don’t think it’s a compatibility issue, there was a bug causing that problem awhile ago.
Try using the most recent version of the script, the version of the script you’re using is outdated.
I use many other scripts that modifies the database. For some reason I am getting a different error when I try use inventory…
Full script line 2035L No method error occured
undefined method ‘clear_crops?” for:Game_Weapon….
it 100% happens when in your demo. you give the character a weapon. and when you get to weapon tab… it give this error.
Thank you yet again, another bug I failed to find before releasing this. The links are updated with the fix.
Great Script!! I’ve been trying to event a system like this since VX came out… I have a couple questions about how to set this up with the evented time system that my games runs on. mainly, is there a way I can set the growth time to a variable? The player can choose the speed of time at any point during the game. Thank you and hats of to you for this wonderful script!
Thank you, I’m glad it’s useful.
In response to your question:
The default script doesn’t support this. I’ll add it in as soon as I finish another larger script I want to get out. If you have experience scripting though you could probably figure out how to do it. The growth rate is stored in a field called “seed_rate” for all skills and items that are being used as seeds, so all you would need to do is pull the item/skill out of the database and change the value of “seed_rate”.
The script may not synthesize very well with a true time based system though since it just counts frames there would likely be some asynchronicity between them.
Thanks for the reply! Yea, I found the seed rate. I’ve never been able to wrap my head around scripting though, but I will tinker around with it. My time system is based on frame rates, so I think it would work just fine : ) I’m eager to see what your new larger script is!
sorry for the wait, there was a small problem that took me some time to figure out. You can find the add-on above.
Awesome! You rock! I’ve got another question. The Reproduce Events script that came with the Garden Script looks like a really handy little script. I’m using it for a couple other things that I couldn’t figure out how to do with events alone. When I use the script call…
EventSpawn.spawn_event(001,042,$game_player.x,+1,$game_player.y,true)
I can’t see the event if its being replicated. For testing purposes, I created an event on a new map, that just shows a graphic, it doesn’t do anything else. I have a common event that calls the script call and an item that calls the common event with test text letting me know that it goes through. I’ve recreated it using your demo if you would like me to mail it to you…
Thank you!!
It looks like there is a typo in the method call:
EventSpawn.spawn_event(001,042,$game_player.x,+1,$game_player.y,true)
when you probably wanted:
EventSpawn.spawn_event(001,042,$game_player.x+1,$game_player.y,true, 2)
Can I use this in a commercial game?
Yes. The scripts I post here are free to use.
And also the graphics contain in the demo for commercial use?
Those aren’t mine, you’d have to ask the person who made them http://forums.rpgmakerweb.com/index.php?/topic/22-celiannas-parallax-tiles/
Whenever I got to the Weapons in the Items Menu, it gives me an error that says “undefined method ‘is plow?’ for # and then the script button in the editor redirects me to line 225 of the Plow script.
Try it now, I had the wrong link up for the demo.
I have a question, is it possible to ‘harvest’ the plant via script call?
I have a tree setup so when the player interacts with it they get wood and some saplings. But the tree still remains allowing the player to get the harvest indefinitely.
Yup that’s definitely possible, you don’t need a script call though.
Plants with loop stages won’t disappear when you harvest them. To give a plant loop stages use these notetags on the ‘seed’ item in the database:
replace INTEGER with the growth stage the plant loops back to.
(In your case you could just have the last two stages look the same and loop back to the second to last stage).
I’m sorry, I am not good at explaining.
I’m looking for a way to ‘harvest’ or permanently remove the plant by an event call by the plant itself when you interact with it.
The tree event is set up so when you interact with it, it checks if the item ‘Axe’ is it the inventory. Then it plays a SE to sound like you are chopping the tree down and gives you some wood that is used as a material for other things and the saplings that are the ‘seed’ item for the tree. This is done for ultimate control of what the plant is capable of.
In this case you can ‘harvest’ the tree at any time you want but the longer you wait the more wood you get.
Whoops, sorry about that. I completely misunderstood you before.
Yes, there is support for harvesting built into the script, the script call is:
GardenRa::Harvest_Crop.call(ITEM_ID, self, BOOL)
replace ‘ITEM_ID’ with the id of the item the player will receive when the plant is harvested, leave ‘self’ as it is, and replace ‘BOOL’ with either true or false. Replacing it with true says to remove the plant after harvesting where as false says not to.
There are additional notetags that you can use to further refine how much yield you get from harvesting a plant. They’re explained in depth in the documentation and in the demo.
Thank you very much!
I’m already thinking of many unique plants to make.
Also, while I was messing around with the script I found a bug.
Whenever ShowTextPopups = false when you harvest a plant it crashes and shows this message:
Script ‘Game_Interpreter’ line 1411: LocalJumpError occurred.
unexpected return
The bug is fixed. The demo has been updated.
So I had an item ‘Hoe’ that I could attach to the hotkey and plow the land with. But one I added the seeds and plants, I could not apply the item ‘hoe’ to the hotkeys…and I could not use it from my inventory as it was greyed out, how do I fix this? It was working before.
Hey,
The hoe item should’ve been marked in the database with a notetag like this:
seed plow 1,2,3
The numbers after ‘seed plow’ represent the terrain tags of tiles that you can plow with that item.
if you aren’t standing on a tile with one of the listed terrain tags you won’t be able to use it.
I fixed the bug with the hotkey script, you can get the updated version here.
Yeah sorry I was just coming on to say I figured it out, but now at this point when I plant seeds it doesn’t show the sprite that shows the little seedling…I followed everything in the demo, and it deletes the plowed soil but nothing replaces it >< I really love this script though!
It sounds like it’s a setup problem.
Can you reproduce that behavior in the demo or is this happening in a private project?
If you send a download link to the project with the problem you described to eshra@linuxmail.org I’ll take a look and see what’s going on.
Your gardening script works fine, Im just worried I messed it up…or it might be that I have another script in that might be messing it up. Im unsure how to send a download link to you though ><
Try uploading it to mediafire. You’ll get a distributable link afterwards.
Hay there!
You made a great Job!
I just want to say, that your Info is a bit confusing, thanks to the video and the Demo it is easy to understand!
But maybe it would be helpful, if you would explain the script calls too.
For a newbie like me, i need some time to figure out how to get more than 1 item with the script call : ” GardenRa::Harvest_Crop.call(2, self, true) ”
For the ones, who want to make more items, just set in the scipt call true to false
Like this :
GardenRa::Harvest_Crop.call(1, self, false)
GardenRa::Harvest_Crop.call(2, self, false)
GardenRa::Harvest_Crop.call(3, self, true)
So that the last call can Crop the Plant.
And, Thanks for this amazing script!
I have Khas’ Pixel Movement which makes it so that you can’t walk out of the plant when you plant it. Will there be a potential fix or will I have to try and find a way around it myself?
If you hold down the “shift” key when planting you will plant the seed in front of you. That is probably the simplest and fastest solution.
I use falcao pearl abs system and I wanted to know if it’s possible to put the seeds and other tools onto his quickbar and working properly.
Hmm yes I like that script too, compatibility would be nice. I will seriously consider doing this if I ever spend more time working with pearl abs.
Hi, i have a script Error “Full Script” Line 893 RegexpError
Target of repeat operator is not specified: /^Ataque(+) (\d+)\s*$/i
Any idea? :s
Have you been able to resolve this? It sounds like an installation issue.
I am encountering a game crashing error in my project, so I set out to try and recreate it in the demo and I was successful. I sometimes get game crashing errors on planting/screen loading events, particularly if I’ve planted something someplace ‘weird,’ like on the little bridge. Eggplants planted on the bridge won’t give the harvesting pop, and I can usually guarantee a game crash afterwards if I just plant a few tomatoes.
It doesn’t occur every time in the demo (it’s occurring every time in my project, and I’m looking into possible additional script conflicts. I’ve isolated one that had to do with terrain tag use) but it happens in the regular Eshra Gardening Demo pretty regularly if you plunk plants down in the grass or on the bridge.
No error message, just a flat out engine crash and shut down.
For the first issue, the text doesn’t show up because it’s being drawn off-screen I should fix this yes.
I am curious what is causing the 2nd problem but I cannot reproduce it:







I’ve tried multiple machines running rpg maker as well with no crashes. I’m to the point where I’m confidant it is not an issue with any of the code in the script.
It may have to do with the specific computer you’re using. Is it an older/slower machine? I believe spamming Events on the map with an event generator in general can cause rpg maker to crash. Does the script still crash if you only place the events (plant the seeds) slowly, for example pausing for 3 seconds before planting the next one?
Although this post is very old this reply is being posted in case anyone else is having a similar problem.
The game client was crashing due to graphical objects not being disposed properly. This has been fixed in the most recent version of the demo (v0.70).