Documentation

Core Configuration

The config.lua controls economy, rarity, shops, grading, and UI visuals for the Card Vault Grading system.

Global Settings

Config = {
  Debug = false,          -- enable dev logs and test commands
  Target = true,          -- true for ox_target / qb-target
  Language = 'English',   -- locale for UI and notifications
  ShowPlayerButton = true,-- show cards to nearby players
  EffectsEnabled = true,  -- visual shaders/holo animations
  BrandURL = 'www.j-g.com',     -- URL displayed in shop UI headers
  CVGBrandText = 'cvg',         -- text shown on graded slab labels
}

Core Features

  • Debug: Developer commands and logging
  • Target: Bridge target vs drawtext interactions
  • Language: 13 supported languages
  • ShowPlayerButton: Card sharing with nearby players
  • BrandURL: Store URL shown in shop UI headers
  • CVGBrandText: Custom text on graded slab labels

Visual System

  • EffectsEnabled: Global visual effects toggle
  • RarityColors: Custom color schemes per rarity
  • HighRarity: Enhanced effects for premium tiers
  • GradingCase: Custom grading case images

Debug Mode Features

  • • Enables all developer commands (testjimgcardsall, testjimgcardscreenshot, etc.)
  • • Shows detailed console logging for troubleshooting
  • • Activates auto-capture screenshot system for inventory icons
  • • Enables card preview commands for testing all rarities and brands

Target System

  • • true: Uses Bridge target system (third-eye interactions)
  • • false: Uses on-screen prompts with E key
  • • Affects shop/sell NPC interactions and grading shop access

🍀 Pity System

Prevents long dry streaks by gently boosting rare pulls after failures.

Pity Configuration

Config.Pity = {
  enabled = false,     -- Recommended off for production
  thresholds = {       -- Packs without rarity before boost
    Rare = 5, 
    Epic = 8,   
    Legendary = 12,  
    Holo = 10 
  },
  boosts = {           -- Multiplier when threshold met
    Rare = 2.0, 
    Epic = 2.5, 
    Legendary = 3.0,  
    Holo = 2.5 
  },
  raiseMax = false     -- Ensure boosted rarities have max >= 1
}

Pity Mechanics

  • enabled: Toggle pity system (recommended: false for production)
  • thresholds: Packs opened before boost triggers
  • boosts: Multiplier applied when threshold is met
  • raiseMax: Ensures boosted rarities have at least max ≥ 1

Example: If Rare base chance is 1% and threshold is met, new chance becomes 2%.

🔍 Condition & CVG Grading Potential

Every pull rolls condition (1–100) which drives CVG grading value and sell price.

  • • Strict (recommended): CVG 5–8 common; CVG 10 is legendary
  • • Balanced: Smoother curve for casual servers
  • • Generous: High‑quality pulls common; good for short events

Condition Degradation

Cards lose condition each time they are shown to another player, creating natural wear over time.

Config.Condition = {
  degradeOnUse = true,    -- cards lose condition when shown
  degradeAmount = 2,      -- percentage points lost per use
}
  • degradeOnUse: When true, showing a card to another player reduces its condition
  • degradeAmount: How many condition points are removed per show (default: 2)
  • • Condition cannot drop below 1
  • • Graded slabs are protected from degradation
Config.Condition = {
  enabled = true,     -- Must remain true for economy
  preset = 'strict',  -- strict/balanced/generous
  presets = {
    -- Strict: Lower conditions more common (CVG 5-8 average)
    strict = { 
      [0]=12,  [10]=12, [20]=10,   [30]=9,  [40]=8,  [50]=7,   
      [60]=6,  [70]=5,   [80]=3,   [90]=2,  [100]=1   
    },
    -- Balanced: Even distribution across all conditions
    balanced = { 
      [0]=2,   [10]=3,  [20]=5,   [30]=7,   [40]=9,  [50]=10,  
      [60]=10, [70]=9,   [80]=7,   [90]=5,  [100]=3   
    },
    -- Generous: Higher conditions more common (CVG 8-10 frequent)
    generous = { 
      [0]=1,   [10]=2,  [20]=3,   [30]=4,   [40]=5,  [50]=7,   
      [60]=9,  [70]=12, [80]=16,  [90]=19, [100]=22  
    }
  }
}

Important: Keep Config.Condition.enabled = true; disabling makes all cards 100% condition and breaks the economy.

🏪 Complete Shop System

Trading Card Shop (Config.Shop)

  • • 8 brands with 3 pack types each (24 total items)
  • • Category-based organization for easy browsing
  • • Cooldown system prevents spam purchases (1 second)
  • • Max basket items: 60 per transaction
  • • Location: vector4(-143.78, 229.86, 93.94, 358.3)

Sell Shop (Config.SellShop)

  • • Dynamic pricing with market fluctuations
  • • 100+ individual card prices by rarity
  • • Price changes +/- 25% every hour (configurable)
  • • Location: vector4(-14.61, -152.91, 55.83, 339.91)
  • • Separate NPC and blip from buy shop

