Skip to content

RedDragonElite/rde_wildplant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฑ RDE Wild Plants โ€” Advanced Plant Growing System

Version License FiveM ox_core Free

4-stage growth system, dynamic weather effects, quality-based harvest yield, real-time triple sync, and full ox_core integration. Built on ox_core ยท ox_lib ยท ox_inventory ยท ox_target ยท oxmysql

Built by Red Dragon Elite | SerpentsByte


RDE_WildPlants_Logo

๐Ÿ“– Table of Contents


๐ŸŽฏ Overview

RDE Wild Plants is a production-ready plant growing system for FiveM servers running ox_core. Plants grow through four realistic stages, react dynamically to weather, produce quality-based harvest yields, and sync perfectly across all clients via a triple sync architecture โ€” all persistent across server restarts.

Why RDE Wild Plants?

Feature Generic Growing Scripts RDE Wild Plants
Multi-stage growth Sometimes 2 โœ… 4 stages
Weather effects โŒ โœ… Rain, thunder, sun, fog
Quality system โŒ โœ… Affects harvest yield
Real-time sync Polling โœ… Triple sync architecture
3D text display โŒ โœ… Stage + time remaining
Random events โŒ โœ… 5% failure chance
Database persistent Sometimes โœ… Always โ€” auto table
Triple admin verification โŒ โœ… ACE + ox_core + Steam

โœจ Features

๐ŸŒฟ Growth System

  • 4-stage progression: Seedling โ†’ Young Plant โ†’ Flowering โ†’ Ready to Harvest
  • ~45 minutes total growth time (fully configurable per stage)
  • 3D text above each plant showing current stage and time remaining
  • 5% random failure chance for added realism
  • Plants persist across server restarts via MySQL

๐ŸŒฆ๏ธ Dynamic Weather Effects

  • Rain โ†’ 20% faster growth
  • Extra Sunny โ†’ 15% faster growth
  • Thunderstorm โ†’ 20% slower growth
  • Foggy โ†’ 15% slower growth
  • Weather is checked live and affects all active plants in real time

๐Ÿ“Š Quality System

  • Each planted seed generates a random quality value (80โ€“100%)
  • Quality directly scales the harvest yield
  • Weather bonus at harvest time applies an additional multiplier
  • 30% chance for a bonus seed on successful harvest

๐Ÿ”„ Synchronization

  • Triple sync system โ€” statebags + server events + client callbacks
  • New players receive full plant state on join
  • All updates broadcast instantly to all connected clients

๐Ÿ›ก๏ธ Admin System

  • Triple verification: ACE permissions + ox_core groups + Steam ID whitelist
  • Admin-only commands for plant management and debugging

๐ŸŒฟ How It Works

  1. Planting โ€” Player uses a weed_seed item near valid ground. ox_target interaction starts the process.
  2. Growth โ€” Plant advances through 4 stages over ~45 minutes. Weather speeds up or slows down progression.
  3. Harvesting โ€” When stage 4 is reached, player uses harvest_tool via ox_target to harvest.
  4. Rewards โ€” Player receives 25โ€“75 harvested_weed items, scaled by quality and weather bonus. 30% chance for a bonus seed.

๐Ÿ“ฆ Dependencies

Resource Required Notes
oxmysql โœ… Required Database layer
ox_core โœ… Required Player/character framework
ox_lib โœ… Required UI, callbacks, notifications
ox_inventory โœ… Required Seed and harvest items
ox_target โœ… Required Plant interaction

๐Ÿš€ Installation

1. Clone the repository

cd resources
git clone https://github.com/RedDragonElite/rde_wildplant.git

2. Add to server.cfg

ensure oxmysql
ensure ox_core
ensure ox_lib
ensure ox_inventory
ensure ox_target
ensure rde_wildplants

Order matters. rde_wildplants must start after all its dependencies.

3. Database

The rde_plants table is created automatically on first start. No manual SQL import needed.

4. Add items (see below)

5. Configure admin permissions in config.lua

6. Restart

restart rde_wildplants

๐Ÿ“ฆ Item Setup

Add the following to ox_inventory/data/items.lua:

