Overview
Britannia_Farming lets players build their own farm, anywhere outside the towns.
- Dig and plant: take the hoe in hand (use the item) and a gold patch shows where the ground will be dug. Press E to dig. A gold post stands over your dug ground until you plant it: press G at the post and pick a seed. Every crop grows through 4 stages, and you can see each stage.
- Water: the watering can stays in your pocket. Press G at a crop to water it, or at a water source to fill the can: your own placed tap or barrel, a map pump or trough, or a river or lake. The water left shows on the item. Taps and barrels slowly fill back up.
- Care: fertiliser makes crops grow faster. Weeds slow them down, so pull them. Pests and thirst hurt a crop, and pest spray clears pests and keeps them off for an hour. One bottle holds 10 sprays. A crop that dies can only be cleared away.
- Fruit trees: a tree is a bush until 75%, then a grown tree. Pick it at 100% and it drops back to 50% and fruits again, as long as you look after it.
- 20 levels: you get XP for digging, planting, watering, fertilising, spraying, weeding and every crop you pick. Levels unlock better seeds, trees and farm hands.
- Farm hands: hire them at a farm shop for a daily wage and send them to your farm. You can see them working there. They water, weed, spray, fertilise from your farm storage and pick ripe crops into it, even while you're offline. You get 1, 2 and 3 hands at levels 5, 10 and 15. Each job can be switched on or off.
- Full farm hands (level 20): leave a hoe, a watering can and a tap or barrel in the farm storage, and the hands run the whole farm. They pick, dig the plot again and replant it with seeds from the storage (the same crop when there is one), plant your new dug ground, and use the storage's can and pest spray.
- Farm storage: a placeable chest that the hands fill. Press G for its menu and its upgrades.
- Farm shops sell tools, seeds and farm hands. Produce traders buy crops at set prices. Players rent market stalls to sell to other players at their own prices: the takings wait in the stall's till, and a tax is taken on each sale. Produce orders from restaurants and kitchens pay more than the traders and give XP, and they get bigger as you level up.
/farmingopens your farm book: your level, every crop you have (with a map marker for each), your farm hands and what each level unlocks.- Our own black and gold windows and key hints.
- All settings can be changed in game in the free Land Office (
/britannia). - English, Spanish and French.
The Lua is encrypted by Cfx.re. The settings, the crop list and the text stay editable.
Requirements
- poggy_core (free), version 0.14.0 or newer.
- oxmysql.
- One of VORP, RSG Core or QBCore RedM (poggy_core connects the script to it).
- Optional: Land Office (settings in game) and Notifications.
Install
- Put the
Britannia_Farmingfolder in your resources. - Add
ensure Britannia_Farmingtoserver.cfg, afterensure oxmysqlandensure poggy_core. - Add the items (below), then restart the server. The tables are created on the first start.
- Set your farm shops, traders, stalls and order buyers in
shared/config.lua, and your crops inshared/crops.lua(the fields are explained at the top of that file).
Items
SQL.sql (VORP) and installation/items_rsg_qbcore.txt (RSG Core / QBCore RedM) add 48 items:
- Tools:
hoe,wateringcan,pest_spray,fertilizer,fertilizerpro,farm_tap,farm_water_barrel,farm_storage. - Seeds and crops: the 20 example crops and trees in
shared/crops.lua, each with its seed (seed_carrot,seed_apple_tree, ...) and what it grows.
If you change the crop list, add your own seed and crop items too.
Configuration
Everything is in shared/config.lua, with a comment on each option, and in the Land Office.
| Setting | What it does | Default |
|---|---|---|
Config.Items | The tool, tap, barrel, storage and fertiliser items | |
Config.Planting | No farming in towns, crops per character, spacing, the gold post, how long dug ground lasts | 60 crops each |
Config.Water | Can size, filling in rivers, tap and barrel size and refill per hour, pumps and troughs, taps and barrels each | 10 / 100 / 40 |
Config.Care | How fast crops dry out, grow, get weeds and pests, sprays per bottle, spray protection, pause while offline | |
Config.Trees | How far a tree drops back after picking | 50% |
Config.Harvest | Only the planter can pick, extra crops when fertilised | |
Config.Levels, Config.XP | XP for each level and each job | 20 levels |
Config.Shops, Config.ShopItems | Farm shops (place, model, blip) and the tools they sell | 3 shops |
Config.Workers | Farm hands: jobs on or off, full farm hands, hands per level, wage, area | $3 a day |
Config.Storage | Farm storage size, upgrades and how far the hands carry to it | 200 slots |
Config.Market | Traders, stalls, stall rent, tax and what stalls may sell | 3 traders, 4 stalls |
Config.Orders | Produce orders: buyers, slots, how long an order lasts, tiers by level | 4 buyers |
Config.Tools, Config.Keys | The hoe and can in hand, the keys | E dig, G tend |
Config.Notify | How messages reach players | auto |
Commands and permissions
| Command | Who | What |
|---|---|---|
/farming | Everyone | The farm book |
| G | Everyone | Tend a crop, plant at a gold post, fill the can, open a farm shop, trader, stall, order buyer or farm storage |
| E (hoe in hand) | Everyone | Dig the ground |
Staff (the britannia_farming.admin ace or a poggy_core admin) can destroy anyone's crops and pick up anyone's taps and barrels. With Config.Debug = true, staff get test commands such as /farmgrow to ripen a crop.
How it works
The server keeps every crop, tap, barrel, storage and farm hand, and works them all out every minute. Planting, watering, picking, buying, selling, stalls and orders are checked on the server: the item, the distance and the money. Crops can keep growing while their owner is offline (Config.Care.PauseOffline = false) or wait for them (true).
Troubleshooting
I can't dig here. You're in a town (Config.Planting.NoTowns), too close to another crop, or you've reached your crop limit.
My farm hand doesn't do anything. Check they're paid and have been sent to your farm. They look after crops within 35 m of where you sent them. To fertilise and pick, they need a farm storage within 60 m.
My full farm hand doesn't replant. You need to be level 20, and the storage within 60 m of the hand must hold a hoe, a watering can and a tap or barrel, plus seeds. Trees aren't replanted.
The can won't fill. Stand right by a tap, barrel, pump or trough, or in a river or lake.
Version history
- 1.0.0: first release.
Still stuck?
Open a ticket on our Discord with your framework, your poggy_core version and what you see, and we'll help you get it running.
Get help on Discord