Configuration

9 min readUpdated 2 weeks ago

Overview

  • shared/config.lua: General settings, station definitions, recipe definitions, XP system, fixed stations, categories
  • server/config_server.lua: Discord webhook URL and log toggles

General Settings

shared/config.lua
1Config.Interaction = nil
2Config.Debug = false
3Config.Locale = 'en'
4Config.EnableStressIntegration = true
5Config.Theme = 'Default'
6Config.ShowProgression = false
7Config.MaxStationsPerPlayer = 3
8Config.DuiRenderDistance = 4.0
9Config.InteractionDistance = 2.5
  • Interaction: Interaction mode. nil = auto-detect via ml_bridge (ox_target preferred), 'target' = force the target system, 'textui' = force TextUI
  • Debug: Print debug messages to server/client console
  • Locale: Language code for translations
  • EnableStressIntegration: Adds stress via ml_hud when cooking starts. Safe to leave true even without ml_hud installed (the integration is skipped when ml_hud is not installed)
  • Theme: UI theme. Options: 'Default', 'Wasteland', 'Cyberpunk', 'Noir', 'Fantasy'
  • ShowProgression: Show the Progression tab in the station UI. Requires Config.XP.Enabled = true
  • MaxStationsPerPlayer: Maximum player-placed stations per player. Fixed stations do not count
  • DuiRenderDistance: Distance in meters at which the floating in-world DUI becomes visible. Set false to disable DUI entirely
  • InteractionDistance: Default distance for ox_target or TextUI interaction. Per-station overrides available

Hide Recipes

shared/config.lua
1Config.HideRecipes = {
2    ifMissingItems = false,
3    ifLocked = false,
4}
  • ifMissingItems: true hides recipes when the player lacks the required ingredients
  • ifLocked: true hides recipes when the player does not meet the tier/level requirement

These are global defaults. Each recipe can override with its own hideIfMissingItems / hideIfLocked field.

Categories

shared/config.lua
1Config.Categories = {
2    ['food']    = { label = 'Food',     icon = 'fas fa-drumstick-bite' },
3    ['ores']    = { label = 'Metals',   icon = 'fas fa-gem' },
4    ['medical'] = { label = 'Medical',  icon = 'fas fa-medkit' },
5    ['default'] = { label = 'General',  icon = 'fas fa-cogs' },
6}
  • label: Display name in the UI category filter
  • icon: FontAwesome icon class

Auto-Deletion

shared/config.lua
1Config.DeleteOld = 10
2
3Config.DeleteOptions = {
4    DeleteOnlyIfEmpty = true,
5    DeleteOnlyIfUnlit = true,
6    DeleteOnlyIfBroken = false,
7}
  • DeleteOld: Number of days after which inactive stations are deleted. Set false to disable
  • DeleteOnlyIfEmpty: Only delete stations with no items in cooking slots
  • DeleteOnlyIfUnlit: Only delete stations that are not currently lit/fueled
  • DeleteOnlyIfBroken: Only delete stations whose durability has reached 0
Fixed Stations Excluded

Auto-deletion only affects player-placed persistent stations. Fixed stations (with fixed_id) are never auto-deleted.

Station Definitions

Stations are defined in Config.Stations. Each key is a unique station type ID.

shared/config.lua
1['campfire'] = {
2    label = 'Campfire',
3    item = 'campfire_kit',
4    prop_unlit = 'prop_beach_fire',
5    prop_lit = 'prop_beach_fire',
6    max_fuel = 1800,
7    slots = 3,
8    cook_categories = { 'food', 'medical', 'default' },
9    persistent = false,
10    durability = 1,
11
12    spawnDistance = 50.0,
13    interactionDistance = 1.8,
14    duiRenderDistance = 3.5,
15    duiOffsetZ = 0.8,
16
17    FuelItems = {
18        ['legno'] = { required = 1, amount = 600 },
19        ['carbone'] = { required = 1, amount = 1200 },
20    },
21    RepairItems = {
22        ['corda'] = { required = 1, repair = 50 },
23    }
24},
  • label: Display name shown in the UI
  • item: Inventory item used to place the station
  • prop_unlit: GTA V prop model when the station is off
  • prop_lit: GTA V prop model when the station is on (can be the same as prop_unlit)
  • max_fuel: Maximum fuel capacity in seconds (e.g., 1800 = 30 minutes)
  • slots: Number of crafting slots. Maximum 8
  • cook_categories: List of recipe categories this station can handle
  • persistent: true saves the station to the database across restarts. false makes it temporary
  • durability: Station lifespan in hours of active use. Omit or set nil for infinite durability

