r_gravedigging Configuration
r_gravedigging config: framework and integrations, digging, the metal detector, loot, the priest, funerals, open graves, ghosts, the fence and police alerts.
All settings live in shared/config.lua. Restart the resource after changing it. Cemeteries and
graves are in shared/config_graves.lua.
General
R.Framework = 'auto' -- 'auto' | 'esx' | 'qb' | 'qbox'
R.Inventory = 'auto' -- 'auto' | 'ox_inventory' | 'qb-inventory' | 'quasar' | 'framework'
R.Target = 'none' -- 'auto' | 'ox_target' | 'qb-target' | 'none' (key prompt) | 'custom' (edit BridgeCustomTarget in bridge/cl_target.lua)
R.Notify = 'auto' -- 'auto' | 'ox_lib' | 'esx' | 'qb' | 'okok' | 'quasar' | 'codesign'
R.TextUI = 'gta' -- 'gta' | 'ox_lib' | 'okok' | 'qb' | 'jg' | 'cd' | 'esx' | 'custom' (edit BridgeTextUI in bridge/cl_textui.lua)
R.Meters = 'rscripts' -- 'rscripts' | 'gta' | 'custom' (edit BridgeMeters in bridge/cl_meters.lua), the depth / noise bars
R.Dispatch = 'auto' -- 'auto' | 'cd_dispatch' | 'ps-dispatch' | 'qs-dispatch' | 'rcore_dispatch' | 'core_dispatch' | 'tk_dispatch' | 'lb-tablet' | 'linden' | 'op' | 'custom' | 'none'
R.Locale = '' -- '' = ox:locale convar, or 'en' / 'fi'
R.Debug = false
R.UI = {
Accent = '#9a27ea',
}Prompt, bars and custom target
R.Target = 'none' shows a key prompt at the grave. R.TextUI picks how that prompt looks. For
custom, edit BridgeTextUI in bridge/cl_textui.lua.
R.Meters is the depth and noise bars while digging. 'rscripts' shows pills at the bottom of the
screen in your Accent colour, 'gta' shows GTA's timer bars. For 'custom', fill in
BridgeMeters.Show(bars) and BridgeMeters.Hide() in bridge/cl_meters.lua. Each bar has
label, value (0-1), warn and icon.
R.Target = 'custom' is for any other target script: fill in BridgeCustomTarget in
bridge/cl_target.lua with AddBoxZone, AddModels, AddEntity and Remove. Each option has
name, label, icon, distance, canInteract and onSelect.
The bridge/ folder is open, so you can edit it freely.
Money and police
R.Money = {
dirty = false, -- true = pay every cash reward as dirty money
dirtyItem = 'auto', -- 'auto' = ESX black_money, qb-inventory markedbills, ox/qs black_money item, or an item name
}
R.Police = {
jobs = { 'police', 'sheriff' },
onDutyOnly = true,
canRob = true, -- false = on-duty police can't dig graves
}Digging
R.Dig = {
police = 0, -- police needed to dig
item = 'shovel', -- item needed to dig, false = none
strokes = 10, -- clean strokes to finish the dig
misses = 4, -- missed strokes before you give up, 0 = never
window = 0.22, -- seconds you may be early or late on a stroke
searchTime = 6, -- seconds searching the grave
cooldown = 30, -- minutes before a dug grave can be dug again
breakChance = 50, -- % the shovel breaks when you give up
alarmChance = 20, -- % someone calls the police on a dig
noise = 10, -- extra % to the police and the priest for every missed stroke
}Raise window to make the rhythm easier, lower it to make it harder.
Metal detector
R.Detector = {
enabled = true,
weapon = 'WEAPON_METALDETECTOR',
stashes = 3, -- graves hiding valuables at the same time
respawn = 15, -- minutes before a dug stash is buried in another grave
finds = 6, -- small finds buried in the grass between the graves, 0 = none
findRespawn = 10, -- minutes before a dug find is buried somewhere else
chest = 10, -- % of finds that are a treasure chest instead of a metal box, uses R.Loot.chest
range = 60.0, -- metres where the lights start to react
}Hold the detector and aim (right mouse) inside the cemetery. The lights and beeps get faster as you get closer. A stash is in a grave, so dig that grave. A find is in the grass: press E on top of it to dig it up by hand.
Loot
Every item rolls its own % chance, so one dig can give several items or nothing.
R.Loot = {
rare = { 'diamond' }, -- these items get the rare find alert
grave = {
items = {
{ name = 'gold_tooth', chance = 50, amount = { 1, 3 } },
{ name = 'old_coin', chance = 40, amount = { 1, 3 } },
{ name = 'wedding_ring', chance = 25, amount = { 1, 1 } },
{ name = 'pocket_watch', chance = 8, amount = { 1, 1 } },
{ name = 'pearl_necklace', chance = 5, amount = { 1, 1 } },
{ name = 'diamond_earrings', chance = 4, amount = { 1, 1 } },
{ name = 'diamond_ring', chance = 2, amount = { 1, 1 } },
{ name = 'diamond', chance = 1, amount = { 1, 1 } },
},
},
stash = {
money = { 300, 900 },
items = { --[[ same shape ]] },
},
}| Table | Used for |
|---|---|
grave | A normal grave with a coffin |
stash | A grave the detector points to, money is a cash range |
fresh | A grave right after a funeral |
empty | An open grave without a coffin |
find | A small find in the grass |
chest | A treasure chest find, money is a cash range |
Priest
R.Priest = {
enabled = true,
model = 'cs_priest',
weapon = 'WEAPON_BAT',
chance = 33, -- % the priest comes running after a dig
lifetime = 80, -- seconds before he gives up and is removed
}Funerals
R.Funeral = {
enabled = true,
every = 90, -- minutes between funerals
ceremony = 4, -- minutes the mourners stay at the grave
fresh = 30, -- minutes the grave stays fresh after they leave
strokes = 5, -- clean strokes to dig a fresh grave
mourners = 6,
tip = true, -- the fence texts everyone who dug a grave or sold to him since the restart
}Digging any grave during the ceremony calls the police. After it the grave is marked with a rose
and pays from R.Loot.fresh.
Open graves
R.Pits = { -- open graves at Hill Valley, the map ships inside this resource
enabled = true, -- false = no open pits, graves are dug with the mud effect on the vanilla ground
coffin = 60, -- % of open graves that hold a coffin, the rest are empty and use R.Loot.empty
}Grave dirt and ghosts
R.Dirt = {
enabled = true,
duration = 20, -- minutes the grave dirt stays on you, 0 = until you wash
water = true, -- swimming washes it off
}
R.Ghost = {
enabled = true,
chance = 10, -- % a ghost rises from a grave dug at night
from = 21, -- night starts (game hour)
to = 5, -- night ends
time = 25, -- seconds the ghost haunts the grave
}The fence
R.Fence = {
enabled = true,
police = 0,
model = 's_m_y_autopsy_01',
scenario = 'WORLD_HUMAN_SMOKING',
coords = vec4(237.30, -1356.60, 30.53, 219.88),
refresh = 60, -- minutes between price changes, 0 = fixed until restart
blip = false,
tip = true, -- the fence texts you when you leave the cemetery with loot
waypoint = true, -- and marks the spot on your GPS
phone = 'gta', -- 'gta' | 'lb-phone' | 'custom' (edit Bridge.Phone in bridge/cl_bridge.lua)
items = {
{ name = 'gold_tooth', price = { 40, 80 } },
{ name = 'old_coin', price = { 60, 120 } },
--[[ ... ]]
{ name = 'diamond', price = { 1500, 2500 } },
},
}The fence stands behind the morgue in Strawberry. Each item sells for a random price in its range,
rolled again every refresh minutes.
Police alerts
R.Alarm = {
delay = { 10, 25 }, -- seconds before the police get the call
cooldown = 120, -- seconds before the same cemetery can call again
blip = { sprite = 59, colour = 1, scale = 1.2, time = 120 },
}R.Dispatch = 'auto' finds your dispatch script. The alert texts are in client/cl_custom.lua
(and server/sv_custom.lua for lb-tablet). Use 'custom' there for any other script.
Blips, admin, logs and security
R.Blips = {
enabled = true,
sprite = 310,
colour = 39,
scale = 0.9,
}
R.Admin = {
command = 'gravedigging',
group = { 'group.admin', 'group.god' },
}
R.Logs = {
enabled = true,
type = 'webhook', -- 'webhook' (set it in server/sv_custom.lua) | 'ox_lib'
showIp = false,
}
R.Security = {
interactDistance = 2.5,
requestCooldown = 500, -- ms
}Cemeteries and graves
shared/config_graves.lua holds the cemetery: its id, label, blip, the priest's spot and
the graves list. Each grave is a vec4 of the headstone and its heading.
The 45 Hill Valley graves match the open graves map, so leave them as they are. You can add a
cemetery of your own with your own vec4 spots. Its graves are dug with the mud effect, and the
detector, funerals, the priest and ghosts work there too. Use /gravedigging spots to see where
each dig spot lands.