TC Machine (Config.TcMachine)

  • • Alternative to NPC shop with 12 predefined locations
  • • Uses same item list as Config.Shop
  • • Custom prop: jim_g_trading_cards_vending_machine
  • • When enabled, disable Config.Shop and Config.SellShop
  • • Perfect for 24/7 automated access

Buy Shop Configuration

Config.Shop = {
  enabled = true,                                    -- toggle shop on/off
  currency = 'cash',                                 -- payment currency
  location = vector4(-143.78, 229.86, 93.94, 358.3), -- ped position
  pedModel = 'u_m_y_rsranger_01',                    -- ped model
  scenario = 'WORLD_HUMAN_CLIPBOARD',                -- ped animation
  blipenabled = false,                                -- map blip
  blipname = 'Trading Card Shop',                    -- blip name
  blipid = 52, scale = 0.4, blipcolor = 5,     -- blip settings
  cooldownSeconds = 1,                               -- anti-spam cooldown
  maxBasketItems = 60,                               -- purchase limit
  items = {
    -- 24 total items across 8 brands
    { item = 'jg_warlords_pack', price = 1000, category = 'JG Warlords Series' },
    { item = 'empty_grading_case', price = 10000, category = 'Accessories' }
    -- ... all items with prices and categories
  }
}

Sell Shop Configuration

Config.SellShop = {
  enabled = true,                                    -- toggle sell shop on/off
  currency = 'cash',                                 -- payout currency
  location = vector4(-14.61, -152.91, 55.83, 339.91), -- ped position
  pedModel = 's_m_m_lathandy_01',                     -- ped model
  scenario = 'WORLD_HUMAN_CLIPBOARD',                 -- ped animation
  blipenabled = false,                                -- map blip
  blipname = 'Card Buyer Shop',                       -- blip name
  blipid = 52, scale = 0.4, blipcolor = 28,     -- blip settings
  dynamic = {
    enabled = true,                                 -- enable dynamic pricing
    intervalHours = 1,                              -- price change frequency
    changePercent = 25                              -- +/- percent change
  },
  items = {
    -- 100+ cards with base prices by rarity
    { item = 'card_grizzlethorn', basePrice = 1 },     -- Normal cards
    { item = 'card_phantom_sentry', basePrice = 105 },   -- Rare cards
    { item = 'card_bone_colossus', basePrice = 2000 },  -- Legendary cards
    -- ... all cards with individual pricing
  }
}

📝 CVG Grading Shop

  • • Time-based grading: higher timeSec for Legendary makes grading feel high‑stakes
  • • OriginalArt: highest price to maintain prestige (9000 cash, 15 seconds)
  • • CVG System: submit cards for professional grading with realistic wait times
  • • Requires empty grading case item for submission

CVG Grading Configuration

Config.GradingShop = {
  enabled = true,                                      -- toggle grading shop
  currency = 'cash',                                   -- payment currency
  location = vector4(-1.8, -157.57, 55.45, 340.88),    -- ped position
  pedModel = 's_m_m_lathandy_01',                      -- ped model
  scenario = 'WORLD_HUMAN_CLIPBOARD',                  -- ped animation
  blipenabled = true,                                  -- map blip
  blipname = 'Card Grader Shop',                       -- blip name
  blipid = 52, blipscale = 0.4, blipcolor = 46,     -- blip settings
  prices = {
    Normal      = { price = 500,    timeSec = 6  },   -- Fastest, cheapest
    Uncommon    = { price = 1200,   timeSec = 8  },
    Rare        = { price = 2500,   timeSec = 9  },
    Epic        = { price = 4000,   timeSec = 10 },
    Legendary   = { price = 6000,   timeSec = 12 },  -- High value
    Holo        = { price = 8000,   timeSec = 14 },
    OriginalArt = { price = 9000,   timeSec = 15 }   -- Premium tier
  }
}

Grading Case Images

Config.GradingCase = {
  case_pack = 'jim_g_trading_cards_grading_pack.webp',
  case_label = 'jim_g_trading_cards_grading_pack_label.webp',
  case_texture = 'jim_g_trading_cards_grading_pack_t.webp'
}

📦 Pack & Binder System

Rarity rules define gacha behavior and binders provide collection management:

Pack Types by Rarity

  • • Regular Packs: jg_[brand]_pack — Normal/Uncommon only
  • • Mythic Packs: jg_[brand]_pack_mythic — Up to Rare/Epic
  • • Legendary Packs: jg_[brand]_pack_legendary — All rarities possible

Binder Features

  • Auto-Position: Cards go to predefined slots
  • Brand Enforcement: Single brand per binder
  • Duplicate Check: Prevent duplicate cards
  • Checklist: Track collection progress

Binder Configuration

