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

circle-info

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

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.

circle-info

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.

Last updated