Store

The store configuration defines purchasable items, categories, pricing, stock levels, and level requirements for the house robbery equipment shop.

Overview

The store system allows players to purchase tools, equipment, and consumables using coins earned from house robberies. Items are organized into categories and have level requirements, stock limitations, and dynamic pricing.

Item Configuration

Items are the core purchasable products in the store:

lockpick = {
    description = 'A basic tool for picking locks',
    price = 50,
    category = 'tools',
    stock = 10,
    levelRequired = 1
},
[item_name]requiredstring
The unique identifier for the item. Must match the item name in your inventory system.
descriptionrequiredstring
A descriptive text explaining what the item does or its purpose.
pricerequirednumber
The cost in coins to purchase one unit of this item.
categoryrequiredstring
The category this item belongs to. Must match a category defined in the categories section.
stockrequirednumber
The initial stock amount available for purchase. Stock decreases with purchases and can be replenished.
levelRequiredrequirednumber
The minimum skill level required to purchase this item.

Category Configuration

Categories organize items into logical groups for better navigation:

tools = {
    name = 'Tools',
    icon = 'fas fa-wrench'
},
[category_id]requiredstring
The unique identifier for the category. Used to assign items to this category.
namerequiredstring
The display name shown in the store interface.
iconrequiredstring
Font Awesome icon class for visual representation of the category.

Complete Configuration Example

return {
    items = {
        lockpick = {
            description = 'A basic tool for picking locks',
            price = 50,
            category = 'tools',
            stock = 10,
            levelRequired = 1
        },
    },

    categories = {
        tools = {
            name = 'Tools',
            icon = 'fas fa-wrench'
        },

        equipment = {
            name = 'Equipment',
            icon = 'fas fa-shield-alt'
        },

        consumables = {
            name = 'Consumables',
            icon = 'fas fa-flask'
        },
        
        upgrades = {
            name = 'Upgrades',
            icon = 'fas fa-star'
        }
    }
}