Configuration
Every option in STG Treasure Map config.lua, from map sizes, treasure spots and rewards to the dealer and buyer NPCs, digging and notifications.
All settings live in stg-treasuremap/config.lua. The file stays editable in the escrow version. Restart the resource after a change.
Framework
Config.Framework = "auto"Prop
Type
Language
Config.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, fi, ar, he, jp, zh. To change a text, edit the matching file in stg-treasuremap/locales/. The web part of each file holds the texts of the treasure menu.
Leave the Config.Locales = {} line as it is, the locale files fill it.
Interaction
Config.Target = falseProp
Type
The target options are set up in stg-treasuremap/client/editable/target.lua, which also stays editable in the escrow version.
Treasure dealer
Config.Npc = {
coord = vec4(459.5453, -691.4997, 26.6403, 33.1487),
npc = "cs_joeminuteman",
blip = {
label = "Treasure Seller",
sprite = 587,
scale = 0.7,
color = 5,
visible = true
}
}The NPC that opens the treasure menu, where players buy maps and the shovel with cash.
Prop
Type
Reward buyer
Config.Sell = {
coord = vec4(-592.5034, -886.3603, 24.9268, 92.4546),
npc = "s_m_y_dockwork_01",
blip = {
label = "Sell Treasure Rewards",
sprite = 587,
scale = 0.7,
color = 1,
visible = true
}
}The NPC that buys rewards. It takes every item listed in Config.TreasureItems from the player at once and pays its price per item in cash. The fields work the same as in the treasure dealer.
Maps
Config.Maps = {
["small"] = {
number = 1,
price = 2500
},
["medium"] = {
number = 2,
price = 5000
},
["large"] = {
number = 3,
price = 7500
}
}Prop
Type
A character holds one map at a time. If a player buys a new map while the old one still has spots left, the menu warns them first. Buying again confirms it, and the new spots replace the old ones. The map item is taken away when its last spot is dug up.
Treasure spots
Config.TreasurePoints = {
vec3(768.6719, 415.0298, 141.7109),
vec3(1482.0098, 1168.7344, 114.9551),
vec3(2353.2983, 2586.6448, 46.6676),
vec(1440.2585, 1091.1105, 114.4058),
vec3(1220.2814, 1841.1409, 79.2155),
vec3(1261.7784, 2727.4353, 38.4492),
}Places where treasure can be buried. Keep at least as many spots as the largest map reveals.
Saved maps point to spots by their position in this list. Add new spots at the end, and do not remove or reorder spots while players still have unfinished maps.
Digging
Config.ChestModel = "xm_prop_x17_chest_closed"
Config.Shovel = 5000
Config.Distance = 15
Config.ProgressBar = "lib"
Config.digTime = {
found = 8000,
not_found = 2000
}Prop
Type
Items
Config.Items = {
small = "treasure_map_small",
medium = "treasure_map_medium",
large = "treasure_map_large",
shovel = "shovel",
}Item names for the three maps and the shovel. The small, medium and large keys must match the keys in Config.Maps. Every item in this list is registered as a usable item.
Rewards
Config.TreasureItems = {
["goldbar"] = {
chance = 25,
price = 500,
amount = {
min = 1,
max = 2
}
},
["diamond_ring"] = { chance = 25, price = 1500, amount = { min = 1, max = 2 } },
["diamond"] = { chance = 25, price = 1000, amount = { min = 1, max = 2 } },
["goldchain"] = { chance = 25, price = 300, amount = { min = 1, max = 2 } },
}Every dug up spot gives one of these items. The key is the item name.
Prop
Type
To add a reward, add a new entry with the item name as the key and create the item in your inventory.
Notifications
Config.CustomNotify = true
Config.Functions = {
["helpNotify"] = function(message, icon) ... end,
["hideHelpNotify"] = function() ... end,
["notify"] = function(type, message) ... end,
}With Config.CustomNotify = true, the E prompts use the ox_lib text UI and messages use ox_lib notifications. With false, the prompts use the GTA help text and messages use your framework's notifications.
Prop
Type
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.