Configuration
Overview
shared/config.lua: language, theme, limits, growth, ground rules, streaming, plant panel, skills, battlepass and logsshared/zones.lua: growth zones with multipliers and blipsshared/data/props.lua: prop models offered in the plant editorserver/config_server.lua: Discord webhooks
Plant types, categories, seed items and growth settings live in the database and are edited from the admin panel.
General
1Config.Language = 'en'
2Config.Debug = false
3Config.Theme = 'default'
4Config.AdminCommand = 'plantadmin'
5Config.Admin.MinimizeKey = 'F9'
6Config.GlobalGrowTime = 30
7Config.SeedDefaultPlants = trueLanguage: language file loaded from thelocales/folderDebug: prints extra console outputTheme: theme of the plant panels in the world.'default','wasteland','cyberpunk','noir'or'fantasy'AdminCommand: opens the admin panel. Admin permission requiredMinimizeKey: hides and restores the admin panel. F1 to F12, or a single letter or digitGlobalGrowTime: base grow time in minutes. Each plant type can set its ownSeedDefaultPlants: on the first start, fills the panel with example plants (cannabis and coca). They never come back once any plant type exists.falsestarts with the default categories only
UI Theme
1Config.UITheme = {
2 preset = nil,
3 colors = {
4 primary = nil,
5 accent = nil,
6 background = nil,
7 surface = nil,
8 text = nil,
9 },
10}preset: theme preset of the admin panel.nilfollows the shared theme set inml_bridgecolors: CSS hex values for single colors. Anynilvalue follows the shared theme
Limits and Placement
1Config.PlayerPlantLimit = 10
2Config.PlantLimitOverrides = {}
3Config.PlantDistance = 1.5
4Config.PlantDistanceOverrides = {}
5Config.RayCastDistance = 7.0
6Config.DefaultSharedInteraction = truePlayerPlantLimit: plants one player can have at oncePlantLimitOverrides: a lower limit per seed item, such as['weed_seed'] = 4.PlayerPlantLimitis checked first, so an override cannot raise it. A limit set on the plant type or its category in the panel wins over this tablePlantDistance: smallest distance in meters between two plantsPlantDistanceOverrides: a wider spacing per seed item, such as['weed_seed'] = 2.0. The server always checksPlantDistanceas well, so a value below it has no effectRayCastDistance: how far from the player a plant can be placed. The server checks the same distanceDefaultSharedInteraction: used when a plant type or category has no rule of its own.truelets any nearby player water and harvest,falseonly the owner and admins
Growth
1Config.HealthBaseDecay = { 7, 10 }
2Config.WaterDecay = 1.0
3Config.FertilizerDecay = 0.7
4Config.WaterThreshold = 10
5Config.FireTime = 5000
6Config.DeadPlantTimeout = 10HealthBaseDecay: health lost per minute while water is at or belowWaterThreshold, a random value between the two numbersWaterDecay: water lost per minute. It runs on real time, so plants dry out while the server is down tooFertilizerDecay: fertilizer lost per minute. Only the part above 50 speeds growth upWaterThreshold: water level at or below which the plant loses health. At 0 the damage doubles and growth stopsFireTime: milliseconds of the fire when a plant is burnedDeadPlantTimeout: minutes before a dead plant is removed.0removes it at once
Ground Rules
1Config.OnlyAllowedGrounds = false
2Config.AllowedGrounds = {
3 1333033863,
4 -1885547121,
5 -700658213,
6}OnlyAllowedGrounds:trueallows planting only on the surfaces inAllowedGroundsAllowedGrounds: ground material hashes. The shipped list covers grass, bushes, sand, dirt, gravel, mud, soil, clay, leaves, woodchips and marshConfig.GroundMaterials: names and hashes of the materials offered in the editor
Plant types and categories can carry their own surface list in the admin panel, which wins over the global rule.
Streaming
1Config.ChunkSize = 100.0
2Config.StreamRadius = 150.0
3Config.StreamOutRadius = 200.0
4Config.MaxPropsPerFrame = 3
5Config.PlantInteractionRadius = 1.0ChunkSize: size in meters of the map chunks plants are grouped inStreamRadius: plants within this distance are loaded for the playerStreamOutRadius: plants beyond this distance are removed. Keep it larger thanStreamRadiusMaxPropsPerFrame: plant props spawned per frame while loadingPlantInteractionRadius: radius of the interaction zone of each plant
Plant Panel
A panel drawn in the world on the plants: a small badge on the plants around the player, and a full readout with keys on the closest one. It is off by default. When on, it replaces the target option with keys.
1Config.PlantPanel = {
2 Enabled = false,
3 Style = 'minimal',
4 MiniDistance = 25.0,
5 FullDistance = 3.0,
6 MaxMiniSurfaces = 6,
7 OcclusionCheck = true,
8 RefreshMs = 3000,
9 MiniScale = 0.045,
10 FullScale = 0.14,
11 HeightOffset = 0.7,
12 DestroyHoldMs = 1500,
13 Keys = {
14 Water = { control = 38, label = 'E', also = { 51 } },
15 Fertilize = { control = 47, label = 'G' },
16 Harvest = { control = 74, label = 'H' },
17 CycleItem = { control = 73, label = 'X' },
18 Destroy = { control = 45, label = 'R', also = { 140, 263 } },
19 },
20}Enabled:truereplaces the target option with the panel and its keysStyle:'minimal'is white and transparent,'themed'usesConfig.ThemeMiniDistance: meters at which the badge appearsFullDistance: meters at which the closest plant shows the full panelMaxMiniSurfaces: plants that can show a badge at once, closest firstOcclusionCheck: hides the panel of plants behind walls or terrainRefreshMs: milliseconds between two updates of water and growthMiniScale,FullScale: width of the badge and the panel as a share of the screen. Larger values blur the textHeightOffset: height above the base of the plant. It stays the same at every growth stageDestroyHoldMs: milliseconds the destroy key must be heldKeys:controlis the FiveM control ID,labelthe key shown on the panel.alsolists other controls bound to the same key, which are blocked while the panel is up. Change both when you rebind an action
Skills
1Config.ExternalSkills = {
2 Enabled = true,
3 Resource = 'ml_skills',
4 XpMultiplier = 1.0,
5 MaxXpPerHarvest = 500,
6}Enabled:falseignores every skill requirement and gives no XPResource: name of the skills resourceXpMultiplier: multiplier on every XP rewardMaxXpPerHarvest: highest XP of one award after the multipliers, for planting, watering, fertilizing and harvesting alike.0for no limit
Requirements and XP are set in the plant editor under Skill Integration, with one tab each for Plant, Water, Fertilize and Harvest. Each tab has a required skill and minimum level, and an XP reward with its skill or category. Harvest XP grows with the plant health and the zone yield. Categories carry the same block, and a plant type uses its category unless its own Override is on.
With ml_skills stopped or Enabled = false, every requirement passes and no XP is given. Plants never become unplantable because of it.
Battlepass
1Config.Battlepass = { Enabled = true }Enabled: withml_battlepassrunning, harvests advance battlepass objectives.falseturns it off. Withoutml_battlepassthis setting does nothing
Animations
1Config.AnimationsList = {
2 { label = 'Plant (Kneel)', anim = 'base', dict = 'amb@medic@standing@kneel@base' },
3}
4
5Config.CareAnimations = {
6 {
7 label = 'Watering can',
8 dict = 'missfbi3_waterboard', anim = 'waterboard_loop_player', flag = 1,
9 prop = 'prop_wateringcan', bone = 18905,
10 offset = { x = 0.19, y = -0.2, z = -0.11 }, rotation = { x = 257.5, y = -284.65, z = -18.5 },
11 },
12}AnimationsList: planting and harvest animations offered in the editorCareAnimations: watering and fertilizing animations offered in the editor.prop,bone,offsetandrotationattach a prop to the hand
Growth Zones
Zones make plants grow faster and yield more. Add them in shared/zones.lua or draw them in the admin panel. Zones in the file are written to the database on every start and replace a zone with the same ID. Zones made in the panel stay.
1Config.Zones = {
2 ['weed_zone_one'] = {
3 points = {
4 vec3(2031.0, 4853.0, 43.0),
5 vec3(2007.0, 4877.0, 43.0),
6 vec3(1981.0, 4903.0, 43.0),
7 },
8 thickness = 4.0,
9 growMultiplier = 2.0,
10 yieldMultiplier = 1.0,
11 allowlist = {},
12 blocklist = {},
13 plantLimitOverride = nil,
14 blip = {
15 display = true,
16 sprite = 469,
17 color = 2,
18 text = 'Cannabis Zone',
19 },
20 },
21}points,thickness: corners and height of the zonegrowMultiplier: growth speed inside the zone.2.0is twice as fastyieldMultiplier: multiplier on harvested amountsallowlist,blocklist: seeds allowed or refused in the zoneplantLimitOverride: highest number of plants in the zonehealthDecayMult,waterDecayMult,fertDecayMult: optional multipliers on health, water and fertilizer loss inside the zoneblip: map blip.display = falsehides it
Logs
1Config.Log = {
2 Plant = true,
3 Water = true,
4 Fertilize = true,
5 Harvest = true,
6 Destroy = true,
7 AdminDestroy = true,
8 Death = true,
9 AdminPanel = true,
10 AdminConfig = true,
11}- Each key turns one log on or off: planting, watering, fertilizing, harvests with the full reward list, a player burning their own plant, an admin destroying a plant, plants dying, an admin opening the panel, and admin edits of plant types, categories and zones
1ServerConfig.DiscordWebhook = {
2 Default = '',
3 Plant = '',
4 Water = '',
5 Fertilize = '',
6 Harvest = '',
7 Destroy = '',
8 Death = '',
9 AdminDestroy = '',
10 AdminPanel = '',
11 AdminConfig = '',
12 AntiExploit = '',
13}- Each key is the webhook of one action from
Config.Log.AntiExploitlogs failed server checks Default: used for every action whose own webhook is empty
Leave an action and Default both empty to skip that log.
Item Usage
The plant editor sets what happens to items in two places.
- Harvest tools work the same way on the harvest: Check Only, Consume or Degrade
- Required items are the tools needed to plant the seed. Each one is Check Only (must be carried, nothing taken), Consume (taken when the seed goes in) or Degrade (loses durability, with an option to remove it at zero)
- Water and fertilizer items each have a Consume item on use switch. On, the item is taken and an optional Return item is given back. Off, the item is only checked
Leave the switch off for a watering can or any tool players keep. Turn it on for a water bottle or a bag of fertilizer.