Skip to content

Market & contracts ​

Buyers ​

Buyers are NPC peds with opening hours (game time). Walk up and open the market screen: one row per item the buyer takes, the price for ★, ★★ and ★★★, what you carry, the 24 h trend and a sparkline. Sell single lines or everything at once (best stars first).

The market screen: price per star, trend, reputation

Buyer Hours Buys
Sandy Shores Produce 06–22 Field crops, strawberries, chili, eggs, milk
Paleto Bay Market 07–21 Fruit, nuts, grapes, bread, pie, juice, honey, eggs, butter
Grain trader (Grapeseed) always Wheat, corn, flour, cornmeal, straw, animal feed, compost, fertilizer
Vespucci Deli 10–23 Wine, cider, cheese, butter, sauces, soup, dried goods, truffles, juice, honey, beeswax

A closed buyer

Price of one item = base price (the crop's produce.price, or Config.Market.prices for goods) × the star factor (1.0 / 1.5 / 2.3) × the buyer's demand for it × (1 + your reputation bonus with that buyer), rounded, at least $1. beforeSale hooks may change it after that (taxes, protection, vetoes; Exports).

  • Demand per buyer and item drops 0.4 % per unit sold and recovers 5 % per hour, never below 40 % of the base price. It recovers while the server is down. The screen warns when an item you carry dropped 15 % in 24 h.
  • Reputation per seller and buyer, 0 to 100: a little per sale and per unit (at most 3 points a sale), +5 for a finished contract, −8 for a late or failed one. Tiers: new, known (from 50, +4 %), trusted (from 80, +8 %).
  • Shelf life: produce and goods carry the time they were harvested or made. An item past its shelf life is not bought any more (the compost bin takes it). Without metadata (ESX inventory) nothing spoils.
  • Standalone servers have no economy: selling answers not_available.
  • Co-op members' sales are split through np_farming's own beforeSale hook (Farm life → Co-ops).

Buyer peds are np_npchandler NPCs (required), shown only during their hours. Their talk option is shown by np_hud, ox_target or qb-target and hidden while you can't act (dead, cuffed, a screen open).

Contracts ​

Orders with a quantity, a minimum star rating, a due date and a reward. Take them at the contract board in Grapeseed or in the Harvest app; deliver at the board (or at the contract's own location) in parts. The reward is paid per delivered share; the last delivery gets the rest.

The contracts board: offers, your active orders, your postings

Three kinds of order:

Kind Where it comes from Where the goods go
NPC order Templates of Config.Contracts.npc on a rotating board (6 at a time, new ones every hour, each offered 12 hours) Gone; reputation with the template's market buyer
Player order contracts.post in game: item, count, minimum stars, days, reward. The reward plus a 5 % fee is taken at once (escrow; the fee is kept) The np_shops shop the poster owns (its stock stash), else the pickup locker at the board
Business order Another resource calls PostContract and funds the reward itself Straight into the given stash (or the np_shops shop's stock)
  • A farmer holds at most 3 contracts. Templates have a farmer level; some repeat for several rounds, some vary count and reward a little (spread).
  • Late: past the due date a contract may still be finished within 24 hours for half of the rest. After that it fails and costs reputation. Giving up an NPC contract fails it; giving up a player order puts it back on the board with its progress.
  • The poster may withdraw an order: the unpaid reward goes back; the farmer keeps what was paid.

Default NPC orders include tomatoes for Pizza This, flour for the Bean Machine (4 rounds), wine for a Vinewood Hills party, potatoes for the Bolingbroke kitchen, corn for Cluckin' Bell, apples for the Paleto bakery, cheese for the Vespucci Deli and tomato sauce for the Sandy Shores diner.

Config ​

shared/config/market.lua:

Option Default Description
distance 3.0 Metres from the buyer
dynamic dropPerUnit 0.004, recoverPerHour 0.05, floor 0.4, historyHours 24, sampleMinutes 60 Demand and price history
reputation perSale 0.2, perUnit 0.02, maxPerSale 3, perContract 5, lateContract -8, three tiers Reputation and its bonus
maxPerSale 200 Items in one sale
noteBelow -0.15 The screen's tip when a price you carry dropped this much
prices goods and animal products $ per item at ★ for items that are no crop
buyers.<id> 4 buyers label, icon, tint, coords, heading, hours = { open, close }, buys, ped, scenario, blip

shared/config/contracts.lua:

Option Default Description
board { max = 6, refreshMinutes = 60, offerHours = 12 } The NPC board
maxActive 3 Contracts one farmer may hold
late { graceHours = 24, rewardMult = 0.5 } The late window
keepDays 3 Finished contracts kept as history
boards, locker Grapeseed Where contracts are taken and delivered; where player orders without a shop wait
playerPosting enabled, minLevel 1, fee 0.05, maxDays 14, maxCount 500, minReward 10, maxReward 100000, maxOpen 3, jobs = nil In-game postings (jobs = Config.Jobs groups that may post, nil = anyone)
npc 8 templates { id, buyer, market?, item, count, minStars, days, reward, rep, level, repeats?, spread?, weight? }