Kartik Scripts

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" }
}
SettingWhat it does
StanceCostPrice (in $) charged for each stancing adjustment.
StanceRequirementsItems 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

ItemPriceLabel
engine_box_tier1$5,000Stage 1 Engine Box
engine_box_tier2$10,000Stage 2 Engine Box
engine_box_tier3$20,000Stage 3 Engine Box
piston_repair_kit$500Basic Repair Kit
cleaningkit$100Cleaning 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.

PropertyWhat it does
idUnique identifier for this store location.
shopTypeWhich ShopSystems inventory this store uses (e.g. 'mechanic_parts').
coordsThe world position and heading for the NPC ped (vec4(x, y, z, heading)).
pedModelThe model name of the NPC shopkeeper.
targetLabelThe text shown when targeting/approaching the NPC.
iconIcon for the target interaction.
blip.spriteMap blip icon ID.
blip.colorMap blip color ID.
blip.scaleMap blip size.
blip.labelMap 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.

On this page