Config.Binders = {
  { item = 'jg_warlords_book',           themebook = 'Dark',           brand = 'jg_warlords' },
  { item = 'jg_shin_genesis_book',       themebook = 'Neon_Cyan',      brand = 'jg_shin_genesis' },
  { item = 'jg_void_ether_book',         themebook = 'Forest_Green',   brand = 'jg_void_ether' },
  { item = 'jg_sands_of_eternity_book',  themebook = 'Gold_Black',     brand = 'jg_sands_of_eternity' },
  { item = 'ammunation_elite_book',      themebook = 'Crimson_Black',  brand = 'ammunation_elite' },
  { item = 'full_throttle_book',         themebook = 'Glacier_Blue',   brand = 'full_throttle' },
  { item = 'ls_legends_book',            themebook = 'Emerald_Stone',  brand = 'ls_legends' },
  { item = 'ls_landmark_book',           themebook = 'Steel_Grey',     brand = 'ls_landmark' }
}

-- Binder Settings
Config.BindersDuplicatesCheck = true      -- Prevent duplicates
Config.BindersChecklistEnabled = true     -- Show collection progress
Config.BindersEnforceBrand = true         -- Single brand enforcement
Config.BindersAutoPosition = true         -- Auto-slot positioning

Available Themes (18 Total)

Dark Themes

  • • Dark, Dark_Blue, Midnight_Purple
  • • Steel_Grey, Crimson_Black, Black

Colorful Themes

  • • Vibrant, Vibrant_Pink, Neon_Cyan
  • • Sunset_Orange, Forest_Green, Ocean_Teal

Special Themes

  • • Light, Gold_Black, Azure_Black
  • • Sandstone, Glacier_Blue, Plum_Rose, Emerald_Stone

🎨 Visuals & UI Configuration

Rarity colors define tier identity and visual effects control card appearance.

Visual Effects System

  • EffectsEnabled: Global toggle for all effects
  • HighRarity: Enhanced effects for premium tiers
  • RarityColors: Custom color schemes per rarity
  • GradingCase: Custom grading case images

Player Interaction

  • ShowPlayerButton: Share cards with nearby players
  • Target: Bridge target vs drawtext interactions
  • Language: 13 supported languages
  • Debug: Developer tools and commands

Rarity Color Configuration

Config.RarityColors = {
  ['Normal'] = '#9ca3af',      -- Gray
  ['Uncommon'] = '#22c55e',    -- Green  
  ['Rare'] = '#3b82f6',        -- Blue
  ['Epic'] = '#a855f7',        -- Purple
  ['Legendary'] = '#ffd700',   -- Gold
  ['Holo'] = '#60a5fa',        -- Cyan
  ['OriginalArt'] = '#232527ff' -- Black
}

Config.HighRarity = {
  ['Normal'] = false,
  ['Uncommon'] = false,
  ['Rare'] = true,
  ['Epic'] = true,
  ['Legendary'] = true,
  ['Holo'] = true,
  ['OriginalArt'] = true,
}

Config.EffectsEnabled = true

📦 Booster Box System

Booster boxes provide bulk value — each box contains 6 packs of the matching type. All 8 brands have 3 box tiers (24 total boxes).

Regular Boxes

  • • Contains 6 regular packs
  • • Normal/Uncommon cards only
  • • Best value for collection building

Mythic Boxes

  • • Contains 6 mythic packs
  • • Chance at Rare/Epic cards
  • • Mid-tier investment option

Legendary Boxes

  • • Contains 6 legendary packs
  • • All rarities possible
  • • Premium tier with guaranteed high-rarity cards

📊 Economy Details

Dynamic Sell Pricing

  • intervalHours: How often prices fluctuate (default: 1 hour)
  • changePercent: Maximum price swing per interval (default: ±25%)
  • • Prices shift up or down randomly each interval
  • • Creates realistic market behavior and trading opportunities

Shop Anti-Spam Controls

  • cooldownSeconds: 1 second between purchases (anti-spam)
  • maxBasketItems: 60 items per transaction (server-side DoS protection)
  • • Server validates every basket before processing
  • • Auto-refund on failed item grants

CVG Case Splitter

Players can break open graded slabs to retrieve the original card inside.

Config.CVGCaseSplitter = {
  consumeOnUse = true    -- splitter item is consumed when used
}
  • • Splits a graded CVG slab back into the raw card
  • • Card retains its original condition and metadata
  • • CVG grade and serial are removed
  • • When consumeOnUse is true, the splitter item is destroyed after use

💡 Economy Strategy

  • • Pity system can inflate markets; tune carefully
  • • Keep grading_case available to sink money and maintain economy
  • • Cohesive branding: booster pack brand must match Config.Cards.brand
  • • Condition matters: never disable condition system
  • • Rarity gates control distribution and prevent flooding
  • • Dynamic pricing creates realistic market behavior
  • • Prestige items: keep OriginalArt and Legendary extremely rare
  • • Condition degradation adds natural wear, increasing demand for fresh pulls
  • • CVG case splitter creates strategic choices: keep the slab or free the card

🎯 Next Steps

After completing the core configuration: