F.A.Q

3 min readUpdated 2 weeks ago

Setup

Players with admin permission from the framework or ACE. The admin groups are set once in ml_bridge.

Open /plantadmin and add a plant type. Set the seed item, the prop of each growth stage, the grow time, water and fertilizer items and the harvest. Plant types, categories and zones are saved in the database.

Check the prop model of each stage in the admin panel, that you are within Config.StreamRadius, and that no ground rule is blocking the spot.

Growth

Plants grow over Config.GlobalGrowTime, or the grow time of their type. Water drops by Config.WaterDecay per minute. At or below Config.WaterThreshold the plant loses health, and at 0 water it stops growing. Fertilizer above 50 speeds growth up.

Yes. Growth and water loss run on real time, so a plant left dry while the server is down can die.

Plants in a zone grow at its growMultiplier and harvest more with its yieldMultiplier. A zone can also allow or refuse seeds and cap the plants inside. Set zones in shared/zones.lua or draw them in the admin panel.

Yes. Set Config.OnlyAllowedGrounds = true and list the ground hashes in Config.AllowedGrounds. Plant types and categories can also have their own surface list.

Config.PlayerPlantLimit is the cap per player. A plant type or category can set a lower cap in the panel, Config.PlantLimitOverrides sets a lower cap per seed, and a zone can cap the plants inside it.

Interaction

It depends on the plant type or category. Without a rule of its own, Config.DefaultSharedInteraction decides: true lets any nearby player water and harvest, false only the owner and admins.

Yes. Set Config.PlantPanel.Enabled = true. Plants then show a badge and a panel with keys for water, fertilize, harvest and destroy. The /plantmenu command opens the menu of the nearest plant within 3 meters in both modes.

Skills and Rewards

Yes, per action. Open the plant type, go to Skill Integration and pick Plant, Water, Fertilize or Harvest. Set a required skill, a minimum level or both. Set it on the category and every plant in it uses the same rules.

In the same section, per action. Pick the skill or category and the amount. Harvest XP grows with the plant health and the zone yield. The global multiplier and the cap per harvest are in Config.ExternalSkills.

Every requirement passes and no XP is given. Set Config.ExternalSkills.Enabled = false to turn the link off.

Yes, with ML Inventory running. The harvest editor offers a Clothing reward: a fixed piece, or a random piece from a series of drawables, with a photo of each model.

Battlepass

Yes, with ml_battlepass running. Harvests advance battlepass objectives. Set Config.Battlepass.Enabled = false in shared/config.lua to turn it off.

Updates

  1. Update ML Bridge first
  2. Download the latest version from CFX Portal
  3. Back up shared/config.lua, shared/zones.lua, server/config_server.lua, server/handlers.lua and client/handlers.lua
  4. Replace all files except those, then copy any new config lines from the changelog
  5. Restart the server

Plants, plant types, categories and zones are in the database and stay after an update.