Configuration

Tree Generator config.lua: the editor command, target scripts, chopping time and hatchet, and switches for felling, hugging, logs and map blips.

On this page

All settings are in shared/config.lua.

Command

lua
command = "treezone",

The chat command that opens the editor. If you rename it, the ACE follows the new name: add_ace group.admin command.<name> allow.

Interactions (target)

lua
target = "auto",
ValueWhat happens
"auto"Uses ox_target, qb-target, qtarget or fivem-target, whichever is running. Without one, the built-in [E] menu
"ox_target", "qb-target", "qtarget", "fivem-target"Always use that one
"builtin"Always the built-in menu: look at a tree or log and press E
falseNo interactions; trees are decoration only

builtinTarget.maxDistance sets how close players must be for the built-in menu (default 4.0).

Features

lua
features = {
  fellTrees  = true,  -- players can chop trees down
  hugTrees   = true,  -- "Hug" option on trees
  spawnLogs  = true,  -- felled trees leave logs (false = the tree just disappears)
  pickUpLogs = true,  -- players can pick up and carry logs
  mapBlips   = false, -- a "Foliage" blip on the map for every zone
},

These switch features off for the whole server. You can also turn felling or hugging off per tree type in the biomes file.

Chopping

lua
chopping = {
  requireHatchet = false,
  minTime = 6000,
  maxTime = 10000,
},
  • requireHatchet = true: players need a WEAPON_HATCHET to fell a tree, as an ox_inventory item or a GTA weapon. Their own hatchet is never taken.
  • minTime / maxTime: chopping takes a random time between these (milliseconds). Players can cancel with X.

Other settings

SettingDefaultWhat it does
debugfalseDraws zone outlines and lists biome models that don't exist in the game (F8)
maxArea15000.0The largest zone allowed, in m²
waitTime1000How often (ms) the script checks which zones are near players
actionControlsControl indexes for the editor's close, add point and toggle keys

Texts are in shared/labels.lua.

Still stuck?Ask on our Discord