Bagh-Chal: config files
These files stay readable in every build (escrow too), so you can change them. Shown as shipped in version 1.0.1.
config.lua
lua
Config = {}
-- ════════════════════════════════════════════════════════════════════════════
-- Lumo Bagh-Chal — 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 = 'baghchal' -- opens the lobby while standing at a board
Config.LeaderboardCommand = 'baghchalboard'
Config.UseCommandAnywhere = false -- true = /baghchal works away from boards
Config.TableDistance = 1.6 -- metres from a board to play
Config.AllowSolo = true -- play against the AI
Config.AllowSpectators = true
Config.JoinDistance = 0.0 -- >0 = joiners must be this close to the host
Config.CaptureToWin = 5 -- tigers win after capturing this many goats
Config.TotalGoats = 20 -- goats placed before the movement phase
-- Challenge another player through the target eye (needs ox_target or qb-target).
Config.Challenge = {
enabled = true,
tableDistance = 2.6, -- both players must be this close to the same board
playerDistance = 3.0,
timeoutSeconds = 15,
}
-- Optional cash stake: both players pay `amount`, the winner takes the pot.
-- Refunded if a player leaves early. Never applied to games against the AI.
-- 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 ───────────────────────────────────────────────────
-- /baghchaltables opens the admin panel. Place a table + 2 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.
Config.Admin = {
command = 'baghchaltables',
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 = 'prop_table_03', label = 'Café table' },
{ model = 'apa_mp_h_din_table_04', label = 'Round dining 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 opponent ─────────────────────────────────────────────────────────────
-- NPC seated in the AI's chair (local ped; 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.BotSitZ = 0.0 -- extra lift for NPCs only (their sit clip differs slightly)
-- ── Seating ─────────────────────────────────────────────────────────────────
Config.SeatPlayers = true -- sit players in their chair when a game starts
Config.SeatZOffset = 0.0 -- raise (+) / lower (-) every seated player, in metres
-- ── 3D board ────────────────────────────────────────────────────────────────
-- A streamed wooden board with real tiger and goat pieces sits on every placed
-- table. While you play, a DUI page becomes the board face (lines, highlights,
-- names, goats left, captures, turn, result) and you click points with the mouse.
-- Mouse wheel / V switches between the close view and the whole-table view.
-- Backspace twice leaves. enabled = false falls back to the 2D NUI board.
Config.Table3D = {
enabled = true,
camHeight = 0.86, -- close view: metres above the board top
camBack = 0.66, -- close view: pulled back over your chair
camSway = false,
camFov = 45.0,
overview = { height = 1.7, back = 1.8, aim = 0.0, fov = 50.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
rowGap = 0.035, -- metres from the board edge to the goats-left / captured rows
hoverColour = { 182, 243, 106, 255 },
dropMs = 200, flyMs = 320, slideMs = 250, jumpMs = 350, captureMs = 300,
leaveKey = 194, -- Backspace; press twice within 3 s to leave
debugPoints = false, -- number the 25 points on the face (orientation check)
faceFlipU = false,
faceFlipV = false,
debugCommand = 'baghchal3dtest', -- scripted demo (Config.Debug only)
}
-- Fallback camera for the 2D board (Table3D.enabled = false).
Config.TopDownCamera = true
Config.CamHeight = 2.5
Config.CamBack = 0.8
Config.CamFov = 45.0
Config.CamSway = true
Config.CamHideHud = true -- hide the 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):
-- {
-- coords = vector3(x, y, z), size = vec3(1.2, 1.2, 1.0), heading = 0.0, blip = true,
-- chairs = { vector4(...), vector4(...) },
-- },
Config.UseConfigTables = false
Config.Tables = {}
if not Config.UseConfigTables then Config.Tables = {} end
Config.ShowBlips = false
Config.ShowMarkers = false
Config.BlipSprite = 679
Config.BlipColour = 25
Config.BlipName = 'Bagh-Chal Board'
-- Spawn props at fixed Config.Tables (admin tables spawn their own).
Config.SpawnProps = false
Config.Prop = {
tableModels = { 'prop_table_03', 'prop_table_06', 'prop_table_01' },
chairModels = { 'prop_chair_01a', 'prop_chair_01b', 'v_ilev_chair01' },
chairCount = 2,
radius = 0.7,
chairYaw = 0.0,
}
-- Config.Debug only: /baghchaltablehere prints your position for Config.Tables.
Config.DevPlaceCommand = 'baghchaltablehere'