Optional Station Parameters

  • spawnDistance: Distance for prop spawn/despawn via lib.points. Default: 75.0
  • interactionDistance: Distance for ox_target or TextUI. Default: Config.InteractionDistance
  • duiRenderDistance: Distance for DUI rendering. Default: Config.DuiRenderDistance
  • duiOffsetZ: Z-axis offset (height) for the DUI above the station. Default: 1.0
  • duiScale: Base scale for the DUI sprite. Default: 0.15
  • useZone: true attaches the target as a sphere zone at station coords instead of an entity target. Use when the prop has no reliable collision mesh (campfires, decals)
  • forceRadius: Radius in meters for the zone when useZone = true or when the prop-entity target is unreliable. Overrides interactionDistance for the sphere zone

Fuel Items

shared/config.lua
1FuelItems = {
2    ['legno'] = { required = 1, amount = 600 },
3    ['carbone'] = { required = 1, amount = 1200 },
4},
  • required: Number of items consumed per fuel action
  • amount: Seconds of fuel added per action

Repair Items

shared/config.lua
1RepairItems = {
2    ['corda'] = { required = 1, repair = 50 },
3    ['fiamma_ossidrica'] = { required = 1, repair = 100 },
4},
  • required: Number of items consumed per repair action
  • repair: Percentage of max durability restored per action

Recipe Definitions

Recipes are defined in Config.Recipes. Each key is a unique recipe ID.

shared/config.lua
1['grill_meat'] = {
2    category = 'food',
3    tier = 1,
4    cook_time = 15,
5    carbonize_time = 60,
6    ingredients = {
7        { name = 'carne_rossa', count = 1 },
8    },
9    results = {
10        { name = 'carne_essiccata', count = 1 },
11    }
12},
  • category: Must match one of the station's cook_categories
  • tier: XP tier required to craft (1-5). Requires Config.XP.Enabled = true to enforce
  • cook_time: Seconds to complete crafting
  • carbonize_time: Seconds after completion before the item is destroyed. The player must collect in time
  • ingredients: List of { name, count } tables for required input items
  • results: List of { name, count } tables for output items

XP System

shared/config.lua
1Config.XP = {
2    Enabled = true,
3    Provider = 'internal',
4}
  • Enabled: Enable the XP/leveling system
  • Provider: XP backend. Options:

- 'internal': Standalone, stores in ml_smelter_xp table. Works out-of-box

- 'ml_skills': Delegates to the ml_skills resource (install _INSTALL/ml_skills_crafting_tree.sql + _INSTALL/ml_skills_config_snippet.lua)

- 'devhub': Hooks into DevHub XP exports (configure DevHub section)

- 'custom': User-defined functions in open/server.lua

Internal Provider

shared/config.lua
1Internal = {
2    MaxLevel = 50,
3    XpBase = 100,
4    XpMultiplier = 1.4,
5},
  • MaxLevel: Maximum achievable level
  • XpBase: Base XP required for level 1
  • XpMultiplier: Exponential multiplier per level. Level N requires XpBase * (XpMultiplier ^ (N-1)) XP

ml_skills Provider

shared/config.lua
1MlSkills = {
2    Category = 'crafting',
3    MaxLevel = 50,
4},
  • Category: Must match the category UID configured in ml_skills Config.Categories
  • MaxLevel: Must match maxLevel in the ml_skills category config

DevHub Provider

shared/config.lua
1DevHub = {
2    AddXpExport = 'devhub_xp:addXp',
3    GetLevelExport = 'devhub_xp:getLevel',
4    MaxLevel = 50,
5},
  • AddXpExport: Export string in resource:function format for adding XP
  • GetLevelExport: Export string in resource:function format for getting player level
  • MaxLevel: Max level used for bonus calculations

