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
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)
target = "auto",| Value | What 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 |
false | No interactions; trees are decoration only |
builtinTarget.maxDistance sets how close players must be for the built-in menu (default 4.0).
Features
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
chopping = {
requireHatchet = false,
minTime = 6000,
maxTime = 10000,
},requireHatchet = true: players need aWEAPON_HATCHETto 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
| Setting | Default | What it does |
|---|---|---|
debug | false | Draws zone outlines and lists biome models that don't exist in the game (F8) |
maxArea | 15000.0 | The largest zone allowed, in m² |
waitTime | 1000 | How often (ms) the script checks which zones are near players |
actionControls | Control indexes for the editor's close, add point and toggle keys |
Texts are in shared/labels.lua.
Still stuck?Ask on our Discord