['weed_seed'] = {
    label       = 'Weed Seed',
    weight      = 10,
    stack       = true,
    close       = true,
    description = 'A seed for growing plants',
},

['harvest_tool'] = {
    label       = 'Harvest Tool',
    weight      = 500,
    stack       = false,
    close       = true,
    description = 'Tool for harvesting plants',
},

['harvested_weed'] = {
    label       = 'Harvested Weed',
    weight      = 50,
    stack       = true,
    close       = true,
    description = 'Freshly harvested plant material',
},

โš™๏ธ Configuration

All values are configurable in config.lua. Key settings:

Growth Stages (minutes)

Config.GrowthStages = {
    [1] = 15 * 60,   -- Seedling     โ†’ 15 min
    [2] = 15 * 60,   -- Young Plant  โ†’ 15 min
    [3] = 15 * 60,   -- Flowering    โ†’ 15 min
    [4] = 0,         -- Ready โ€” harvest immediately
}

Weather Multipliers

Config.WeatherMultipliers = {
    RAIN       = 1.20,   -- 20% faster
    EXTRASUNNY = 1.15,   -- 15% faster
    THUNDER    = 0.80,   -- 20% slower
    FOGGY      = 0.85,   -- 15% slower
}

Harvest Rewards

Config.Harvest = {
    baseMin       = 25,     -- minimum items
    baseMax       = 75,     -- maximum items
    bonusSeedChance = 0.30, -- 30% chance for bonus seed
    failureChance   = 0.05, -- 5% plant failure chance
}

Admin System

Config.AdminSystem = {
    checkOrder    = {'ace', 'oxcore', 'steam'},
    acePermission = 'rde.plants.admin',
    oxGroups      = { admin = 0, superadmin = 0 },
    steamIds      = { 'steam:110000xxxxxxxx' },
}

ACE Permissions (server.cfg)

add_ace group.admin rde.plants.admin allow
add_principal identifier.steam:110000xxxxxxxx group.admin

๐Ÿ“‹ Admin Commands

Command Description
/deleteplants Delete all active plants from world and database
/countplants Show total active plant count
/debugplants Client-side debug info for nearby plants
/debugplantsserver Server-side plant state dump to console

๐Ÿ—„๏ธ Database

Table is auto-created on first start:

