Update 5/23/2019 -
Farming is complete! It was honestly one of the more enjoyable skills I have made so far.
The farming tick occurs every 5 minutes, even when logged out. The way I did this was tracking the time that the player logs out.
This way, when the player logs in, I can then subtract the log out time from the current time, then divide by 300,000. The resulting
number, unless 0, creates a while loop to process every patch until the number is 0.
Every 5 minute farming tick:
If a patch is empty with nothing planted and no weeds it will regrow a weed.
If the patch is a Fruit Tree, Bush, Calquat or Cactus and it is not the max value of fruit, every farming tick it will
increase a count by 1. When the counter reaches 4 (20 Minutes have passed) it will regrow one of its fruit/berries.
If a tree is a stump it will regrow.
Watered seedlings in your bank and inventory will turn into saplings.
Most of the patches in the game are working:
4 Tree Patches: Varrock, Lumbridge, Falador, Taverly, Gnome Stronghold
4 Herb/Allotment/Flower Patches: Falador, Catherby, Ardy, Canifis
Trollheim Herb Patch
5 Fruit Tree Patches: Catherby, Tree Gnome Village, Gnome Stronghold, Brimhaven, Lletya
4 Bush Patches: Rimmington, Varrock, Ardy, Etecerica
4 Hop Patches: McGrubor's Wood, Yanille, Lumbridge, Entrana
3 Spirit Tree Patches - Port Sarim, Brimhaven, Etecerica
Calquat Patch: Tai Bwo Wannai
Cactus Patch: Alkarid
Belladona Patch: Draynor Maynor
Mushroom Patch: Canifis
There are some that I left out but when I make the content/quest they are located at I will add them in.
Every patch has a Leprechaun and all of the Farmers are in the correct location.
If a patch has a farmer you can pay them to protect your patch from disease. I properly identified all of the payments. Allotment
patches must be paid for seperately, one payment won't protect both.
The Leprechaun tool storage interface is working properly. You can store 1 of each tool (Watering Can, Rake, Seed Dibber, Spade, Sec), up
to 4 Scarecrows, 30 buckets, and 250 Compost and Supercompost.
You can also use any farming produce on a Leprechaun, in addition to weeds, to note them. If the item used is not a produce or doesn't
have a noted form it will not work.
All of the varbit values for growth, harvest (if applicable), diseased, and dead plant stages are properly identified.
Every time a crop completes a stage, provided it is not in its first stage or protected by the farmer, there is a chance it will
get diseased and not advance a stage. If it is still diseased the next time it reaches this point, it will die. Only a few chances
have been released by jagex, which were 17/128 for all fruit trees, 26/128 for all herbs, 8/128 for Magic trees and 12/128 for
Maple Trees. I made an educated guess for the rest based on this information.
If a patch is dead then you can clear it with a spade.
You can cure the patch of disease by using a plant cure on it. If it is a tree or bush you must use secateurs to prune off the dead
leaves. Alternatively, you can use the Cure Plant spell in the Lunar spellbook.
The chance of disease can be reduced by treating the patch with Compost or Supercompost. Compost will reduce it by 1/5 while
Supercompost will reduce it by 1/2. For herbs that have a yield amount such as herbs, Compost will increase the yield by 1 and
Supercompost will increase it by 2.
You can treat a patch with supercompost by using the Fertile Soil spell in the Lunar spellbook.
You can make either of these by using a compost bin, located at each allotment patch. The patch can be filled by using compostable
items on it. Most yield items are compostable, however few are strong enough to make Supercompost. You can use an item on a farmer
and they will tell you if the item is used to make Compost or Supercompost. To make Supercompost, the bin must be filled with only
Supercompost items. If it is not, it will make Compost instead. Using a Compost item on a bin full of Supercompost items only will
give you a warning message. Once the bin is full of 15 items, it can be closed. After an hour the bin will be openable and then you
can fill 15 buckets of Compost/Supercompost.
Each patch is harvestable in some form. Some have a set amount you can pick, such as Cacti, Fruit Trees, Calquat and Bushes. For Limpwurt
and Belladona, you have a chance of 3 + a random number generated from 10% of your farming level. Other flowers give you one. For Herbs
Allotments and Hops, there is a life mechanic. According to Mod Ash, for Herbs you start with 3 lives. You gain an additional life if
the patch was treated with compost and two lives if it was treated with supercompost. Each time you harvest the patch, if you roll at
or below the chance to save a life, you will not lose a life. When the patch is out of lives the patch becomes empty.
The formula was calculated on the wiki as:
chance = ((lifeData.getBaseChance() * (99 - level)) / 98) + ((80 * (level - 1)) / 98);
The formula for allotments and hops is unknown so I just guessed.
It is also possible to plant seeds in plant pots and water them.
You can monitor your patches with the Remote farm spell. This spell is normally unlocked with Livid farm, but I will just make it
available with dream mentor because FUCK livid farm. It properly displays all of the patch names with the status of the patch.
If it is diseased it will appear in red and allow you to cure that patch at no cost.
I also replaced 4 of the patches at the bottom which I will probably never make. In their place I put the status of the Compost Bins.
This way you can see if they are Full, Empty or still Rotting.
So that's farming. Took me about 2 weeks to complete which is shorter than I expected honestly. Not all of the stuff is accurate because
either I felt the way Jagex did it was not optimal or I just didn't know the information and had to guess.
In the next week or so I am going to try to get Smithing, Mining and Woodcutting done. I only have those 3 skills + Theiving, Agility
and Hunter left then I will have reached my goal. I am getting sick of skills, but I want to finish them to the most accurate and detailed
they can be.
I have been missing adding in new content like quests and bosses, but once I finish all of the skills I have to go back and fix/redo
content that I made while I was very new to programming/content that I made just before I started my own base back in November.
Content I need to fix/redo/add to my new base:
Fishing Contest
Restless Ghost
Nature Spirit
Creature of Fenkenstrain
Mage Arena
Grand Tree
Barcrawl
Search of the Myreque (Dialogue Only)
Tormented Demons
Zaros Godwars Area
Nex (I want to rewrite her completely)
Waterbirth Dungeon (Mostly just spawns but I need to figure out Spinolyps so that they can only walk on water)
Barrows (Mostly just convert some stuff)
I also need to fix Prayer a little bit
Content I am looking forward to making in the near future:
Regecide
Roving Elves
Spirit of Summer
Summer's End
Glacors
Fight Cave
Some Farming Media: