A fully featured and highly optimized farming system for RedM servers using VORP Core. Players can plant, maintain, protect, and harvest a wide range of crops through a complete gameplay loop built around growth stages, plant care, diseases, weather, job bonuses, and synchronized visual feedback.
[SHOWCASE VIDEO]
Key Features
- Advanced Farming Loop: Players plant seeds, water crops, apply fertilizer, cure diseases, and harvest fully grown plants through a complete and immersive farming system.
- 15 Crop Types Included: Potato, Sugar Cane, Carrot, Corn, Coffee, Onion, Tomato, Wheat, Tobacco, Oat, Cotton, Strawberry, Poppy, Cannabis, and Coca are already configured and ready to use. (The script does not include certain props; some of them are paid features.)
- 3-Stage Plant Growth: Every crop uses multiple visual growth stages with proper prop swapping as the plant develops.
- Care-Based Farming System: Water, fertilizer, and health all matter. Players who consistently maintain their crops receive better harvest outcomes and higher yield potential.
- Disease System: Plants can become diseased over time, and disease can spread to nearby crops if not treated. This adds real risk and encourages active farm management.
- Harvest Bonus Logic: Well-maintained plants can gain up to +45% better harvest rewards, with smarter reward scaling based on overall care during the full grow cycle.
- Rain Watering System: Crops can automatically gain water when it rains, making weather a meaningful part of farming gameplay.
- Day / Night Growth Modifiers: Growth speed can change depending on in-game time, allowing you to tune faster daytime farming or slower nighttime progression.
- Hoe Durability System: Planting can require a hoe item, with configurable durability and metadata-based use tracking.
- Water Wagon System: Players can fill a wagon with water and irrigate multiple nearby plants at once, creating a much more practical system for larger farms(NEED sleepless_interact).
- Visual PTFX States: Diseased, dead, thirsty, or harvest-ready plants can display synchronized particle effects for clear visual feedback.
- Flexible Interaction Options: Choose between native RedM prompts or sleepless_interact from config, depending on your preferred interaction style.
- Job Restrictions and Bonuses: Restrict farming to certain jobs, or allow everyone to farm while granting bonus rewards only to whitelisted professions.
- Permissions for Shared Care: Decide whether other players can water, fertilize, cure, or harvest someone else's crops.
- Automatic Dead Plant Cleanup: Dead plants can be removed automatically after a configurable time to keep farms clean and reduce clutter.
- Multi-Language Ready: English and Spanish locale files are included.
Optimization
- Distance-Based Entity Streaming: Plants are spawned and despawned locally using lib.points, so players only render nearby crops instead of every plant on the map.
- Efficient Synchronization: Plant data is handled server-side and synced cleanly to all players, while entity StateBags are used to keep plant identity and visual effect state consistent.
- Stable Visual State Handling: PTFX effects are applied and removed based on plant state changes, helping all nearby players see the correct diseased, dead, or special crop effects.
- Instance-Aware Logic: Plant entities respect player instance state, avoiding cross-instance visibility problems.
- Low Overhead Design: Growth updates, weather checks, disease propagation, and cleanup systems are configurable and designed to avoid unnecessary client load.
Requirements
- Framework: vorp_core
- Inventory: vorp_inventory
- Library: ox_lib
- Database: oxmysql
Optional:
Installation
- Place the ys_farming folder in your resources directory.
- Run ys_farming.sql to create the plant database table.
- Run ys_farming_items.sql to insert all required farming items.
- Add ensure ys_farming to your server.cfg.
- Make sure dependencies start before the resource.
Example:
ensure ox_libensure oxmysqlensure vorp_coreensure vorp_inventoryensure ys_farming
If you want sleepless interactions:
ensure sleepless_interact