Carrom: config files
These files stay readable in every build (escrow too), so you can change them. Shown as shipped in version 1.0.0.
config.lua
lua
Config = {}
-- ════════════════════════════════════════════════════════════════════════════
-- Lumo Carrom — configuration
-- ════════════════════════════════════════════════════════════════════════════
-- Framework: 'auto' | 'qbx' | 'qb' | 'esx' | 'standalone'. Target: 'auto' | 'ox' | 'qb' | 'none'.
Config.Framework = 'auto'
Config.Target = 'auto'
-- Developer commands and console output. Keep false on a live server.
Config.Debug = false
-- ── Players ─────────────────────────────────────────────────────────────────
Config.Command = 'carrom' -- opens the lobby while standing at a board
Config.LeaderboardCommand = 'carromboard'
Config.TableDistance = 1.8
Config.AllowSolo = true -- play against 1 or 3 AI players
Config.AllowSpectators = true
Config.JoinDistance = 0.0
Config.FillEmptyWithAI = true -- host starts early: empty seats get an AI player
Config.AutoStartWhenFull = true
-- Seconds a player has for one shot. When it runs out the game shoots for
-- them; after AfkLimit timeouts in a row they are removed.
Config.TurnSeconds = 30
Config.AfkLimit = 3
Config.DefaultTableGames = 'carrom'
Config.BothIdleBoard = 'carrom'
Config.Carrom = {
minSpeed = 0.45, -- m/s at zero power
maxSpeed = 4.2, -- m/s at full power
chargeMs = 1400, -- hold time from zero to full power (it swings back after)
botTries = 10, -- AI shots simulated per turn (more = stronger, slower)
botAimError = 0.035, -- radians of random aim error on AI shots (0 = perfect)
-- physics = { decel = 1.35, coinBounce = 0.92, railBounce = 0.70, strikerMass = 15.0 },
}
-- Invite another player through the target eye.
Config.Challenge = {
enabled = true,
tableDistance = 2.8,
playerDistance = 3.0,
timeoutSeconds = 15,
}
-- Optional cash stake: every player pays `amount` when the game starts, the
-- winning side shares the pot. Never applied to games with AI. Ignored on standalone.
Config.Bet = {
enabled = false,
amount = 200,
account = 'cash',
}
Config.WinReward = {
enabled = false,
chance = 25,
items = {
{ item = 'water_bottle', amount = 1 },
},
}
-- ── Admin table placement ───────────────────────────────────────────────────
-- /carromtables: place a table + 4 chairs with the fly camera and the gizmo.
-- The board is 0.86 m square: pick a table at least ~0.9 m across, or 'none'
-- with a low world table.
Config.Admin = {
command = 'carromtables',
permissions = { 'admin', 'god' },
ace = 'command',
maxPlaceDistance = 40.0,
spawnDistance = 80.0,
tableModels = {
{ model = 'apa_mp_h_din_table_04', label = 'Round dining table' },
{ model = 'prop_chateau_table_01', label = 'Chateau table' },
{ model = 'prop_table_03', label = 'Café table' },
{ model = 'none', label = 'None (use a world table)' },
},
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,
}
-- ── AI players ──────────────────────────────────────────────────────────────
Config.BotPeds = {
'a_m_m_indian_01', 'a_f_y_indian_01', 'a_m_y_business_02', 'a_f_y_business_02',
'a_m_y_hipster_02', 'a_f_y_hipster_02', 'a_m_m_bevhills_02', 'a_f_m_bevhills_01',
}
Config.BotNames = { 'Asha', 'Bikash', 'Kiran', 'Nisha', 'Rohan', 'Sunita', 'Prakash', 'Anita' }
Config.BotSitZ = 0.0
Config.Bot = {
thinkMs = 1200, -- ms an AI "lines up" before shooting
}
Config.SeatPlayers = true
Config.SeatZOffset = 0.0
Config.Timing = {
settleMs = 700, -- pause after the coins stop before the next turn
}
-- ── 3D board ────────────────────────────────────────────────────────────────
-- Slide the striker with the mouse, click, aim, hold the left button and
-- release to shoot. Wheel / V: close or whole-table view. Backspace twice leaves.
Config.Table3D = {
camHeight = 0.95,
camBack = 0.62,
camSway = false,
lightIntensity = 0.0, -- no added lamp/glare; raise slightly only for dark interiors
camFov = 50.0,
aim = 0.12, -- close view looks this far past the board centre
overview = { height = 1.6, back = 1.5, aim = 0.0, fov = 52.0 },
startView = 'focus',
surfaceOffset = 0.0,
fallbackHeight = 0.45,
boardYawOffset = 0.0,
hoverColour = { 182, 243, 106, 255 },
leaveKey = 194,
startKey = 191,
faceFlipU = false,
faceFlipV = false,
debugCommand = 'carrom3dtest',
}
Config.CamHideHud = true
-- ── Fixed tables (optional) ─────────────────────────────────────────────────
-- chairs: vector4 with the sit heading, clockwise: 1 (-Y edge), 2 (-X), 3 (+Y), 4 (+X).
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 = 'Carrom Table'
Config.DevPlaceCommand = 'carromtablehere'