Configuration Guide

How do I get the coordinates to use in the configuration?

We suggest using the following resource to obtain coordinates, as it comes already formatted for the configuration pattern: Copy Coords GitHub Repository. The script's usage and commands are detailed in its README.


How do I add a new farming location (operations center)?

Find Config.farming_locations in your config.lua and add a new entry using the template below. Each entry defines one physical location where players can open the main farming dashboard.

Config.farming_locations = {
    {
        ['menu_location'] = { 2413.2, 4996.15, 46.65 }, -- Coordinate to open the menu (vector3)
        ['garage_locations'] = {
            { 2393.66, 4976.97, 44.75, 151.91 },        -- Garage spawn points (vector4)
        },
        ['required_jobs'] = {},   -- Required job names to open the menu (set as {} to disable)
        ['account'] = 'bank',     -- Account used for farm expenses
        ['blips'] = {
            ['id'] = 846,
            ['name'] = "Farm Operations Center",
            ['color'] = 25,
            ['scale'] = 0.6,
        }
    },
}

How do I add or modify fields?

Fields are defined in Config.fields_store. Each field has an id, a polygon defining its boundaries, and various settings. Use ['for_contracts'] = false for purchaseable fields and true for fields that are exclusively used by the contracts system.

['field_example'] = {
    ['name'] = 'Example Field',
    -- ['price'] = 25000,       -- Optional fixed price. If omitted, price is auto-calculated from Config.field_price_per_ha
    ['image'] = 'images/fields/field_example.png',
    ['location'] = { 2143.82, 5162.23, 55.52 },  -- Waypoint shown in the UI
    ['for_contracts'] = false,
    ['level'] = 0,               -- Min properties upgrade level required to purchase
    ['crops_before_degradation'] = 12,
    ['repair_price'] = 50,
    ['polygon'] = {
        vector3(x1, y1, z1),
        vector3(x2, y2, z2),
        -- ... add as many points as needed to trace the field boundary
    },
    ['offsetProp'] = 45.0        -- Rotation (degrees) applied to crop props (adjust for best visual alignment)
},

The field price is auto-calculated from Config.field_price_per_ha multiplied by the field area in hectares. Set ['price'] manually if you want a fixed value that overrides this calculation.


How do I add a new crop type?

Crops are defined in Config.crops. Each entry requires a list of items (seed and harvest item), a harvest amount, and growth stage configuration.

{
    ['items'] = {
        ['seed'] = 'your_seed_item',          -- Item ID for the seed
        ['harvest'] = 'your_harvest_item',    -- Item ID for the harvested product
        ['seed_name'] = 'Your Seed',          -- Display name shown in the UI
        ['harvest_name'] = 'Your Crop',
        ['level'] = 0,                        -- Required crops upgrade level to unlock this seed
        ['seed_price'] = 10,                  -- Price per unit in the market
        ['seed_weight'] = 120,                -- Weight per seed unit (kg)
    },
    ['amount_harvested_per_plant'] = 1,       -- Items received per harvested plant
    ['generates_hay'] = false,                -- Set true if harvesting this crop can generate hay bales
    ['stages'] = {
        { prop = 'your_prop_stage1', time = 120 },  -- Prop model and growth time in minutes
        { prop = 'your_prop_stage2', time = 120 },
        { prop = 'your_prop_stage3', time = 120 },
        { prop = 'your_prop_stage4', time = 0 },    -- Final harvestable stage (time = 0)
    }
},

How do I add or modify vehicles in the store?

Vehicles are split into three categories in Config.vehicles_store: tractors, harvesters, and implements. Add a new vehicle by using its spawn name as the key.

['vehicles'] = {
    ['tractors'] = {
        ['your_tractor_spawn_name'] = {
            ['name'] = 'My Tractor',
            ['price'] = 45000,
            ['img'] = 'images/vehicles/my_tractor.png',
            ['level'] = 0,           -- Required vehicles upgrade level to purchase
            ['speed'] = 80,          -- Max speed in km/h
            ['horsepower'] = 200,
        },
    },
}
โš ๏ธ

Make sure the spawn name matches a vehicle that exists in your server. If you add modded vehicles, stream them properly.


How do I add a new silo?

Silos are defined in Config.silos_store. Each silo needs a location, a grain trailer drop point, and optionally a trucker pickup location if you use the lc_truck_logistics integration.

['my_silo'] = {
    ['name'] = 'My Silo',
    ['price'] = 45000,
    ['capacity'] = 6000,                                        -- Storage capacity in kg
    ['image'] = 'images/silos/my_silo.png',
    ['location'] = { x, y, z },
    ['truck_pickup_location'] = { x, y, z, heading },           -- For trucker integration
    ['grain_trailer_location'] = { x, y, z },                   -- Where grain trailers unload
    ['level'] = 2,                                              -- Required properties upgrade level
    ['blips'] = {
        ['id'] = 473,
        ['name'] = 'My Silo',
        ['color'] = 25,
        ['scale'] = 0.6,
    }
},

How do I add a new crop store (sell location)?

Crop stores are configured in Config.crop_stores. Each store defines where players can sell their harvested crops and other farming products.