XP Rewards

shared/config.lua
1Rewards = {
2    craft_start = 10,
3    craft_complete = 25,
4    fuel_added = 5,
5    repair = 5,
6},
  • craft_start: XP awarded when starting a craft
  • craft_complete: XP awarded when collecting a finished item
  • fuel_added: XP awarded when adding fuel
  • repair: XP awarded when repairing a station

Recipe XP Overrides

shared/config.lua
1RecipeXpOverride = {
2    -- ['titan_feast']        = 80,
3    -- ['forge_carbon_fiber'] = 60,
4},

Override the base XP for specific recipes by recipe ID. When a recipe ID is present in this table, the value replaces Rewards[actionType] for that action.

Tiers

shared/config.lua
1Tiers = {
2    [1] = { level = 1,  label = 'Novice',      speed = 0.00, antiCarbonize = 0.00 },
3    [2] = { level = 5,  label = 'Apprentice',   speed = 0.05, antiCarbonize = 0.08 },
4    [3] = { level = 15, label = 'Journeyman',   speed = 0.12, antiCarbonize = 0.20 },
5    [4] = { level = 25, label = 'Expert',       speed = 0.20, antiCarbonize = 0.35 },
6    [5] = { level = 40, label = 'Master',       speed = 0.30, antiCarbonize = 0.50 },
7},
  • level: Minimum player level to unlock this tier
  • label: Display name in the UI
  • speed: Cook time reduction as a fraction (0.10 = 10% faster)
  • antiCarbonize: Carbonization time extension as a fraction (0.20 = 20% longer before items burn)

Tier Bonuses Toggle

shared/config.lua
1Bonuses = {
2    speed = true,
3    antiCarbonize = true,
4},
  • speed: Enable/disable cook time reduction from tier bonuses
  • antiCarbonize: Enable/disable carbonize time extension from tier bonuses

Fixed Stations

shared/config.lua
1Config.FixedStations = {
2    {
3        id = 'main_forge_sandy',
4        stationType = 'forge',
5        coords = vec3(-1102.2462, 2689.7517, 19.3630),
6        heading = 180.0,
7        infiniteFuel = true,
8        infiniteHealth = true,
9        spawnProp = true,
10    },
11    {
12        id = 'paleto_bay_campfire',
13        stationType = 'campfire',
14        coords = vec3(-1096.6827, 2692.7454, 19.7475),
15        heading = 270.0,
16        infiniteFuel = false,
17        infiniteHealth = false,
18        spawnProp = false,
19        zoneType = 'sphere',
20        zoneRadius = 2.0,
21    },
22}
  • id: Unique string identifier. Used as fixed_id in the database
  • stationType: Must match a key in Config.Stations
  • coords: World position as vec3
  • heading: Rotation in degrees
  • infiniteFuel: true skips fuel consumption entirely. Station is always lit
  • infiniteHealth: true skips durability degradation
  • spawnProp: true spawns the prop model from the station definition. false uses an existing map prop and creates a target zone instead
  • zoneType: Zone shape when spawnProp = false. Options: 'sphere', 'box'
  • zoneRadius: Radius when zoneType = 'sphere'
  • zoneSize: Size when zoneType = 'box' (vec3)
  • zoneRotation: Rotation when zoneType = 'box'

Server Logging

server/config_server.lua
1Config.DiscordWebhook = ''
2
3Config.Log = {
4    Createpersistent = true,
5    Temporary = true,
6    Destroy = true,
7    Repair = true,
8    Addfuel = true,
9    Additem = true,
10    TakeItem = true,
11    TakeAll = true,
12    TakeAllCarbonized = true,
13}
  • DiscordWebhook: Discord webhook URL for all logs. Set empty string to disable
  • Createpersistent: Log persistent station creation
  • Temporary: Log temporary station creation
  • Destroy: Log station pickup/destruction
  • Repair: Log station repairs
  • Addfuel: Log fuel additions
  • Additem: Log items added for crafting
  • TakeItem: Log single item collection
  • TakeAll: Log batch item collection
  • TakeAllCarbonized: Log carbonized item collection

Set any log to false to disable that log entirely.