🌱Plants

All growth related configurations have significant impacts on the plant growth system. Making any changes to the growth system requires thorough testing and debugging. We strongly recommend any changes are made carefully and methodically as any changes can have unintended consequences.

Now we can look at the configuration of the individual plants.

Allowed Grounds

Config.OnlyAllowedGrounds

Config.OnlyAllowedGrounds is used to set whether a plant may only be planted on permitted grounds. If Config.OnlyAllowedGrounds is set to true, the player can only plant on grounds set in Config.AllowedGrounds

Config.AllowedGrounds

A list of ground hashes, if a desired ground is not included, the ground hash can be displayed when planting if Config.Debug is true, this can then simply be added to the list.


Decay

The decay settings can be used to set how many percent of water or fertilizer a plant should lose per minute.


Threshold

The threshold value is the percentage value at which a plant begins to lose life. As soon as the values of the plant are below Config.FertilizerThreshold or Config.WaterThreshold, the plant starts to lose life.

The rate at which the plant should lose life can be set with Config.HealthBaseDecay. The first value is the minimum and the second value is the maximum. A value between these two values is determined every minute. The plant loses this value of life.


Config.Items

['liquid_fertilizer'] = {
        water = 15,
        fertilizer = 15,
        itemBack = nil,
    },

You can always set 3 values for each item. water this value determines the percentage of water this item adds to the plant. fertilizer this value determines the percentage of fertilizer this item adds to the plant. itemBack here you can specify another item that the player should get back after using the item.


Config.PlantTypes

Here you can set the items that can be used to fertilize and/or water the plant.

["plant1"] = {
        [1] = {"bkr_prop_weed_01_small_01a", -0.5},
        [2] = {"bkr_prop_weed_med_01a", -0.5},
        [3] = {"bkr_prop_weed_lrg_01a", -0.5},
    },
["plant1"]

This is the unique name of the plant type. The name must not contain any special characters or spaces.

This will be used later to give a plant a type.


[1] = {"bkr_prop_weed_01_small_01a", -0.5},
[2] = {"bkr_prop_weed_med_01a", -0.5},
[3] = {"bkr_prop_weed_lrg_01a", -0.5},

Each plant type consists of three sizes. A separate prop can be set for each size. A value can also be added for each prop. This value is then subtracted from or added to the z-coordinate of the plant.

[stage] = {"prop", z-value},

Config.Plants

['weed_lemonhaze_seed'] = {
        growthTime = 45, -- Cutsom growth time in minutes false if you want to use the global growth time
        label = 'Lemon Haze', --
        plantType = 'plant1', -- Choose plant types from (plant1, plant2, small_plant)
        products = { -- Item the plant is going to produce when harvested with the max amount
            ['weed_lemonhaze'] = {min = 1, max = 4},  
            --['other_item'] = {min = 1, max = 2}
        },
        seed = {
            chance = 50, -- Percent of getting back the seed
            min = 1, -- Min amount of seeds
            max = 2 -- Max amount of seeds
        },
        time = 3000 -- Time it takes to plant/harvest in miliseconds
    },

Last updated