['my_crop_store'] = {
    ['menu_location'] = { x, y, z },       -- Where players stand to interact
    ['trailer_location'] = { x, y, z },    -- Where grain trailers park to sell
    ['account'] = 'bank',
    ['crops_to_sell'] = {
        "wheat", "canola", "cotton", "potato", "oat", "maize"
    },
    ['items_to_sell'] = {
        -- Additional items like fertilizer, hay bales, animal products
        {
            ['item'] = 'milk',
            ['name'] = 'Fresh Milk',
            ['price'] = 80,
            ['image'] = 'images/market/animals/milk.png',
        },
    },
    ['blips'] = {
        ['id'] = 380,
        ['name'] = 'Crop Store',
        ['color'] = 25,
        ['scale'] = 0.6,
    },
},

How do I configure contracts?

Contracts are auto-generated jobs that players can accept. They are defined in Config.available_contracts.

  • reward_per_ha sets the base reward per hectare of the contract field.
  • minutes_per_ha sets the time limit per hectare.
  • Each contract entry has a reward_multiplier and a timer_multiplier to fine-tune individual contracts.
['definitions'] = {
    ['enabled'] = true,
    ['time_to_new_contracts'] = 2,      -- Minutes between contract refreshes
    ['max_contracts'] = 10,
    ['reward_per_ha'] = 750,
    ['minutes_per_ha'] = 4,
},

Contract names and descriptions are defined in the language files (lang/en.lua). If you add a new contract entry, duplicate the matching translation keys so the name and description display correctly.

โš ๏ธ

Changes to contract definitions only apply to newly generated contracts. To apply changes immediately, empty the farming_simulator_available_contracts table in your database.


How do I configure the upgrades system?

Players earn XP while farming and level up, receiving skill points to spend on upgrades. There are six upgrade trees: vehicles, properties, crops, yield, contracts, and animals. Each tier costs points_required skill points and optionally unlocks the next level_reward.

Config.upgrades = {
    ['vehicles'] = {
        { points_required = 1, level_reward = 1, icon = 'images/upgrades/Garage_001.png' },
        { points_required = 1, level_reward = 2, icon = 'images/upgrades/Garage_002.png' },
        -- ...
    },
}

The level_reward value is the garage/field/crop tier that gets unlocked when that upgrade is purchased.


How do I configure the loan system?

Loans allow players to borrow money from the farm bank. Use Config.loans to configure payment intervals and available loan plans. Set Config.disable_loans = true to disable the feature entirely.

Config.loans = {
    ['payment_interval_hours'] = 24,  -- Payment due every 24 real hours
    ['plans'] = {
        { ['amount'] = 10000, ['interest'] = 0.05, ['repayment_days'] = 15 },
        { ['amount'] = 25000, ['interest'] = 0.08, ['repayment_days'] = 20 },
    }
}

How do I configure UI permissions for employees?

Config.roles_permissions controls what employees can do in the UI. Permissions range from 1 (any employee) to 4 (owner only).

-- 1 = Basic Access (all employees)
-- 2 = Advanced Access
-- 3 = Full Access
-- 4 = Owner only
Config.roles_permissions = {
    ['functions'] = {
        ['buyField']  = 2,   -- Only advanced+ employees can buy fields
        ['sellField'] = 3,   -- Only full access+ employees can sell fields
        ['hirePlayer'] = 4,  -- Only the owner can hire players
    },
    ['ui_pages'] = {
        ['bank'] = 1,        -- All employees can view the bank page
        ['upgrades'] = 3,    -- Only full access+ can view the upgrades page
    },
}

How do I configure animal farming?

Animals are defined in Config.animals and pens in Config.pens. Each animal has a type, a feed item, hunger drain, health drain when hungry, passive product yield, and slaughter products.

Set ['product'] = nil for animals that produce nothing passively (like pigs). Pens are type-restricted: only animals matching the pen's animal_type can be placed there.

Config.pens = {
    ['pen_example'] = {
        ['name'] = 'Example Pen',
        ['price'] = 10000,
        ['capacity'] = 4,
        ['storage_capacity'] = 20,
        ['level'] = 0,
        ['animal_type'] = 'cow',    -- Only cows can be placed in this pen
        ['image'] = 'images/animals/example_pen.png',
    },
}

How do I link the farming script with lc_truck_logistics?

Set Config.trucker_logistics['enable'] = true and ensure the lc_truck_logistics script is running. Silo owners can then create trucker jobs directly from the silo stock management page. The delivery locations and available trucks/trailers can be customised in the Config.trucker_logistics table.

Config.trucker_logistics = {
    ['enable'] = true,
    ['quick_jobs_page'] = true,         -- true = Quick jobs (rented truck), false = Freights (owned truck)
    ['available_trucks'] = { "hauler", "packer" },
    ['available_trailers'] = { "trailers", "trailers4", "docktrailer" },
    ['delivery_locations'] = {
        { 2130.11, 4777.18, 40.97, 204.07 },
    }
}

How do I configure the leaderboards?

The leaderboard tracks farming distance in four optional windows. Enable or disable each window individually under Config.leaderboards['enabled']. The season window repeats every length_days days starting from start_date.

Config.leaderboards = {
    ['enabled'] = {
        ['all_time'] = true,
        ['week'] = true,
        ['month'] = true,
        ['season'] = true,
    },
    ['season'] = {
        ['start_date'] = "2026-01-01",
        ['length_days'] = 90,
    }
}