NPC Parts Shop
📄 Config file: shared/shop_config.lua
This file configures NPC merchants that sell mechanic parts to players, vehicle stancing costs, and store locations on the map.
Stancing Configuration
Config.StanceCost = 500
Config.StanceRequirements = {
{ item = 'suspension_parts', count = 1, label = "Suspension Kit" }
}| Setting | What it does |
|---|---|
StanceCost | Price (in $) charged for each stancing adjustment. |
StanceRequirements | Items the mechanic needs in their inventory to perform a stancing job. Each entry requires an item name, count, and label. |
Shop Inventories
Config.ShopSystems = {
['mechanic_parts'] = {
label = "Mechanic Parts Store",
items = { ... }
}
}Each shop system defines a store type with a label and an items list. Multiple store locations can share the same shop system.
Default Items, Mechanic Parts Store
| Item | Price | Label |
|---|---|---|
engine_box_tier1 | $5,000 | Stage 1 Engine Box |
engine_box_tier2 | $10,000 | Stage 2 Engine Box |
engine_box_tier3 | $20,000 | Stage 3 Engine Box |
piston_repair_kit | $500 | Basic Repair Kit |
cleaningkit | $100 | Cleaning Kit |
To add more items to the shop, add new entries to the items table with an item (inventory name), price, and label. You can also create entirely new shop types by adding a new key to Config.ShopSystems.
Store Locations
Config.StoreLocations = {
{
id = 'main_mechanic_store',
shopType = 'mechanic_parts',
coords = vec4(473.1, -1310.2, 29.2, 120.0),
pedModel = 's_m_m_doctor_01',
targetLabel = "Talk to Merchant",
icon = 'wrench',
blip = { sprite = 52, color = 3, scale = 0.8, label = "Mechanic Merchant" }
}
}Each store location spawns a ped and creates a map blip.
| Property | What it does |
|---|---|
id | Unique identifier for this store location. |
shopType | Which ShopSystems inventory this store uses (e.g. 'mechanic_parts'). |
coords | The world position and heading for the NPC ped (vec4(x, y, z, heading)). |
pedModel | The model name of the NPC shopkeeper. |
targetLabel | The text shown when targeting/approaching the NPC. |
icon | Icon for the target interaction. |
blip.sprite | Map blip icon ID. |
blip.color | Map blip color ID. |
blip.scale | Map blip size. |
blip.label | Map blip text label. |
You can add as many store locations as you like, each one can use the same shopType or a different one. This lets you have specialised stores in different parts of the map.