Ludo: config files
These files stay readable in every build (escrow too), so you can change them. Shown as shipped in version 1.1.1.
config.lua
lua
Config = {}
-- ════════════════════════════════════════════════════════════════════════════
-- Lumo Ludo — configuration
-- Everything a server owner normally changes is at the top.
-- ════════════════════════════════════════════════════════════════════════════
-- Framework is detected automatically: qbx_core, qb-core, es_extended, or none.
-- Force one with 'qbx' | 'qb' | 'esx' | 'standalone'.
Config.Framework = 'auto'
-- Target is detected automatically: qb-target first, then ox_target, else a built-in [E] prompt.
-- Force one with 'ox' | 'qb' | 'none'.
Config.Target = 'auto'
-- Developer commands and console output. Keep false on a live server.
Config.Debug = false
-- ── Players ─────────────────────────────────────────────────────────────────
Config.Command = 'ludo' -- opens the lobby while standing at a board
Config.LeaderboardCommand = 'ludoboard'
Config.TableDistance = 1.8 -- metres from a board to play
Config.AllowSolo = true -- play against 1-3 AI players
Config.AllowSpectators = true
Config.JoinDistance = 0.0 -- >0 = joiners must be this close to the host
Config.FillEmptyWithAI = true -- host starts early: empty seats get an AI player
Config.AutoStartWhenFull = true -- start as soon as every seat is taken
-- Seconds a player has to roll or move. When it runs out the game plays the
-- turn for them; after AfkLimit timeouts in a row they are removed.
Config.TurnSeconds = 20
Config.AfkLimit = 3
-- After a roll with only one possible move (or several identical ones) the
-- token moves by itself.
Config.AutoMove = true
-- ── Rules ───────────────────────────────────────────────────────────────────
Config.Rules = {
exitOn = { 6 }, -- rolls that bring a token out of the yard, e.g. { 1, 6 }
extraOnSix = true, -- a 6 gives another roll
threeSixes = true, -- a third 6 in a row loses the turn
extraOnCapture = true, -- capturing gives another roll
extraOnHome = true, -- getting a token home gives another roll
stars = true, -- the 4 star squares are safe (start squares always are)
blocks = false, -- 2+ tokens of one colour on a square can't be passed or landed on
endOnFirst = true, -- false = keep playing for 2nd and 3rd place
}
-- ── Games ───────────────────────────────────────────────────────────────────
-- Every table plays 'ludo', 'snl' (Snakes & Ladders) or 'both' (the host picks
-- when creating a game). Placed tables choose theirs in /ludotables; tables
-- saved before 1.1.0 and Config.Tables entries without `games` use this.
Config.DefaultTableGames = 'ludo'
-- The board a 'both' table shows while nobody plays there: 'ludo' or 'snl'.
Config.BothIdleBoard = 'ludo'
-- Snakes & Ladders rules. One token each; the move is automatic after the roll.
Config.Snl = {
exactFinish = true, -- need the exact roll to land on 100
bounceBack = false, -- with exactFinish: an overshoot walks back from 100 instead of not moving
extraOnSix = true, -- a 6 gives another roll
threeSixes = true, -- a third 6 in a row loses the turn
endOnFirst = true, -- false = keep playing for 2nd and 3rd place
}
-- Challenge another player through the target eye (needs ox_target or qb-target).
-- If you are hosting a game that hasn't started they join it; otherwise a new
-- two-player game starts.
Config.Challenge = {
enabled = true,
tableDistance = 2.8, -- both players must be this close to the same board
playerDistance = 3.0,
timeoutSeconds = 15,
}
-- Optional cash stake: every player pays `amount` when the game starts, the
-- winner takes the pot. Players who leave or go AFK lose their stake. Never
-- applied to games with AI players. Ignored on standalone servers.
Config.Bet = {
enabled = false,
amount = 150,
account = 'cash', -- 'cash' or 'bank' (ESX 'money' is mapped automatically)
}
-- Chance the winner also receives an item. Item names must exist in your inventory.
Config.WinReward = {
enabled = false,
chance = 25,
items = {
{ item = 'water_bottle', amount = 1 },
{ item = 'sandwich', amount = 1 },
},
}
-- ── Admin table placement ───────────────────────────────────────────────────
-- /ludotables opens the admin panel. Place a table + 4 chairs with the fly
-- camera and the gizmo, pick models, save. Tables are stored in the database
-- (created automatically) and spawned, with their board, for everyone within
-- spawnDistance. tableModel 'none' = play on an existing world/MLO table.
-- The board is 0.58 m square: pick a table at least ~0.8 m across.
Config.Admin = {
command = 'ludotables',
permissions = { 'admin', 'god' }, -- QBCore/Qbox groups, ESX groups ('admin', 'superadmin')
ace = 'command', -- or anyone allowed this ACE (txAdmin admins have it)
maxPlaceDistance = 40.0, -- admin must stand this close to what they save
spawnDistance = 80.0,
tableModels = {
{ model = 'apa_mp_h_din_table_04', label = 'Round dining table' },
{ model = 'prop_table_03', label = 'Café table' },
{ model = 'prop_chateau_table_01', label = 'Chateau table' },
{ model = 'none', label = 'None (use a world table)' },
},
-- yaw: extra prop rotation; stock GTA chairs face -Y, hence 180.
-- sitZ: lift the seated ped this many metres for that chair model.
chairModels = {
{ model = 'apa_mp_h_din_chair_08', label = 'Dining chair', yaw = 180.0, sitZ = 0.47 },
{ model = 'ch_prop_casino_chair_01a', label = 'Casino chair', yaw = 180.0, sitZ = 0.08 },
{ model = 'bkr_prop_clubhouse_chair_01', label = 'Clubhouse chair', yaw = 180.0, sitZ = 0.08 },
{ model = 'prop_chair_01a', label = 'Plastic chair', yaw = 180.0, sitZ = 0.05 },
{ model = 'none', label = 'None (use world chairs)', yaw = 0.0 },
},
chairGap = 0.42, -- auto-arrange: metres from the table edge to each chair
}
-- ── AI players ──────────────────────────────────────────────────────────────
-- NPCs seated in the AI players' chairs (local peds; everyone sees the same person).
Config.BotPeds = {
'a_m_y_business_02', 'a_f_y_business_02', 'a_m_m_indian_01', 'a_f_y_indian_01',
'a_m_y_hipster_02', 'a_f_y_hipster_02', 'a_m_m_bevhills_02', 'a_f_m_bevhills_01',
'a_m_y_vinewood_03', 'a_f_y_vinewood_02',
}
Config.BotNames = { 'Asha', 'Bikash', 'Kiran', 'Nisha', 'Rohan', 'Sunita', 'Prakash', 'Anita' }
Config.BotSitZ = 0.0 -- extra lift for NPCs only (their sit clip differs slightly)
Config.Bot = {
rollDelay = 1100, -- ms an AI "thinks" before rolling
moveDelay = 900, -- ms between its roll landing and its move
}
-- ── Seating ─────────────────────────────────────────────────────────────────
Config.SeatPlayers = true -- sit players in their chair when they take a seat
Config.SeatZOffset = 0.0 -- raise (+) / lower (-) every seated player, in metres
-- ── Animation timing (the server waits for these before the next turn) ──────
Config.Timing = {
rollMs = 900, -- die toss
hopMs = 140, -- one square of a token's walk
captureMs = 450, -- a captured token flying home
ladderMs = 650, -- Snakes & Ladders: climbing a ladder
snakeMs = 1100, -- Snakes & Ladders: sliding down a snake
passMs = 1300, -- "no move" pause before the turn passes
}
-- ── 3D board ────────────────────────────────────────────────────────────────
-- A streamed board with real tokens and a die sits on every placed table.
-- While you play, a DUI page becomes the board face (highlights, names, turn
-- timer, result) and you click tokens with the mouse; Space rolls.
-- Mouse wheel / V switches between the close view and the whole-table view.
-- Backspace twice leaves. The game is 3D only: without the streamed props
-- (stream/) /ludo says the board is not loaded instead of starting.
Config.Table3D = {
camHeight = 0.95, -- close view: metres above the board top
camBack = 0.70, -- close view: pulled back over your chair
camSway = false,
lightIntensity = 0.0, -- no added lamp/glare; raise slightly only for dark interiors
camFov = 48.0,
overview = { height = 1.8, back = 1.9, aim = 0.0, fov = 52.0 },
startView = 'focus', -- 'focus' or 'overview' when you sit down
surfaceOffset = 0.0, -- nudge if the board sinks into (-) or floats above (+) the table
fallbackHeight = 0.45, -- table height above coords.z if the surface ray misses
boardYawOffset = 0.0, -- extra board rotation (90 steps) if a table needs it
hoverColour = { 182, 243, 106, 255 },
leaveKey = 194, -- Backspace; press twice within 3 s to leave
rollKey = 22, -- Space
diceGrabRadius = 1.1, -- picking radius in board cells: hold die, shake/drag, release to throw
startKey = 191, -- Enter: the host starts the game
debugGrid = false, -- draw grid coordinates on the face (orientation check)
faceFlipU = false,
faceFlipV = false,
debugCommand = 'ludo3dtest', -- scripted demo (Config.Debug only)
snlDebugCommand = 'snl3dtest', -- Snakes & Ladders demo: a ladder, a snake, a win (Config.Debug only)
}
Config.CamHideHud = true -- hide HUD/minimap while the board camera is active
-- ── Fixed tables (optional) ─────────────────────────────────────────────────
-- Admin-placed tables are the normal way. To hard-code tables instead, set
-- UseConfigTables = true and add entries (chairs are vector4 with the sit
-- heading, clockwise: 1 red, 2 green, 3 yellow, 4 blue; games is optional,
-- 'ludo' | 'snl' | 'both', default Config.DefaultTableGames):
-- {
-- coords = vector3(x, y, z), size = vec3(1.4, 1.4, 1.0), heading = 0.0, blip = true, games = 'both',
-- chairs = { vector4(...), vector4(...), vector4(...), vector4(...) },
-- },
Config.UseConfigTables = false
Config.Tables = {}
if not Config.UseConfigTables then Config.Tables = {} end
Config.ShowBlips = false
Config.ShowMarkers = false
Config.BlipSprite = 680
Config.BlipColour = 25
Config.BlipName = 'Ludo Table'
-- Config.Debug only: /ludotablehere prints your position for Config.Tables.
Config.DevPlaceCommand = 'ludotablehere'