Skip to content

Configuration ​

Everything is in shared/config.lua and shared/config/. All files are shared (client and server), so nothing secret goes in there. Money is whole dollars; world distances are metres, displayed distances are yards on GTA's golf scale (Config.YardsPerMetre). With np_admin running, the main tunables are also on its Resource settings page under Golf (see Editable in np_admin).

File What
shared/config.lua Locale, bridges, integrations, course scale, play rules (meter, putting, shot clock, turn order, difficulty), wind, security, clubhouse and cart barn, caddie job, betting limits, phone app, UI material
shared/config/course.lua The nine holes (tee, pin, par, stroke index, name, green slope), water hazards, boundary, course rating and slope, green speed
shared/config/clubs.lua Clubs (loft, carry, roll, apex, family), head styles, shot shapes, lofts, lies
shared/config/balls.lua Ball items
shared/config/economy.lua Green fees, member and twilight factors, cart, range, membership, caddie fees, stakes, payee, items
shared/config/formats.lua Formats, house-rule defaults, side bets, prop bets
shared/config/natives.lua Every GTA asset name (see Built on GTA's own golf)
shared/np_admin_settings.lua The settings editable live in np_admin

Core ​

Option Default Description
Config.Debug false Debug output
Config.Locale 'en' 'en' or 'de', for Lua and web strings
Config.Framework 'auto' 'esx', 'qbx', 'qb', 'standalone', or auto-detect (es_extended → qbx_core → qb-core → standalone)
Config.Inventory 'auto' 'np_inventory', 'ox', 'qb', 'esx', 'none', or auto-detect (np_inventory first; none = rental bag only)
Config.UseNpPayments … Config.UseNpCharacter 'auto' One switch per sibling: UseNpPayments, UseNpHud, UseNpPhone, UseNpMenu, UseNpInventory, UseNpDiscord, UseNpDrugs, UseNpCharacter. 'auto' = used while started, true = always, false = never. See Bridges & integrations
Config.DiscordChannel 'golf' np_discord log channel name
Config.YardsPerMetre 2.0 GTA's golf minigame shows about twice the world distance; 2.0 keeps real-world club carries on the real course
Config.AutoCreateTables true Create the tables at start
Config.Scale 'auto' NUI zoom: 'auto' = max(.75, innerHeight / 1080)
Config.Material 'server' 'server' (np_admin theme), 'frosted' or 'liquid'
Config.StandaloneMoney { cash = 500, bank = 5000 } In-memory wallet without a framework
Config.Phone { appId = 'fairway', name = 'Fairway', tint = 'green', icon = 'fa-solid fa-golf-ball-tee' } The np_phone app
Config.Security { rpcPerSecond = 12, flagPerfectStreak = 9 } Global RPC budget per player; this many "Perfect" snaps in a row are flagged to staff

Play ​

Config.Play:

Option Default Description
addressDistance 3.0 Metres from the ball to address it
serverSlack 6.0 Server-side tolerance between ped and ball
maxGroup 4 Players per group
shotTimeout 90 Seconds a player has once it is their turn (then a warning, then pick up)
pickupAfter 2 Pick up allowed after double par (strokes over par)
maxStrokes 10 Hard cap per hole (scored as picked up)
dropGrace 180 Seconds a disconnected player keeps their place
courseRadius 450.0 Leaving this far from the clubhouse ends your round (walk-off)
meter.riseMs 1150 Backswing time from 0 to 100 % power
meter.maxPower 1.15 Top of the over-swing zone (100–115 %)
meter.returnFactor 1.0 Downswing speed relative to the backswing
meter.zoneMs 48 Half-width of the snap zone at forgiveness 1.0
meter.minClickGap, meter.maxTotalMs 90, 7000 Click gaps the server refuses as impossible, and the longest swing
meter.perfectWithin 0.18 Share of the zone that counts as "Perfect" (+3 % distance)
putt.holdMs 1600 Hold time for a full putting meter
putt.maxFeetMin, putt.meterScale 10, 1.6 Meter scale: max(maxFeetMin, distance × meterScale) feet
putt.gimme 3 Default auto-gimme radius in feet when the house rule is on
difficulty 'normal' Share of the break line shown: 'easy' 0.75, 'normal' 0.45, 'hard' 0.2
turnOrder 'away' 'away' (farthest from the hole plays) or 'ready' (ready golf)
practiceHole 1 The range: free practice on this hole

Config.Wind = { min = 0.0, max = 7.5, changeEvery = 420, gust = 0.25 }: wind in m/s, rolled by the server every changeEvery seconds and shared through GlobalState.npGolfWind.

World ​

Option Default Description
Config.Clubhouse coords = vector3(-1366.49, 56.64, 54.09), radius = 2.0, blip sprite 109 The pro shop desk with the tee sheet, and its blip
Config.CartBarn enabled = true, coords = vector4(-1349.83, 136.44, 56.24, 4.5), model = 'caddy', returnRadius = 12.0 Where carts are handed out. The position is approximate: adjust it for your map
Config.SuppressNativeScripts { 'golf', 'golf_mp', 'launcher_golf', 'golf_ai_foursome', 'golf_ai_foursome_putting' } Rockstar's golf scripts, terminated every 15 s

Caddie ​

Config.Caddie:

Option Default Description
enabled true The caddie job
job false false lets anyone go on duty at the clubhouse; a job name (e.g. 'caddie') requires that framework job
maxRating 5 Stars per rating
xpPerRound 10 XP per round caddied
levels { 0, 30, 70, 120, 180, 260, 350, 460, 590, 740 } XP for Lv 1 … Lv 10
perks { yardage = 1, power = 3, reader = 5, steady = 7, tour = 10 } Level each perk unlocks at. See Caddies
npc { enabled = true, model = 'a_m_y_golfer_01' } The club NPC caddie (Lv 1 tips) when no player is on duty

Betting ​

Config.Betting:

Option Default Description
enabled true Betting at all
privateOnly false true: no spectator odds board, only in-group games
dailyLimit 5000 Most a player may stake per day (players can set a lower one)
maxStakePerMarket 1000 Most per spectator bet
propExpiry 40 Seconds to accept a prop bet
margin 0.05 Club margin on the odds board
lossStreakCooldown { losses = 5, minutes = 30 } Cooldown after a loss streak
breakChoices { 1, 7, 30 } Days offered for take a break
forfeitOnLeave 'forfeit' Leaving mid-round: 'forfeit' (opponents win the open bets) or 'refund'
simulations 1500 Monte Carlo runs per odds refresh

Course (course.lua) ​

lua
{ n = 5, par = 4, si = 3, name = 'Vinewood View',
  tee = vector4(-1098.00, 67.96, 53.01, 221.8), pin = vector3(-957.44, -90.39, 39.22),
  green = { slope = { dir = 180, pct = 1.6 } } },
Field Description
id, label, sub 'lsgc', Los Santos Golf Club, Richman
rating, slope 9-hole course rating (35.2) and slope (118), for the handicap differentials. An 18-hole loop uses twice the rating
stimp Base green speed in feet (10.5); it varies by ±1 per day
greenRadius, teeRadius, fairwayWidth Defaults per hole (world metres)
cupRadius, captureSpeed Cup size and the speed above which a ball lips out
holePreviewOrigin Origin of the mini@golfhole_preview camera animations
holes[] n, par, si (stroke index), name, tee (with heading), pin, green = { slope = { dir, pct }, radius? }
water[] Penalty areas as 2D outlines: ball at rest inside = drop, one stroke
boundary The playable area: ball at rest outside = stroke and distance

The tee and pin positions are GTA's, averaged from two open-source reproductions. The pins match the golfflags flags, so they don't move daily. Fairway corridors and green radii are gameplay approximations; green slopes are configured until staff measure them with /golfsurvey.

Hole Name Par Stroke index
1 Richman Opener 5 5
2 Pond Carry 4 1
3 The Short One 3 9
4 Lakeside Bend 4 7
5 Vinewood View 4 3
6 Turn for Home 3 8
7 Long Pond 4 2
8 The Long Way Back 5 4
9 Clubhouse Finish 4 6

Clubs, shapes and lies (clubs.lua) ​

Config.Clubs.list[key]: label, short, loft, carry (stock carry in yards at 100 % power, clean strike, flat lie, no wind), roll (share of carry), apex (share of carry), family (wood, iron, wedge, putt: the animation set) and prop. The bag order is dr 3w 5w 4h 5i 6i 7i 8i 9i pw gw sw lw pt, from the driver (245 yd) to the lob wedge (70 yd). maxInBag = 14, rentalSet = 'stock'.

Head styles (Config.Clubs.sets) are trade-offs, not upgrades:

Set Label Forgiveness (snap zone) Shaping Spin Distance
stock Club rental 1.10 0.90 0.95 0.97
cavity Cavity back 1.25 0.80 0.95 1.00
blade Forged blade 0.85 1.25 1.10 1.00
tour Tour players 0.95 1.10 1.05 1.03

Config.Shapes (draw, straight, fade: curve, roll) and Config.Lofts (low, mid, high: apex, roll, wind, carry) shape the flight. Config.Lies sets per lie a distance multiplier, extra dispersion, roll and the displayed percentage:

Lie Distance Dispersion Shown
Tee 1.00 1.00 100 %
Fairway 0.97 1.05 95 %
Fringe 0.95 1.05 92 %
Green 0.95 1.00 100 %
Rough 0.80 1.35 80 %
Bunker 0.60 1.60 60 % (sand wedge × 1.35)
Cart path 0.95 1.10 95 %
Water, out of bounds – – penalty 1

Balls (balls.lua) ​

Key Item Label Effect
tour golf_ball_tour Tour X More spin, checks on greens
distance golf_ball_distance Distance Soft +2 % carry, rolls out
glow golf_ball_glow Glow For twilight rounds

Without a ball item the player hits a range ball (Config.Balls.rental). With loseBalls = true a ball that ends in water or out of bounds removes one ball item.

Economy (economy.lua) ​

Option Default Description
currency '$' Currency symbol
account 'bank' Framework account for fees and holds without np_payments
payee { type = 'society', id = 'golfclub' } Where fees go (np_payments payee); nil = nowhere
society 'golfclub' Framework fallback society (esx_addonaccount society_<name>)
greenFee { nine = 150, eighteen = 260, twilight = 0.75, member = 0.70 } Green fees; twilight and member are multipliers
twilightFrom 18 In-game hour twilight prices start
cart, rangeBucket 30, 10 Per cart seat; range bucket
rentalClubs 0 Included in the green fee; set a price to charge for the rental bag
membership { price = 2500, days = 30, bookAhead = 3 } Membership
caddie { minFee = 20, maxFee = 400, defaultFee = 80, maxTipPct = 25 } Caddie fees and the tip cap
stakes { min = 5, max = 1000 } Per skin and per side bet
clubCutPrivate 0.0 Club cut on in-group games
lostBall true Lost balls cost a ball item
hioPayout 5000 Paid by one hole-in-one insurance item on an ace
wearPerRound 2 Club wear per round

Config.Items names the items (see Items & the bag); Config.Items.esxSet = 'cavity' is the set a golf_bag stands for on the ESX inventory.

Formats and bets (formats.lua) ​

Option Description
Config.Formats.order, .list stroke, match, skins, stableford, bestball with label, icon, sub, min and max players, stake (skins)
Config.Formats.stableford Net-to-par → points: -3 5, -2 4, -1 3, 0 2, +1 1, else 0
Config.Formats.skinsSplitLastHole true: a tie on the last hole splits the pot (else refunded)
Config.HouseRules Defaults the host can change per group: handicaps = true, gimme = 3 ft (0 = off), mulligans = 0 per 9, spectators = true, carts = true, allowance = 0.95
Config.SideBets match, nassau, ctp (par 3s only), longdrive (fairway only, holes 5 and 8), sandy, greenie
Config.PropBets updown, par, onePutt

See Clubhouse & tee sheet and Betting & escrow.

Native assets (natives.lua) ​

Config.Native holds every game asset: animation dictionaries and clips per club family, props and bones, the cart and NPC model, the IPL, particles, sounds and banks, collision-material hashes → lie, and a few tuned values:

Option Default Description
trail.native false Use Rockstar's GOLF_TRAIL_* natives for the aim preview. Their parameters are undocumented, so the dotted preview drawn with markers is the default
minimap true SET_MINIMAP_GOLF_COURSE(hole) while playing a hole
stance per prop Where the ped stands relative to the ball (right, back in metres), from community reproductions
impact 0.42 (putt 0.38) The impact moment as a share of the action clip

Editable in np_admin ​

shared/np_admin_settings.lua registers Golf in np_admin's Resource settings with the categories General (language, material, debug, yards per metre), Play (turn order, break line, shot clock, max strokes, reconnect grace, meter speed, snap zone, max wind), Fees (green fees, member and twilight factors, cart, range, membership), Betting (on/off, in-group only, daily limit, max stake, club margin, leaving the course), Caddie (on/off, required job, XP per round) and Integrations (one switch per sibling, the Discord log channel). See Concepts → Settings in np_admin.