Plant reproduction

Reproduction is the process by which a plant produces additional copies of itself on the map. While it can happen to all plant types, it is relevant only for the plants that cannot be manually planted or have a limit to planting, specifically the Huge Ginkgo Tree, and Spirit Roots. 
== Requirements ==
Reproduction of a plant has a number of requirements that must be met before it can occurXiaWorld.PlantThing.OnStep:
* The plant must be fully grown and have matured fruit.
* The plant must have been at the matured fruit stage for at least 0.5*its base grow time in days. This is 112 days (56 days at matured stage) for a Spirit Root and 180 days (90 days at matured stage) for a Huge Ginkgo Tree. This timer runs at double speed during the Spring Season.
When the requirements are met, the timer resets and the plant attempts to reproduce. 
During an attempt, the plant performs the following actionsXiaWorld.PlantThing.DoReproduce. If any of these fails, reproduction does not occur. Whether or not reproduction occurs, the timer is reset.
* A chance roll, based on the reproduction chance base.map.Biomedef.PlantReproduce of a given map. This is 50% for all non-modded map types.
* The plant selects a random tile in a square centered on it, with a maximum distance of ReproduceRadius (15 for spirit roots and giant ginkgos). It then checks the following:
** The tile must be within the map area.
** The tile must be of an appropriate terrain type (water vs land).
** The tile must have a fertility greater than 0.
** The tile must have the tag requirements specified by the plant (not applicable for spirit roots or giant ginkgo)
** There must not be any living plants on the tile, although a building is permissible. 
***If there is a dead plant on the tile, reproduction proceeds and the dead plant is replaced by the new plant.
***For the purposes of Spirit Roots, despite the plant occupying 3x3 tiles, only the middle tile for the new plant is checked, and reproduction can happen directly adjacent to another Spirit Root. 
****This overlapping of plants may lead to one or more plants becoming unselectable. To harvest these plants, double-click on one of the plants that is selectable instead to harvest all visible plants in the area.
== Successful reproduction ==
If all the requirements have passed and reproduction successfully occurs, a new plant of the same species as the parent is created at the new tile. 
Since the process does not check for buildings, it is possible for the new plant to start growing under a building. The building(s) may need to be demolished in order to access the plant underneath it. 
== References ==
Category:Game Mechanics