Farming System #
The farming system has many functionalities, including different growing stages and regrowing options.
Growing Stages #
The system works with different growing stages. 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 #
There are multiple regrowing options:
- Regrow Yield after harvest
- Regrow time
- Regrow resets to a specific stage
If true, the plant regrows from a specific stage. If false, it resets 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 connected to an inventory item. There is also an option to require a tool before harvesting.
Whole Plant Yield #
The plant yield harvests the complete plant at once.
Pluckable Yield #
The pluckable yield is for plants like berries or apples, harvested per item and set to harvested state when all yield is plucked.
Crop Quality #
Crop quality is defined in Bronze, Silver, and Gold. Fertilizer increases the crop quality chance. The factor can be used to modify different stats of the crops such as durability and food.
Durability #
Durability includes decay and health. Variables affected:
- Automatically destroyed after harvest
- Only destroys if the complete yield is harvested
- Decay after reaching maturity
- Timer
- When decayed, plant must be manually removed
- Remove by applying damage or using a tool
- Can be destroyed (can take damage)
- If health is zero, destroy
The decay timer sets the plant to decayed state or destroys it automatically. The health bar allows the plant to be damaged and destroyed when health reaches zero.
Requirements #
For the plant to grow, different factors can be required:
- If requirements are not met, pause the growing rate
- Maximum days to allow requirements not to be met before dying
Requirements for Growing #
- Requires Oxygen to grow
- Oxygen Consumption Rate
- Requires Fertilizer to grow
- Fertilizer consumption rate
- Fertilizer storage rate (maybe in the growing plot itself)
- Requires Water to Grow
- Water consumption rate
- Water storage rate after one fill (maybe in the growing plot itself)
- Requires UV to grow
- Requires Tilled Soil
Requirements for Regrowing #
- Requires water to regrow
- Requires fertilizer to regrow
- Requires oxygen to regrow
- Requires UV to regrow
The UV check performs a line trace upwards. If it finds something, the UV is blocked. If what was found has a tag: “UV_Lamp,” it fulfills the requirement!
Seasons #
Plants are dependent on seasons. You can limit growth to specific seasons or set plants to decay in certain seasons:
- Spring
- Summer
- Autumn
- Winter
Plants do not grow if not in the correct season and may decay if out of season.
Sickness #
Plants require care. You can define a global system of infection and sickness to randomly set plants to a sickness state. All the sickness state logic is implemented, allowing you to customize further.
Sprinkler #
The system includes a sprinkler that automatically waters crops in its vicinity. You can turn it on or off by pressing interact (E).
Data Table Driven #
The farming system is completely data table driven. An Excel file is provided for easy data changes, with all the common examples already populated.