Configuration Files
sh_config.lua
Config = {}
Config.ItemLabels = {}
Config.Default = {
traderMenuName = "mine_trader_menu",
sellMenuName = "mine_trader_menu_sell",
buyMenuName = "mine_trader_menu_buy",
repairMenuName = "mine_mod_menu_repair",
modMenuName = "mine_mod_menu",
modMenuAddName = "mine_mod_menu_add",
modMenuRemoveName = "mine_mod_menu_remove",
inventoryKey = 0xC1989F95, -- Inventory system opening key (used to disable in certain situations like repairs, etc.)
minePrompts = {
strike = "Strike Mine Spot",
broken = "Strike Mine Spot | ~COLOR_RED~Pickaxe Broken"
},
putAwayPromptLabel = "Put Away Pickaxe",
-- LEFT MOUSE BUTTON: https://github.com/femga/rdr3_discoveries/blob/master/Controls/README.md
['pickaxe'] = 5.0, -- Price to buy
['mining_journal'] = 12.5, -- Price to buy
},
['rock'] = 0.1, -- Price to sell
['coal'] = 0.5, -- Price to sell
['iron'] = 1.5, -- Price to sell
['emerald'] = 2.5, -- Price to sell
['diamond'] = 5.5, -- Price to sell
},
min = 1,
max = 2
}
}
Config.MiningJournal = {
name = "mining_journal",
label = "Mining Journal",
description = "This well-worn journal tracks your mining progress. Record your discoveries, uncover valuable insights, and enhance your mining skills as you delve deeper into the earth.",
image = "https://i.imgur.com/1QT8zdw.png",
header = "Welcome to Your Mining Journal!",
text = "<p>Greetings, {name}! This is your personal mining journal, a companion on your journey through the depths of the earth. Inside it, you will faithfully record your mining exploits, treasure discoveries, and adventures as you go through your journey.</p><p>Within these pages, you will find your progress, the ores you collect, and the captivating stories of the mines you explore. As you level up in specific mines, you will unveil more of their unique tales.</p><p>Your journal is more than just notes; it's a testament to your expertise and dedication. When you become an expert in a mine, it will reveal all its hidden secrets.</p><p>Embrace your pickaxe, commence your journey, and let this journal be your constant guide and legacy in the mining world. Document your experiences, claim your riches, and become a legend of the excavation arts.</p><p>May your mining adventures be filled with excitement and prosperity, and may this Mining Journal be your steadfast companion throughout your epic quest.</p>"
},
image = "https://i.imgur.com/WFDMbqJ.png",
header = "Item Selling History",
searchPlaceholder = "Search for items..",
totalAmountSold = "Total Amount Sold",
totalMoneyMade = "Total Money Made"
}
}
Config.Pickaxe = {
equipped = false,
itemId = nil,
metadata = nil,
itemName = "pickaxe",
min = 0.25,
max = 0.5
},
max = 9
},
object = nil,
prompt = nil,
putAwayPrompt = nil,
minWithMods = 8, -- Minimum amount that the mash can become even with any amount of mods on a pickaxe
min = 18,
max = 34,
-- Do not touch this
required = 0,
value = 0
}
},
dict = "amb_work@world_human_pickaxe@wall@male_d@idle_a",
name = "idle_b",
flag = 1
},
dict = "amb_work@world_human_box_pickup@1@male_a@stand_exit_withprop",
name = "exit_front",
flag = 1,
duration = 4500
}
}
Config.MineTraders = {
{
name = "annesburg_mines_trader",
prompt = {
label = "Annesburg Mines Trader",
data = {} -- Don't touch this variable :)
},
menu = {
title = "Annesburg | Mining Trader",
align = 'top-right',
subtext = ''
},
blip = { -- Blip on map
enabled = true,
label = "Annesburg Mining Trader",
location = vector3(2795.3, 1347.28, 73.13),
sprite = -1633216922,
handle = nil
},
ped = {
enabled = true,
model = "loansharking_asbminer_males_01",
spawnDistance = 100,
location = vector4(2795.3, 1347.28, 73.13, 269.22), -- x, y, z, heading / w
handle = nil,
pickaxeHandle = nil
},
marker = {
location = vector3(2796.23, 1347.34, 73.13),
offset = -0.45, -- How much to drop marker down
displayDistance = 50, -- View distance
size = 1.5, -- Default Size
colour = {
r = 255,
g = 0,
b = 0
}
},
buyItems = Config.Default.buyItems,
sellItems = Config.Default.sellItems
}
}
Config.ModStations = {
{
name = "annesburg_mod_station",
prompt = {
label = "Annesburg Pickaxe Mod Station",
data = {} -- Don't touch this variable :)
},
repair = {
enabled = true,
prompt = {
label = "Repair Pickaxe",
},
cancel = {
enabled = true,
key = "INPUT_MINIGAME_QUIT", -- BACKSPACE
prompt = nil
},
menu = {
title = "Annesburg | Pickaxe Repair",
align = 'top-right',
subtext = ''
},
itemsPerDurability = { -- For every 1 durability the item is down, these items will be used, rounded to nearest whole number.
['coal'] = 0.35,
['iron'] = 0.5,
['wood'] = 0.05
},
timePerDurability = {
minimumTime = 15, -- Minimum time to repair pickaxes, value below is an addition to this one (example: pickaxe is on 30 durability, 15 + 0.4*70)
value = 0.2, -- For every 1 durability the item is down, this value will be used (example: pickaxe is on 30 durability, 0.4*70), rounded to nearest whole number
}
},
modMenu = {
title = "Annesburg | Mod Station",
align = 'top-right',
subtext = ''
},
blip = { -- Blip on map
enabled = true,
label = "Annesburg Pickaxe Mod & Repair Station",
location = vector3(2800.01, 1350.47, 73.13),
sprite = 552659337,
handle = nil
},
object = {
model = "p_furnace01x",
spawnDistance = 100,
location = vector4(2799.86, 1350.72, 73.13, 179.39), -- x, y, z, heading / w
dimensions = {
pickaxeLocation = nil,
pickaxeRotation = nil,
min = nil,
max = nil
},
handle = nil
},
job = { -- Enable / Disable job locking
enabled = true,
value = "blacksmith"
},
marker = {
location = vector3(2799.97, 1349.5, 73.13),
offset = -0.49, -- How much to drop marker down
displayDistance = 50, -- View distance
size = 1.5, -- Default Size
colour = {
r = 150,
g = 0,
b = 100
}
},
}
}
-- List of items that can be modded into pickaxe
-- Put these items into a crafting table and make them require exotic items to craft
Config.ModificationItems = {
{
-- TITANIUM | CRAFTING RECIPE FOR BLACKSMITHS:
-- 1x exotic_ilmenite_ore
-- 50x iron ore / iron
-- 50x coal
name = "mod_titanium", -- Item name
label = "Titanium", -- Item label
description = "Enhances your mining technique, reducing the number of strikes required to mine resources - modifies pickaxe head.", -- Item description
applyTime = 75000,
metadata = {
value = 4,
text = "-%s Strikes"
},
colour = "~COLOR_BLUE~",
hex = "56A8D3",
handles = {
mashCount = function(thisMod, modCount, currentCount)
return math.max(currentCount - (thisMod.metadata.value * modCount), Config.Pickaxe.mash.minWithMods)
end
}
},
{
-- TUNGSTEN CARBIDE | CRAFTING RECIPE FOR BLACKSMITHS:
-- 1x exotic_tungsten_ore
-- 50x carbon ore / carbon
-- 50x coal
name = "mod_tungsten_carbide", -- Item name
label = "Tungsten Carbide", -- Item label
description = "Mining becomes more precise, resulting in an extra valuable item from each successful strike - modifies pickaxe edge.", -- Item description
applyTime = 75000,
metadata = {
value = 1,
text = "+%s Gems Per Mine"
},
colour = "~COLOR_BLUELIGHT~",
hex = "A7D0E5",
handles = {
maxItems = function(thisMod, modCount, currentCount)
return currentCount + (thisMod.metadata.value * modCount)
end
}
},
{
-- CASTED VANADIUM | CRAFTING RECIPE FOR BLACKSMITHS:
-- 1x exotic_vanadium_ore
-- 50x coal
name = "mod_casted_vanadium", -- Item name
label = "Casted Vanadium", -- Item label
description = "Amplifies your tool durability, allowing you to extract resources more effectively - modifies pickaxe head.", -- Item description
applyTime = 75000,
metadata = {
value = 1,
text = "%sx as Durable"
},
colour = "~COLOR_YELLOWSTRONG~",
hex = "F7E36D",
handles = {
durability = function(thisMod, modCount, min, max)
local count = thisMod.metadata.value * modCount
return min/count, max/count
end
}
}
}
-- These items will be inserted into all mines (that dont have exotics disabled) and will have a chance to be given when the player mines, unless disabled in the mine through the variable `disableExotics`
Config.ExoticItems = {
{
name = "exotic_ilmenite_ore",
label = "Perfect Ilmenite Ore",
description = "A perfect piece of Ilmenite Ore, useful for creating a stronger pickaxe head."
},
{
name = "exotic_tungsten_ore",
label = "Perfect Tungsten Ore",
description = "A perfect piece of Tungsten Ore, useful for making a pickaxe's edge sharper."
},
{
name = "exotic_vanadium_ore",
label = "Perfect Vanadium Ore",
description = "A perfect piece of Vanadium Ore, useful for alloying a pickaxe head to make it more efficient."
}
}
Config.MinePoints = {
{
name = "random_cave", -- Backend variable
label = "Random Cave", -- Label to display on players screen
description = "Explore the mysterious depths of the Random Cave, an underground labyrinth filled with secrets and treasures waiting to be discovered. Venture through winding tunnels, uncover hidden passages, and face formidable challenges as you journey deeper into this enigmatic subterranean world. Be prepared for unexpected encounters, and use your wits to navigate the complex network of caverns. Your quest for riches and knowledge begins here, in the heart of the Random Cave.", -- Mine description, make it a little bit long for progression
image = "https://i.imgur.com/o6sFQWC.png", -- Direct image link of the mine, used in journal entries
maxItems = 3, -- How many max items you can receive per strike (pickaxe mods will use this value)
disableExotics = false, -- Disable exotic drops from this mine?
items = {
-- Variables below can be tables and a random item from that rarity will be chosen
guaranteed = "rock",
common70 = "coal",
common50 = "iron",
"emerald",
},
rare5 = {
"diamond",
}
},
levels = {
[1] = {
label = "Beginner"
},
[2] = {
label = "Novice",
strikes = 200,
ores = {
['coal'] = 100,
['iron'] = 75,
}
},
[3] = {
label = "Advanced",
strikes = 500,
ores = {
['coal'] = 250,
['iron'] = 150,
['emerald'] = 75,
}
},
[4] = {
label = "Expert",
strikes = 750,
ores = {
['coal'] = 400,
['iron'] = 250,
['emerald'] = 100,
['diamond'] = 50,
}
}
},
points = {
randomLuckySpots = true, -- Have random lucky spots every restart?
displayDistance = 50,
marker = {
size = 1.5,
colour = {
r = 100,
g = 255,
b = 0
},
activeColour = {
r = 255,
g = 55,
b = 55
}
},
{ coords = vector4(2796.1, 1344.02, 71.37, 1.6), offset = -0.9 },
vector4(2801.09, 1344.25, 70.3, 29.55),
vector4(2798.25, 1344.13, 70.32, 1.49),
}
}
},
}
local FetchExoticItems = function()
local toReturn = {}
for _, itemData in pairs(Config.ExoticItems) do
table.insert(toReturn, itemData.name)
end
return toReturn
end
for pointIndex, pointData in pairs(Config.MinePoints) do
if not pointData.disableExotics and not pointData.items.exotic then
Config.MinePoints[pointIndex].items.exotic = FetchExoticItems()
end
local newPoints = {}
for _, coordsData in pairs(pointData.points.values) do
local coordItem = {}
local lucky = pointData.points.randomLuckySpots and RandomBoolean() or false
if type(coordsData) ~= "table" then
coordItem = {
coords = coordsData,
lucky = lucky
}
else
coordItem = {
coords = coordsData.coords,
lucky = coordsData.lucky or lucky
}
if coordsData.offset then
coordItem.offset = coordsData.offset
coordItem.coords = vector4(coordItem.coords.x, coordItem.coords.y, coordItem.coords.z + coordItem.offset, coordItem.coords.w)
end
end
table.insert(newPoints, coordItem)
end
Config.MinePoints[pointIndex].points.values = newPoints
end
for stationIndex, stationData in pairs(Config.ModStations) do
local objectCoords = stationData.object.location
if GetModelDimensions then -- Prevent server side error since file is shared & native doesn't exist on server side
local min, max = GetModelDimensions(GetHashKey(stationData.object.model))
local headingVector = vector3(0, 1, 0)
local pickaxeZ = (objectCoords.z + min.z) + 0.15
local pickaxeLocation = vector3(
objectCoords.x + (0.05 * math.sin(math.rad(pickaxeZ))),
objectCoords.y - (1.8 * math.cos(math.rad(pickaxeZ))),
pickaxeZ
)
Config.ModStations[stationIndex].object.dimensions.min = min
Config.ModStations[stationIndex].object.dimensions.max = max
Config.ModStations[stationIndex].object.dimensions.pickaxeLocation = pickaxeLocation
Config.ModStations[stationIndex].object.dimensions.pickaxeRotation = {
pitch = math.deg(math.asin(headingVector.z / #headingVector)),
roll = math.deg(math.atan(headingVector.y, headingVector.x)),
yaw = 90.0
}
end
end
end)
sh_language.lua
Language = {
dollar = "$",
open = "Open",
cancel = "Cancel",
buy = "Buy",
of = "of",
dateFormat = "%B %Y @ %I:%M %p",
journal = {
item = "Item(s)",
price = "Price",
date = "Date",
mine = "Mine",
owner = "Owner",
mineDiscovered = "Mine Discovered",
lastMined = "Last Mined",
highestAmount = "Highest Amount of Ores Found at Once",
pickaxeStrikes = "Pickaxe Strikes",
oresFound = "Ores Found",
currentLevel = "Your current level in this mine is",
nextLevelRequirements = "next level requirements",
maxLevel = "you are at the max level!",
luckySpots = "This mine has %s lucky spots, which are: %s",
canGiveUpTo = "This mine can give up to %s max items, including:",
nothingHere = "There is nothing here..",
nothingDescription = "This journal has no mining entires. Begin mining to write down some things into it..",
discovered = "You discovered a new mine: ~COLOR_GOLD~%s~COLOR_WHITE~!",
minesDiscovered = "Mines Discovered",
lastUpdated = "Last Updated",
completed = "Completed",
more = "More"
},
mining = {
pickaxeHasBroken = "~COLOR_WHITE~Your pickaxe has ~COLOR_RED~broken~COLOR_WHITE~..",
couldntCarry = "Couldn't carry ~COLOR_GOLD~%s~COLOR_WHITE~, your inventory is full.",
youFound = "~COLOR_WHITE~You found: ~COLOR_GOLD~%s",
youFoundExotic = "~COLOR_GOLD~You found an exotic item!",
youFoundNothing = "~COLOR_WHITE~You found ~COLOR_RED~nothing~COLOR_WHITE~."
},
mods = {
needToHaveToMod = "You need to have a pickaxe in your hands to modify it..",
needToRepairToMod = "You need to repair this pickaxe before modifying it..",
nothingToDo = "There is nothing for you to do on this pickaxe..",
applying = "Applying %s to Pickaxe..",
removing = "Removing %s from Pickaxe..",
cancel = "Cancel Modification",
addMods = "Add Mods",
removeMods = "Remove Mods",
apply = "Apply",
remove = "Remove",
successfullyAdded = "You ~COLOR_GOLD~successfully ~COLOR_WHITE~added ~COLOR_GOLD~%s~COLOR_WHITE~ to this pickaxe!",
successfullyRemoved = "You ~COLOR_GOLD~successfully ~COLOR_WHITE~removed ~COLOR_GOLD~%s~COLOR_WHITE~ from this pickaxe!",
noRoomToCarry = "You do not have enough room to carry the ~COLOR_RED~%s",
},
pickaxe = {
broken = "Pickaxe Broken",
durability = "Durability:",
max = "Max",
modifications = "Modifications",
noModifications = "No Modifications"
},
repair = {
needToHaveToRepair = "You need to have a pickaxe in your hands to repair it..",
requiresNone = "This pickaxe requires no repairs..",
missingItems = "You are missing ~COLOR_GOLD~%s ~COLOR_WHITE~more to repair this pickaxe..",
repairingPickaxe = "Repairing Pickaxe..",
cancelRepair = "Cancel Repair",
requiredItems = "Required Items:",
repairPickaxe = "Repair Pickaxe",
youAreMissing = "You are missing ~COLOR_RED~%s ~COLOR_WHITE~more to repair this pickaxe..",
successfullyRepaired = "The pickaxe has been ~COLOR_GOLD~successfully ~COLOR_WHITE~repaired!"
},
trader = {
stares = "The trader stares at you and says nothing..",
buyItems = "Buy Items",
buyItemsDescription = "Purchase items from this trader",
sellItems = "Sell Items",
sellItemsDescription = "Sell items to this trader",
haveNothing = "You have nothing this trader wants..",
pricePerItem = "Price Per Item",
totalPrice = "Total Price",
sellAllItems = "Sell All Items | $%s",
sellAllItemsDescription = "Sell all your items on you for $%s",
youPurchased = "You purchased a ~COLOR_GOLD~%s ~COLOR_WHITE~for ~COLOR_GOLD~$%s",
youDontHaveAny = "You do not have any ~COLOR_GOLD~%s ~COLOR_WHITE~in your inventory.",
notEnoughMoney = "You do not have enough money to purchase: ~COLOR_GOLD~%s",
notEnoughRoom = "You do not have any room in your inventory to carry: ~COLOR_GOLD~%s",
youSold = "You sold ~COLOR_GOLD~%sx %s ~COLOR_WHITE~for ~COLOR_GOLD~$%s",
youSoldAll = "You sold ~COLOR_GOLD~%s ~COLOR_WHITE~for ~COLOR_GOLD~$%s"
}
}
Last updated
Was this helpful?