Installation

2 min readUpdated 2 weeks ago

Overview

ML Planting lets players plant seeds, water and fertilize them, and harvest the results. Plant types, categories, growth zones and ground rules are built in an in-game admin panel and saved in the database.

Quick Start

  1. Download from CFX Portal
  2. Extract to your resources folder as ml_planting
  3. Add to server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_planting
Load Order

ml_planting must start AFTER ml_bridge. Optional resources such as ML Inventory, ml_skills and ml_battlepass start before it.

Database

Tables are created on first start:

  • ml_planting_plants: planted plants with position, water, fertilizer, health and growth
  • ml_planting_types: plant types with stages, harvest, water and fertilizer settings
  • ml_planting_categories: categories and their shared defaults
  • ml_planting_zones: growth zones with multipliers, seed lists and blips
  • ml_planting_bp_runs, ml_planting_bp_outbox, ml_planting_bp_cache, ml_planting_bp_sources, ml_planting_bp_guard: battlepass progress queue, created by the ML Bridge module and only filled when ml_battlepass runs

Item Registration

The example plants use the items in _INSTALL/items.lua. Copy them into your inventory so the starter plants work:

  • watering_can, fertilizer: care tools
  • weed_seed, coca_seed: seeds. Using a seed starts the placement
  • weed_branch, coca_leaf: harvest results

Rename, reprice or replace them from the admin panel. With Config.SeedDefaultPlants = false the panel starts with no plant types and you register only your own items.

Verify

The console prints the version banner and:

cfg
1[ml_planting] Ready! Loaded 0 plants in 0 chunks, 1 zones

Open the admin panel with /plantadmin.

  • /plantadmin does nothing: the player needs admin permission from the framework or ACE. Admin groups are set in ml_bridge.
  • Seed does nothing: the seed item must be registered and set on a plant type.
  • Cannot place a plant: check Config.OnlyAllowedGrounds, the surface list of the plant type, PlantDistance and the player limit.
  • Plant not visible: check the prop model of each growth stage and Config.StreamRadius.
  • Growth stuck: at 0 water a plant stops growing. Water it and growth goes on from the elapsed time.