infoConfig.Stashes

Full View

Config.Stashes – Detailed Guide

Config.Stashes contains all storage locations (stashes) where item durability, decay, improvement, and charging are managed. Each stash can be configured individually.

Basic Structure

{
    name = "cold_storage_1",
    label = "Refrigerator",
    coords = vector3(-803.3544, 185.6919, 72.6055),
    slots = 50,       
    maxWeight = 100000, 
    storageDecayRate = 2, 
    decayInterval = 3600,
    job = nil,
    filters = { ... }
}

1️⃣ name – Identifier

  • Description: Unique identifier used by the script to recognize the stash.

  • Important: Must match the MySQL table if the stash is created by another script.

  • Example: "cold_storage_1", "stash_*" (prefix for multiple stashes)

2️⃣ label – Display Name

  • Description: Name displayed to players when interacting with the stash.

  • Example: "Refrigerator", "Freezer", "Safe Vault"

3️⃣ coords – Coordinates

  • Description: Physical location of the stash on the map.

  • Format: vector3(x, y, z)

  • Example: vector3(-803.3544, 185.6919, 72.6055)

4️⃣ slots – Number of Slots

  • Description: Maximum number of individual items the stash can hold.

  • Example: 50 → up to 50 items

5️⃣ maxWeight – Maximum Weight

  • Description: Total allowed weight according to OX Inventory’s weight system.

  • Example: 100000

6️⃣ storageDecayRate – Base Decay Rate

  • Description: Default decay rate applied to all items per decay cycle.

  • Unit: percent (%)

  • Note: Negative values → items improve or charge instead of decaying.

  • Example:

    • Fridge: 2%

    • Wine cellar: -2%

7️⃣ decayInterval – Cycle Time

  • Description: How often the stash updates item decay/improvement.

  • Unit: seconds

  • Example: 3600 → every hour, 1200 → every 20 minutes

8️⃣ job – Job Restriction

  • Description: Only players with this job can access the stash.

  • If nil: Everyone can access it.

  • Example: "ambulance" → only EMS/ambulance players

9️⃣ filters – Item-Specific Decay

  • Description: Overrides the default storageDecayRate for specific items.

  • Format:

  • Example:

🔑 Summary / Tips

  • Each stash is unique – separate decayRate, decayInterval, slots, and maxWeight.

  • Combine base storageDecayRate with filters for item-specific behavior.

  • Negative storageDecayRate → improving or charging items (e.g., wine, whiskey, batteries).

  • Job restriction → secure storages like medical supply rooms.

  • Prefix (stash_*) → applies to any stash created by another script.

Last updated