Integrations & compatibility ​
np_farming requires np_npchandler and np_prophandler (below). Every
other np_* resource is optional. Each optional sibling has one file under integrations/ that
declares the exports it calls and wraps them with a built-in fallback. At start one line per sibling is printed:
active, fallback: …, missing export <name>, off in config or not running. Siblings may start or stop later:
the status is re-evaluated, and items, shops and the phone app are registered again.
Config.Integrations.<name> = false forces the fallback; what np_farming does with a sibling is set in Config.Compat
(Configuration → Phone and compatibility).
tests/test_integrations.lua reads the sibling repositories next to np_farming and fails when a declared export is
gone, or when a file calls an export it did not declare.
np_npchandler / np_prophandler (required) ​
Both are required at 1.1.0+ and are dependencies in fxmanifest.lua and must start before np_farming. np_farming creates no ped or object
itself: there is no fallback and no Config.Integrations toggle for them. The handlers delete everything of np_farming
when it stops.
| What | Handler |
|---|---|
| Buyer peds (market) | np_npchandler server NPCs with their hours and a talk option |
| Processing station props | np_prophandler server props with a use option |
| Plants, pots, water barrels, hives, pen props, threat props | np_prophandler local props, streamed in near the player |
| Pen animals | np_npchandler local NPCs that wander in the pen |
| Truffle pig, crows | np_npchandler local peds |
| Placement ghosts (crops, hidden grows) | np_prophandler local props |
| The tool in your hand during a timed action | np_prophandler attachment, synced |
The buyer and station options are shown by np_hud, ox_target or qb-target; np_menu adds none to them. They are hidden
while you can't act (dead, cuffed, a screen open) through the handlers' setCanInteract. Buyers and stations are
registered again on np_npchandler:ready and np_prophandler:ready
when a handler restarts.
np_* siblings ​
| Sibling | With it | Without it |
|---|---|---|
| np_inventory | Items registered at runtime with tints, durability, categories and quality metadata; weapon items (pockets, equipment slots, the drawn weapon) as tools; use callbacks, item actions, stashes, shops | ox / qb / ESX inventory bridge |
| np_hud | Toasts with their app header, progress bars, prompts, HUD zone claims | np_farming's own NUI HUD layer |
| np_menu | Context options on pens, hives, tractors and players (co-op invites), a Tools item on its radial wheel. Its dev menu's weather and clock feed the seasons | Walk up and press E; own weather cycle |
| np_phone | The Harvest app, push banners, the badge, Maps pins for theft alarms, /harvest (Phone app) |
Toasts and a GPS waypoint |
| np_character | Character ids as identifiers (standalone), your rented plots in the spawn picker, plots released when a character is purged | License / framework identifier |
| np_admin | Staff rights by node, live settings (Farming), the audit log, staff tools with F8 output, the theme, its world tool's weather and clock (Admin) | Own admins (framework groups, Config.Admins, Discord roles) |
| np_discord | Admins by Discord role; farm events (theft, finished contracts, rented plots, level ups) in its farming log channel |
Framework groups only |
| np_shops | The farm supply store (npf_supply: every seed and the tools, scarecrow, padlock, beehive, …) as an np_shops shop with its afterBuy hook; player businesses' shops as contract posters, deliveries into their stock (AddStock) |
Inventory shops (np_inventory / ox_inventory) |
| np_banking | Readable statement lines for charges and payouts, the farm job's society account, shared co-op accounts | Framework money |
| np_payments | Seeds, animals and co-op fees at the checkout sheet (cash, card, bank, split); plot rent as a direct charge, or at the checkout with rentCheckout; invoices |
np_banking, then framework money |
| np_vending | Farm food and drink keep their hunger and thirst effects in vending machines | – |
| np_fuel | Tractor fuel and its jerrycan item (litres) as the fuel tool |
The vehicle's fuel state bag, else the tractors' own tank |
| np_environmental | Field fires and loose livestock as its scenes (brush_fire, loose_livestock) |
– |
| np_gangs | Crop thefts on a turf raise its police attention and warn the gang (only members in colours with bandanaOnly); an optional protection share of sales at buyers on a turf |
– |
| np_identification | A farming licence (farming_license) to sell or rent, off by default. Add the document type to np_identification first |
No licence needed |
| np_passwords | Code padlocks on plots | The owner check |
| np_prison | Prison plots (Config.Compat.prison.plots): only inmates of the facility work them, and harvests reduce the sentence |
No prison farming |
| np_drugs | Shared ingredients (GetProductionLines: corn, fertilizer, …; np_farming's definitions win) and crops added through RegisterCrop by a trusted adapter |
Ordinary crops |
| np_minigames | A server-judged skill check after a harvest by hand: a better grade gives more yield (+5 to +20 %) | The normal harvest |
| np_fishing | Its baits made at the farm stations: corn → sweet corn (mill), cornmeal + flour → boilies (mill), bread → bread paste (oven), compost → earthworms (compost bin) | – |
| np_screens | The live produce price board on a screen (Config.Compat.screens.board) |
The page https://<server>/np_farming/prices alone |
| np_mechanic / np_manufacturing | A tractor's service book and build, in the overview and the staff tool tractor service | Native vehicle health |
| np_net | np_farming's network events in the staff tool network metrics | – |
| md-stempeluhr (MDT) | Farm shifts over its HTTP API (convars np_farming_stempeluhr_url / _key) |
No shift clock |
np_shops ​
- The farm supply store (
Config.Compat.supply, idnpf_supply, near the Grapeseed farm) sells every crop's seed (its seed price ×seedMult) and the tools and farm items. It is registered as an np_shops shop when np_shops runs, and again after np_shops restarts; otherwise it is an inventory shop (np_inventory / ox_inventory). An item whose module is off is left out. - np_farming registers an
afterBuyhook limited to its own shops. - A player who owns or manages an np_shops shop posts contracts as that business; deliveries go into the shop's stock
(
AddStock, the stock stashnp_shops_stock:<id>). See Market & contracts.
np_drugs ​
- np_farming reads np_drugs' production lines (
GetProductionLines) and keeps the shared ingredients (corn, fertilizer, …) as ordinary farm items; np_farming's definitions win. Its items are registered again when np_drugs starts. - A trusted resource listed in
Config.Compat.crops.resources(np_drugs by default) may add crops withRegisterCropand register np_farming'sbeforePlant/beforeHarvesthooks. np_farming creates no drug batches or purity metadata itself, and planted crops stay valid when np_drugs stops.
np_fishing ​
While np_fishing runs, np_farming registers its bait items (bait_corn, bait_bread, bait_worm, bait_boilie)
and adds four recipes to the stations (Config.Compat.fishing). They are gone again when np_fishing stops.
np_screens ​
GET https://<server>/np_farming/prices is a read-only HTML page of today's best ★ price per crop, reloading every
minute. Set Config.Compat.screens.board to an np_screens content id and np_farming puts the page on that screen
(url = the server's public base URL, default the convar web_baseUrl). Any other screen or browser source may show
the page too.
Not integrated ​
Not integrated, on purpose: np_clothing (workwear is a Config.Stores entry there; nothing for a farm to call),
np_helicam, np_tattoos, np_flightradar, np_crouch-crawl-shoot and the pub and sport games (np_billiards, np_darts,
np_golf) have no farm overlap.
Third-party resources ​
| Resource | How it fits |
|---|---|
| Renewed-Weathersync, qb-weathersync, cd_easytime | Weather and clock for growth, rain and frost, read as they are |
| vSync | The same, with the snippet integrations/install/vsync_server.txt appended inside vs_server.lua (Installation) |
| ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch | Theft alarms and field fires in their call lists (Config.Threats.dispatch.adapter = 'auto'). Without them: a toast and a blip for police / fire on duty |
| Your own dispatch | Config.Threats.dispatch.adapter = 'event' and listen to np_farming:server:theft |
| Another weather resource | One small file in integrations/server/ that adds itself to NpFarming.WorldSources (there is no export for it) |
Weather sources by priority: a weather resource, np_admin's world tool, np_menu's, the GlobalState keys of
Config.World.weatherKeys, then np_farming's own seasonal cycle.
Frameworks ​
np_farming picks one framework bridge and one inventory bridge at start (Config.Framework, Config.Inventory,
'auto' = the first that runs: es_extended > qbx_core > qb-core; np_inventory > ox_inventory > qb-inventory).
| es_extended | qbx_core / qb-core | standalone | |
|---|---|---|---|
| Identifier | xPlayer.identifier |
citizenid |
np_character id, else the FiveM license |
| Jobs and duty | Framework job | Framework job and duty | Config.StandaloneJobs |
| Money | Cash / bank accounts | Cash / bank | No economy: selling answers not_available, rent and fees are free |
| Weapons for tools | xPlayer.getLoadout() |
Weapon items of the inventory | The client's report (standaloneReport) |
| Staff without np_admin | getGroup() in Config.AdminGroups |
HasPermission |
Config.Admins, np_discord roles |
With np_admin running, its permission nodes decide on every framework.
Inventories ​
| Metadata (quality, durability) | Runtime items | Weapons as tools | Use callback | Items to add by hand | |
|---|---|---|---|---|---|
| np_inventory | yes | yes (RegisterItem) |
Items with weapon.hash (pockets, equipment slots) |
server.export, item actions |
none |
| ox_inventory | yes | no | WEAPON_* items |
server.export, hooks |
ox_inventory_items.txt |
| qb-inventory (and forks) | yes (info) |
no | weapon_* items |
CreateUseableItem |
qb_core_items.txt |
| ESX inventory | no: _q2 / _q3 items, tool wear in np_farming's store |
no | The ESX loadout | RegisterUsableItem |
esx_items.sql |
| none | – | – | – | – | – |
On the plain ESX inventory each star is its own item (tomato, tomato_q2, tomato_q3) and nothing spoils
(Config.Quality.variants = 'auto'). See Installation → Items.