Configuration
Road Minigolf has two config files and two hook files. None of them is overwritten by an update.config.lua only lists what servers usually change. Every other value (ball
physics, putting stance, camera feel, editor tools, timings) has its default
in shared/defaults.lua. To change one, copy the key into the matching table
of config.lua. Keys missing from config.lua always use the defaults, so
an update never breaks an older config.General
config.lua
Permissions
A player is admin (editor, import/export, admin commands) when any check matches.config.lua
- ACE (every framework)
- ESX
- QBCore
- Qbox
- Identifiers / own check
server.cfg
Keys and commands
config.lua
Config.Editor.keys.
Every command name can be changed in Config.Commands. See
Commands & Keybinds.
Notifications
config.lua
For any other script, set
Config.Notify = function(message, kind) … end in
config.lua or use the OpenHooks.Notify client hook. The
order is Config.Notify, then OpenHooks.Notify, then Config.NotifyProvider.
World
config.lua
Game
config.lua
Economy
Entry fees and rewards need ESX, QBCore, Qbox or your own money functions. Each course can override the fee and rewards in the editor.config.lua
'money' and 'cash' mean the same wallet: the script maps one to the other
for the framework it finds.- Rewards are paid only for rounds where every hole was holed. The win reward goes only to a sole winner (ties get none).
- A cooldown per player and course (
rewardCooldownMin) and a minimum round duration (minSecondsPerHole) apply. - Entry fees are refunded whenever a game is cancelled.
Society account
Entry fees of every finished game can go to a business account. Set it inconfig.server.lua:
config.server.lua
prizePot = true the fees go to the winner
instead.
Custom money functions
For any other economy, add your own functions inconfig.server.lua:
config.server.lua
Anti-cheat
The server is the referee: it counts the shots, a “holed” ball needs a counted shot and a plausible roll time, and the round is scored against the course layout captured at the start.config.lua
Flags never punish on their own. They fire the local server event
road_minigolf:server:suspicious, the OpenHooks.OnSuspicious hook and a
Discord log. Ban or warn there if you want to.Discord logs
Turn logging on inconfig.lua and put one webhook URL per category into
config.server.lua. A category without a URL logs nothing.
config.lua
config.server.lua
Editor
config.lua
Config.PropCatalog holds the editor’s prop catalog. See
Track Kit → Other props.
Sounds
Config.Sounds lists the GTA sounds for hits, the cup, walls, water, birdie,
eagle, records, the finish, errors, the countdown and lip-outs. Set one to
false to turn it off.
config.lua
Putting stance and ball physics
The putting stance (Config.Anim), the putter offset and the ball physics
(Config.Physics) have their defaults in shared/defaults.lua.
If the putter meets the ball too early or too late on your server, tune it live:
address a ball in a test, practice or solo round and type /mgputter. Change
the values with the arrow keys and PgUp / PgDn, switch groups with Tab
(putter position, putter rotation, stance, ball contact), and press Enter to
print the lines for config.lua to the F8 console. Changes are live on your
client only until you add those lines.
Hooks
server/open.lua and client/open.lua are not escrowed. Change them to fit
your server.
Server hooks
server/open.lua
Client hooks
client/open.lua
The state bag names in the shipped
CanPlay examples (isDead, isCuffed,
…) differ between scripts. Check them against the ambulance and police
scripts you run.Data files
Road Minigolf has no database. It writes JSON files intoroad_minigolf/data/:
Every store is written to two alternating files and read back byte for byte
before it is trusted. A damaged file never overwrites the last good copy, and a
failed write is retried. If no copy of a file can be read, saving that store
stays disabled and the console says so.
Courses from version 1.0 (
courses.json, scores.json) are taken over
automatically on the first start.