Farming System #
The farming system has many functionalities. We will go through the main ones on an abstract level.
Growing #
This system works with different growing stages. You can add new stages and set the growing threshold to be met to make sure it goes to the next stage.
In general, I would advise to set the stages like this:
-
- Stage 1 – Seeds
- Stage 2 – Small Plant
- Stage 3 – Medium plant
- Stage 4 – Large plant
- Harvest state (Stage 4 + Yield)
- Harvested state (Stage 4)
- Decayed mesh – Small plant which looks dead.

Regrow #
It also has multiple regrowing options.
- Regrow Yield after harvest
- Regrow time
- Regrow resets to specific stage
- If this is true, you can make sure to let it grow back again from e.g. stage 1.
- If it is false, it will reset to the second last stage to regrow the yield.
Harvest #
There are two harvest types, plant yield (Complete plant) and pluckable yield.
The item to spawn as yield can be used to connect an inventory item. For now it is kept empty.
There is also an option to require a tool before being able to harvest. You can connect an inventory item here.
Whole plant Yield
The plant yield makes sure to harvest the complete plant at once.

Pluckable Yield
The pluckable yield is more for plants to pluck berries or apples. So this is done per item and is only set to harvested state when all yield is plucked.

Crop Quality #
The system defines crop quality. The reason to implement this is to make sure people have incentive to take good care of their crops.
The quality is defined in Bronze, Silver, and gold. Make sure that the chances together are 1.
Currently the system is implemented that is fertilizer is added, the crop quality chance goes up.
The “factor” can be used to multiple different stats of the crops such as durability/food/etc.

Durability #
The durability system is two-sided.
- Decay
- Health
The following variables are affected:
-
- Is automatically destroyed after harvest (Boolean)
- Only destroys if complete yield is harvested
- Decay after reached maturity (Boolean)
- Timer
- When decayed plant must be manually removed (When decayed, plant is automaticly destroyed)
- Remove by apply damage or use a tool
- Can be Destroyed
- (can take damage)
- Health
- If zero, destroy
- Is automatically destroyed after harvest (Boolean)

I’ve implemented a decay timer so when it is reached, the plant is set to decayed state, or is destroyed automatically.
But I also implemented a health bar, so you can damage the plant and when it has zero health, it is destroyed.
Requirements #
For the plant to grow, you can require different factors. We have multiple options to change:
-
- If requirement not met, then pause growing rate
- Maximum days to allow requirements not to be met before die
- Requirements growing:
- Requires Oxygen to grow (Boolean)
- Oxygen Consumption Rate
- Requires Fertilizer to grow
- Fertilizer consumption rate
- Fertilizer storage rate (Maybe in growing plot itself)
- Requires Water to Grow
- Water consumption rate
- Water storage rate after one fill (for instance with the watering can) (Maybe in growin plot itself)
- Requires UV to grow
- Requires Tilled Soil
- Requires Oxygen to grow (Boolean)
- Requirements regrowing:
- Requires water to regrow
- Requires fertilizer to regrow
- Requires oxygen to regrow
- Requires UV to regrow

The UV check does a linetrace upwards. If it is able to find something the UV is blocked. If what was found has a tag: “UV_Lamp” it fulfills the requirement!
Seasons #
Plants are obviously depended on seasons! That is why you can limit the growth only in a couple of seasons. You can also choose to even decay plants in seasons so it will die in the winter.
-
- Only able to grow in these seasons
- Seasons
- Spring
- Summer
- Autumn
- Winter
- Simply doesn’t grow when not in the correct season.
- Decay when not in season (Boolean)
- Survives all seasons (Boolean)
- Seasons
- Only able to grow in these seasons

Sickness #
Plants require care. You can define a global system of infection and sickness to randomly choose plants to set the state to sickness. This is not implemented since I think that should be really your choice. But to make it easy I have implemented all the sickness state logic.
Maybe you even want a specific item to be used to cure the plant?

Sprinkler #
The system includes a sprinkler which automatically waters your crops in the vicinity. You can turn it on or off by pressing interact (E).

Data Table Driven #
The farming system is completely data table driven. You could edit the data in an excel which you can use to change data easily. Please take a good look at all the different variables which determines a big part of the functionality. I’ve already populated the datatable for you with the most common examples.