CREATE TABLE rde_plants (
    id         VARCHAR(64)  PRIMARY KEY,
    model      VARCHAR(64)  NOT NULL,
    coords     JSON         NOT NULL,
    stage      INT          DEFAULT 1,
    quality    FLOAT        DEFAULT 1.0,
    planted_by VARCHAR(64)  NOT NULL,
    planted_at TIMESTAMP    DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP    DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    INDEX idx_planted_by (planted_by)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

โšก Performance

  • ~800 lines total โ€” lightweight by design
  • Efficient rendering via LOD-aware 3D text (only drawn within range)
  • Database operations are async โ€” no blocking calls
  • Weather checks are cached, not polled every tick
  • Plant sync fires only on state change, not on a loop

๐Ÿ› Troubleshooting

Plants not showing after restart? Check that oxmysql is fully started before rde_wildplants. Fix ensure order in server.cfg if needed. Run /countplants to confirm DB entries exist.

Harvest tool not triggering ox_target option? Make sure ox_target is started before rde_wildplants. Check F8 console for export errors on resource start.

Weather effects not applying? Enable Config.Debug = true and check server console. Confirm the weather type string returned by your server matches the keys in Config.WeatherMultipliers.

Plants stuck at stage 1? Check server console for timer errors. Verify oxmysql is connected and the rde_plants table exists (SHOW TABLES LIKE 'rde_plants').

Admin commands not working? Verify your ACE setup in server.cfg and that your Steam ID in Config.AdminSystem.steamIds matches the exact hex format (steam:110000xxxxxxxxx).


๐Ÿ“ Changelog

v1.0.0 โ€” Initial Release

  • 4-stage plant growth system
  • Dynamic weather integration (rain, thunder, sun, fog)
  • Quality-based harvest yield
  • Triple sync system for perfect multiplayer support
  • Triple admin verification (ACE + ox_core + Steam)
  • 3D text display per plant
  • Random failure events
  • Multi-language support (EN/DE)
  • Auto database table creation

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit: git commit -m 'Add your feature'
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

Guidelines: follow existing Lua conventions, comment complex logic, test on a live server before PR, update docs if adding features.


๐Ÿ“œ License

###################################################################################
#                                                                                 #
#      .:: RED DRAGON ELITE (RDE)  -  BLACK FLAG SOURCE LICENSE v6.66 ::.         #
#                                                                                 #
#   PROJECT:    RDE_WILDPLANTS v1.0.0 (ADVANCED PLANT GROWING SYSTEM FOR FIVEM)   #
#   ARCHITECT:  .:: RDE โงŒ Shin [โ–ณ แ›‹แ›…แšฑแ›’แ›…แšพแ›แ›‹ แ›’แ›แ›แ›… โ–ฝ] ::. | https://rd-elite.com     #
#   ORIGIN:     https://github.com/RedDragonElite                                 #
#                                                                                 #
#   WARNING: THIS CODE IS PROTECTED BY DIGITAL VOODOO AND PURE HATRED FOR LEAKERS #
#                                                                                 #
#   [ THE RULES OF THE GAME ]                                                     #
#                                                                                 #
#   1. // THE "FUCK GREED" PROTOCOL (FREE USE)                                    #
#      You are free to use, edit, and abuse this code on your server.             #
#      Learn from it. Break it. Fix it. That is the hacker way.                   #
#      Cost: 0.00โ‚ฌ. If you paid for this, you got scammed by a rat.               #
#                                                                                 #
#   2. // THE TEBEX KILL SWITCH (COMMERCIAL SUICIDE)                              #
#      Listen closely, you parasites:                                             #
#      If I find this script on Tebex, Patreon, or in a paid "Premium Pack":      #
#      > I will DMCA your store into oblivion.                                    #
#      > I will publicly shame your community.                                    #
#      > I hope your server lag spikes to 9999ms every time you blink.            #
#      SELLING FREE WORK IS THEFT. AND I AM THE JUDGE.                            #
#                                                                                 #
#   3. // THE CREDIT OATH                                                         #
#      Keep this header. If you remove my name, you admit you have no skill.      #
#      You can add "Edited by [YourName]", but never erase the original creator.  #
#      Don't be a skid. Respect the architecture.                                 #
#                                                                                 #
#   4. // THE CURSE OF THE COPY-PASTE                                             #
#      This code uses async timers, weather hooks, and a triple sync layer.       #
#      If you just copy-paste without reading, it WILL break.                     #
#      Don't come crying to my DMs. RTFM or learn to code.                        #
#                                                                                 #
#   --------------------------------------------------------------------------    #
#   "We build the future on the graves of paid resources."                        #
#   "REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY."                          #
#   --------------------------------------------------------------------------    #
###################################################################################

TL;DR:

  • โœ… Free forever โ€” use it, edit it, learn from it
  • โœ… Keep the header โ€” credit where it's due
  • โŒ Don't sell it โ€” commercial use = instant DMCA
  • โŒ Don't be a skid โ€” copy-paste without reading won't work anyway

๐ŸŒ Community & Support

๐Ÿ™ GitHub RedDragonElite
๐ŸŒ Website rd-elite.com
๐Ÿ”ต Nostr (RDE) RedDragonElite
๐Ÿ”ต Nostr (Shin) SerpentsByte
๐Ÿšช RDE Doors rde_doors
๐Ÿš— RDE Car Service rde_carservice
๐ŸŽฏ RDE Skills rde_skills
๐ŸŽฎ RDE Props rde_props
๐Ÿ“ก RDE Nostr Log rde_nostr_log

When asking for help, always include:

  • Full error from server console or txAdmin
  • Your server.cfg resource start order
  • ox_core / ox_lib versions in use

"We build the future on the graves of paid resources."

REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY.

๐Ÿ‰ Made with ๐Ÿ”ฅ by Red Dragon Elite

โฌ† Back to Top

About

๐ŸŒฑ [FREE] RDE Wild Plants - Advanced Plant Growing System for ox_core A highly optimized and feature-rich plant growing system with real-time synchronization, weather effects, and quality system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages