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.
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.
Why this over hardcoded farming scripts
| Hardcoded Farming Scripts | rde_farming |
|---|---|
| Coords hardcoded in config | 100% dynamic — all areas live in the DB |
| Restart required to add spots | In-game Admin CRUD — live, zero restart |
| All props always loaded | Proximity streaming, 150m default |
| One animation fits all | 10 built-in animation keys, fully extensible |
Quick Start
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.
Admin CRUD Menu
| Action | Description |
|---|---|
| Create Farming Area | Stand at the center, confirm — spots auto-generate within the spawn radius immediately |
| Move Center Here | Stand anywhere and reassign the area center — spots regenerate |
| Toggle Active | Instantly enable/disable for all players |
| Delete Area | Removes area and all spots via cascading FK — no orphaned rows |
Animation Library
| Key | Description | Tool Prop |
|---|---|---|
| pickaxe_mine | Mining / pickaxe swing | prop_tool_pickaxe |
| axe_chop | Wood chopping | prop_cs_hand_axe |
| hand_fish | Fishing (no rod) | — |
['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
},
Configuration
Config.LoadRadius = 150.0 -- props spawn within this distance
Config.UnloadRadius = 170.0 -- despawn beyond this (hysteresis band)
Config.DefaultGatherMin = 1
Config.DefaultGatherMax = 3
Security
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).
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.
Changelog
Initial release — dynamic areas, proximity streaming, StateBag sync, 10-key animation library, tool requirements, auto-respawn.