Mining, gold panning, and stone washing for RedM RSGCore servers.
Cloned from jp-mining by JackP; adapted and extended for ST-Resources.
| Resource | Purpose |
|---|---|
rsg-core |
Player data, item management |
ox_lib |
Zones, progress bars, notifications |
rsg-inventory |
ItemBox display when items are added/removed |
- Copy the
st-miningfolder intoresources/[custom]/. - Add to
server.cfg:ensure st-mining - Add all items listed in
shared/items.luato yourrsg-core/shared/items.lua. - Copy the item images from
ST-IMAGESinto yourrsg-inventory/html/imagesfolder.
No database import required — st-mining has no SQL tables.
These items must exist in your rsg-core shared items table:
| Item | useable |
Notes |
|---|---|---|
pickaxe |
true |
Triggers mining |
goldpan |
true |
Triggers gold panning |
stone |
true, shouldClose = true |
Dropped by common mines; triggers washing |
gold_ore |
— | Dropped by gold mines |
goldflakes |
— | Reward from gold panning |
iron_ore |
— | Washing reward |
copper_ore |
— | Washing reward |
silver_ore |
— | Washing / rare mine reward |
coal |
— | Washing / rare mine reward |
- Player enters a mine zone (sphere centred on the mine's
blipcoordinate). - Player uses the pickaxe item from their inventory.
- A 10-second pickaxe animation plays.
- The server rolls against the mine-type chance and awards items:
- common →
stone(stamped with the mine's ID as metadata) - gold →
gold_ore - rare → random item from
Config.RareItems
- common →
- If
Config.PickaxeBreak = true, there is aConfig.BreakChance% chance the pickaxe is destroyed.
- Player stands in water (any river/stream).
- Player uses the goldpan item.
- A 5-second progress bar runs.
- Success chance is
Config.GoldFlakeChance% normally, orConfig.HotspotChance% inside a hotspot river zone. - On success the player receives
goldflakes(1–3 outside a hotspot, 2–8 inside).
- Player collects stone from a common mine (stone is stamped with the mine's ID).
- Player stands in water and uses the stone item.
- A 5-second progress bar runs.
- The stone is consumed and the player receives one ore item.
- Which ore is determined by the mine-specific weighted loot table (
washingDrops) on the mine that produced the stone. If the stone has no metadata the fallbackConfig.WashingItemspool is used.
Config.CommonChance = 80 -- % chance to receive stones from a common mine swing
Config.GoldChance = 65 -- % chance to receive gold ore from a gold mine swing
Config.RareChance = 50 -- % chance to receive a rare item from a rare mine swingConfig.GoldFlakeChance = 15 -- % success chance outside a hotspot river
Config.HotspotChance = 50 -- % success chance inside a hotspot riverConfig.Pickaxe = 'pickaxe' -- Item name for the pickaxe
Config.PickaxeBreak = true -- Enable pickaxe breaking
Config.BreakChance = 10 -- % chance for the pickaxe to break per swing
Config.Goldpan = 'goldpan' -- Item name for the gold pan
Config.GoldpanItem = 'goldflakes' -- Item awarded when panning succeedsConfig.CommonItems = 'stone' -- Item dropped by common mines
Config.GoldItems = 'gold_ore' -- Item dropped by gold mines
Config.RareItems = { -- One picked at random for rare mines
'silver_ore', 'gold_ore', 'coal',
}
Config.WashingItems = { -- Fallback pool when stone has no mine metadata
'iron_ore', 'copper_ore', 'silver_ore', 'coal',
}Hotspots are polygon zones that give a higher gold panning success rate.
Config.Hotspots = {
{
label = 'Kamassa River', -- Display name (informational)
id = 'kamassa_river', -- Unique zone ID
coords = { vector2(...), ... }, -- Polygon vertices (vector2 list)
minZ = 43.87, -- Bottom of the zone
maxZ = 53.66, -- Top of the zone
},
...
}The zone extends ±20 units beyond minZ/maxZ in both directions to handle uneven terrain.
Config.Mines = {
{
label = 'Grizzlies Mine', -- Map blip label
id = 'grizzlies_mine', -- Unique ID (also stored in stone metadata)
blip = vector3(...), -- World position: blip + zone centre
showBlip = true, -- Show on map (false = hidden/secret)
radius = 80.0, -- Detection sphere radius in metres
type = 'common', -- 'common' | 'gold' | 'rare'
washingDrops = { -- Weighted loot table (common mines only)
{ item = 'iron_ore', weight = 65 },
{ item = 'coal', weight = 25 },
{ item = 'copper_ore', weight = 10 },
},
},
...
}washingDrops is only used for type = 'common' mines. Weights are relative — 65/25/10 means 65%, 25%, 10% of the total.
- Add an entry to
Config.Minesinconfig.lua. - Choose a
type:'common'— dropsstone; define awashingDropstable for washing loot'gold'— dropsgold_ore'rare'— drops a random item fromConfig.RareItems
- Set
showBlip = falsefor hidden/secret locations. - Changes take effect on next resource start.
- Record polygon corner coordinates in-game.
- Add an entry to
Config.Hotspotswithcoords(vector2 list),minZ, andmaxZ. - The zone detection thickness auto-expands ±20 units, so
minZ/maxZonly need to roughly bracket the water surface.