RDE_FARMING DOCS
RED DRAGON ELITE // ECONOMY & GAMEPLAY

Stand Where You Want.
Confirm. It's a Farming Spot.

rde_farming replaces hardcoded mining/farming coordinates with 100% dynamic, in-game-managed areas. Props stream only within 150m of a player, harvest animations come from a 10-key library, and every area can require a specific tool item — no config restarts, ever.

01 / Start Here

Overview

Every farming area is created and managed in-game via the admin menu — stand where you want, confirm, done. Spots have a cascading FK on area_id, so deleting an area wipes all its spots automatically with zero orphaned rows.

Core Principle Proximity streaming with a hysteresis band (150m load / 170m unload) prevents pop-in at the boundary — a common bug in naive single-threshold implementations.

Why this over hardcoded farming scripts

Hardcoded Farming Scriptsrde_farming
Coords hardcoded in config100% dynamic — all areas live in the DB
Restart required to add spotsIn-game Admin CRUD — live, zero restart
All props always loadedProximity streaming, 150m default
One animation fits all10 built-in animation keys, fully extensible
02 / Start Here

Quick Start

server.cfg
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_inventory
ensure ox_target
ensure rde_farming

Both tables auto-create on first boot. Run /farmadmin, stand where you want the center of a farming area, and hit Create Farming Area.

Note Required items (e.g. pickaxe, iron_ore) must exist in your ox_inventory items file — rde_farming only checks counts and gives items, it doesn't define them.
03 / Reference

Admin CRUD Menu

ActionDescription
Create Farming AreaStand at the center, confirm — spots auto-generate within the spawn radius immediately
Move Center HereStand anywhere and reassign the area center — spots regenerate
Toggle ActiveInstantly enable/disable for all players
Delete AreaRemoves area and all spots via cascading FK — no orphaned rows
04 / Reference

Animation Library

KeyDescriptionTool Prop
pickaxe_mineMining / pickaxe swingprop_tool_pickaxe
axe_chopWood choppingprop_cs_hand_axe
hand_fishFishing (no rod)
data/animations.lua — adding a custom animation
['my_custom_anim'] = {
    dict     = 'amb@world_human_gardener_plant@male@idle_a',
    anim     = 'idle_a',
    duration = 4000,
    toolProp = 'prop_tool_shovel',
    boneIndex = 28422, -- right hand
},
05 / Reference

Configuration

config.lua
Config.LoadRadius   = 150.0  -- props spawn within this distance
Config.UnloadRadius = 170.0  -- despawn beyond this (hysteresis band)

Config.DefaultGatherMin = 1
Config.DefaultGatherMax = 3
06 / Reference

Security

Harvest validated server-side — distance check between player and spot position
Per-player per-spot cooldown enforced server-side
Items given server-side via ox_inventory — client cannot fake a give
Admin actions gated by ACE + ox_core group check — no client bypass
07 / More

Common Pitfalls

Props spawn underground or floating

The client Z-snaps spots to the ground using GetGroundZFor_3dCoord on first render — if the area center Z is far off from actual ground, spots take one proximity cycle to settle.

Fix: regenerate spots after moving the area center for the cleanest result.

Spots never respawn

Usually a mismatch between RespawnCheckTick units and the area's respawn_time.

Fix: confirm respawn_time is in seconds, and check rde_farming_spots.depleted_at is a valid Unix timestamp (ms).

08 / More

FAQ

Can an area require no tool at all?

Yes — leave the Required Tool Item field blank when creating or editing the area.

Is there a random failure chance?

Yes — a 5% failure chance is baked in for added realism, non-configurable per-area but tunable in code.

09 / More

Changelog

v1.0.0

Initial release — dynamic areas, proximity streaming, StateBag sync, 10-key animation library, tool requirements, auto-respawn.