Configuration
This page contains all information you need to configure gfg_plants, if you have any questions feel free to reach out to us on our discord.
Config
language
Language sets which Locale to use, you can find available locales in [gfg_plants/locale/], we will add more as they become available but feel free to add your own.
debug
Debug should only used in a development environment
Determines whether to send debug print statements to the client and server when using the script
enhancedDebug
Enhanced Debug should only used in a development environment
Determines whether to send enhanced debug print statements to the client and server when using the script
interactionMethod
Determines the method in which players interact with a plant. Currently supported options are: "target", "textui", "3dtext".
interactionDistance
Determines the distance from the plant that the interaction is activated.
target
Determines wich target resource to use.
Currently supported options are"
"ox_target"
"qb_target"
inventory
Setting inventory to "custom" will utilize the function in server/sv_customize.lua
Determines wich inventory resource to use.
Currently supported options are:
"ox_inventory"
"qb_inventory"
"custom"
targetWaitTime
1000 is default but if you experience high resource usage you may need to increase this.
Determines how often the client checks for nearby plants to create a target for.
In Milliseconds
canPlacePlantInWater
Your housing script may place certain shells under the map, in those cases the shell may be registered as "Underwater" if this is the case you may need to set this to false.
Determines if the player can place a plant while in or under water.
canPlacePlantOnRoad
May or may not work on all roads.
Determines if the player can place a plant on a road
Config.Plant
placementKeys
Determines the keys used when placing a plant
place
= This key is used to place the plant (Default: Space)
cancel
= This key is used to cancel placement (Default: G)
rotateRight
= This key is used to rotate the plant right (Default: Arrow Right)
rotateLeft
= This key is used to rotate the plant right (Default: Arrow Left)
rotateSpeed
= This Determines the speed that the plant is rotated.
Config.Plants
This is the configuration section for each type of plant.
Any values related to health, water, or weed level can accept floats (number with a decimal place). However the more decimal places the float has, the higher the likelihood that issues could arise. We recommend to never go more than 2 decimal places (1.25).
name
Determines the plants "Name" when opening the menu (i.e. "Weed Plant 1"), Can be whatever you choose and does not have to be unique.
type
type needs to be unique, two or more plants CANNOT share the same type.
The plant type, usually set to a lowercase version of the name.
seedItem
multiple plants CANNOT share the same seed item.
The inventory item that represents this plant type.
deadPlantItem
The dead plant item that the player receives when they remove a dead or not fully grown plant.
zone
Determines the zones this plant can be planted in.
enable
= If set to true, this plant can only be planted within the zones defined below, if false, can be planted anywhere.
zones
= The names of the zones this plant can be planted in, zone names are defined in 'Config.Zones'.
animation
Animation that plays when interacting with the plant, a list of available animations can be found here (https://alexguirre.github.io/animations-list/).
dict
= Dictionary that is used to determine the animation from the list given above. This would be the bigger text in the above link.
anim
= Animation that is used within the dictionary determined from the list given above. This would be the smaller text in the above link.
plantSkillCheck
Skill check triggered when a player attempts to plant.
enable
= Determines whether the skill check will be used or not.
difficulty
= Determines the difficulty of the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
keys
= Determines the keys used during the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
returnSeedOnFail
= If 'true' the player gets the seedItem back if they fail the skill check. If 'false' they lose the seedItem if they fail the skill check.
plantProgressBar
Progress Bar that is used when the player is planting.
enable
= if 'true' the progress bar will play while the plant is being planted.
time
= Determines the time it takes for the progress bar to complete (in milliseconds).
harvestSkillCheck
If you plan on setting healthLostOnFail.enable
to true
, then stillHarvestOnFail
needs to be set to 'false'
Skill check triggered when a player attempts to harvest.
enable
= Determines whether the skill check will be used or not.
difficulty
= Determines the difficulty of the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
keys
= Determines the keys used during the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
stillHarvestOnFail
= If 'true' the player will still harvest the plant if they fail the skill check. If 'false' the plant stays the same.
healthLostOnFail
= The plant loses a random amount of health when the player fails the harvest skillcheck.
enable
= if 'true' the plant loses health when they fail the skillcheck.
amountMin
= Determines the minimum amount of health the plant will lose.
amountMax
= Determines the maximum amount of health the plant will lose.
harvestProgressBar
Progress Bar that is used when the player is harvesting.
enable
= if 'true' the progress bar will play while the plant is being harvested.
time
= Determines the time it takes for the progress bar to complete (in milliseconds).
growth
One prop in props.growthlevel
must have a growth level of 0. This is the level that shows the the player first plants the plant.
For best practice there should be a growthLevel prop for the level that the plant can be harvested at.
All config options related to plant growth.
time
= Determines how long it takes for a plant to fully grow (in minutes, minimum is 1).
canHarvestAt
= Determines the growth level at which the plant can be harvested.
rewards
= Determines what the player gets when the plant is finished growing and they harvest it. Can be multiple items (can used for byproducts from production). Will randomly give the player an amount between theminAmount
andmaxAmount
.
name
= the item name within your inventory system.
minAmount
= the minimum amount of that item the player receives.
maxAmount
= the maximum amount of that item the player receives.
props
= Determines the props the plant uses when at different stages of growth
growthLevel
= The level of growth this prop is used at. Should be between 0-100.
prop
= The prop the plant uses when it hits the defined growth level.
ambientWaterDecay
Determines the amount of water the plant loses as time goes on.
enable
= if 'true' the plant loses water level over time.
min
= Determines the minimum amount water the plant loses every tick (1 minute).
max
= Determines the maximum amount water the plant loses every tick (1 minute).
removePlantWhen0
= Determines if the plant gets removed when the water level hits 0.
watering
Determines the options the player can use to water this plant.
label
= Determines the name of the item in the menu.
itemName
= The item name the player needs when attempting to water the plant with this option.
minAmount
= Determines the minimum amount of water this option applies to the plant.
maxAmount
= Determines the maximum amount of water this option applies to the plant.
time
= Determines how long the progress bar takes when using this option.
remove
= If set to 'true' this item is removed when the player choses this option.
icon
= Determines the icon used in the menu, you can find more icons here (https://fontawesome.com/search?m=free&o=r).
wateringParticleEffects
Particle effects the plant produces while being watered.
enable
= If set to 'true' enables the particle effect.
dict
= Determines the particle effect dictionary, A list of available dicts and anims can be found here (https://vespura.com/fivem/particle-list/).
anim
= Determines the effect to be played, A list of available dicts and anims can be found here (https://vespura.com/fivem/particle-list/).
scale
= Determines the effect scale.
offset
= Determines the where to play the effect relative to the plant.
alpha
= Determines the alpha of the effect (transparency).
ambientWeedGrowth
Determines the amount of weeds the plant gains as time goes on.
enable
= if 'true' the plant gains weeds level over time.
min
= Determines the minimum amount weeds the plant gains every tick (1 minute).
max
= Determines the maximum amount weeds the plant gains every tick (1 minute).
removePlantWhen100
= Determines if the plant gets removed when the weed level hits 100.
weeding
Determines the options the player can use to remove weeds from this plant.
label
= Determines the name of the item in the menu.
itemName
= The item name the player needs when attempting to weed the plant with this option.
minAmount
= Determines the minimum amount of weeds this option removes to the plant.
maxAmount
= Determines the maximum amount of weeds this option removes to the plant.
time
= Determines how long the progress bar takes when using this option.
remove
= If set to 'true' this item is removed when the player choses this option.
icon
= Determines the icon used in the menu, you can find more icons here (https://fontawesome.com/search?m=free&o=r).
weedingParticleEffects
Particle effects the plant produces while weeds are being removed.
enable
= If set to 'true' enables the particle effect.
dict
= Determines the particle effect dictionary, A list of available dicts and anims can be found here (https://vespura.com/fivem/particle-list/).
anim
= Determines the effect to be played, A list of available dicts and anims can be found here (https://vespura.com/fivem/particle-list/).
scale
= Determines the effect scale.
offset
= Determines the where to play the effect relative to the plant.
alpha
= Determines the alpha of the effect (transparency).
health
Options for this plant related to it's health.
lowWaterHealthDecay
enable
= If set to 'true' the plant loses health when the water level is at or below the defined amount.
waterValue
= Determines the water level needed for the plant to start losing health.
amountMin
= Determines the minimum amount of health the plant will lose every tick (1 minute).
amountMax
= Determines the minimum amount of health the plant will lose every tick (1 minute).
highWeedHealthDecay
enable
= If set to 'true' the plant loses health when the weed level is at or above the defined amount.
weedValue
= Determines the weed level needed for the plant to start losing health.
amountMin
= Determines the minimum amount of health the plant will lose every tick (1 minute).
amountMax
= Determines the maximum amount of health the plant will lose every tick (1 minute).
goodStatusHealthRise
enable
= If set to 'true' the plant gains health when the water and weed levels are at or above their defined amounts.
waterValue
= Determines the water level needed for the plant to start gaining health.
weedValue
= Determines the weed level needed for the plant to start gaining health.
amountMin
= Determines the minimum amount of health the plant will gain every tick (1 minute).
amountMax
= Determines the maximum amount of health the plant will gain every tick (1 minute).
removePlantWhen0
= If set to 'true' the plant will be removed when it's health reaches 0.
Config.Zones
Config.Zones
Only poly zones can be used for the growing zones, for more information, see here (https://overextended.github.io/docs/ox_lib/Zones/Client#libzonespoly).
Enabling debug for zones may result in high resource usage.
debugAllZones
If set to 'true' all zones will have the debug markers.
zones
We recommend using the zone creation tool built into ox_lib, more information can be found here (https://overextended.github.io/docs/ox_lib/Zones/Client#zone-creation-script).
Determines the zones
name
= Determines the name of the zone, this is what should be used when telling where a plant can be planted.
debug
= If set to 'true' markers will be drawn at the boundary of this zone
points
= Determines the outline points of the zone.
thickness
= Determines the height of the zone.
Last updated