Debugging Tools
Comprehensive developer toolkit for testing, debugging, and content creation
⚠️ Debug Mode Configuration
⚠️ Production Warning
NEVER enable Debug = true on live servers! Debug mode exposes powerful commands that can be abused by players and may cause server instability.
Debug Configuration
Config = {
Debug = false, -- ⚠️ SET TO FALSE FOR PRODUCTION
Target = true, -- Use target system for interactions
Language = 'English' -- UI language setting
}Debug Mode Benefits
- • Developer Commands: Access to all testing commands listed below
- • Console Logging: Detailed output for troubleshooting and development
- • Screenshot System: Auto-capture inventory icons with webhook support
- • Card Testing: Preview all cards, rarities, and effects
- • Error Reporting: Enhanced error messages and stack traces
🎮 Card Testing Commands
Rarity Testing Commands
/testjimgcardsall - Shows all cards in the system (458+ cards)
/testjimgcardsnormal - Shows only Normal rarity cards
/testjimgcardsuncommon - Shows only Uncommon rarity cards
/testjimgcardsrare - Shows only Rare rarity cards
/testjimgcardsepic - Shows only Epic rarity cards
/testjimgcardslegendary - Shows only Legendary rarity cards
/testjimgcardsholo - Shows only Holo cards (excludes OriginalArt)
/testjimgcardsoriginalArt - Shows only OriginalArt cardsBrand Testing Commands
/testjimgcardwarlords - Shows jg_warlords brand cards
/testjimgcardshin-genesis - Shows jg_shin_genesis brand cards
/testjimgcardvoid-ether - Shows jg_void_ether brand cards
/testjimgcardsands-of-eternity - Shows jg_sands_of_eternity brand cards
/testjimgcardammunation_elite - Shows ammunation_elite brand cards
/testjimgcardfull_throttle - Shows full_throttle brand cards
/testjimgcardls_legends - Shows ls_legends brand cards
/testjimgcardls_landmark - Shows ls_landmark brand cardsDynamic Brand Commands
- • Format:
/testjimgcard[BRAND_NAME] - • Example:
/testjimgcardmycustombrand - • Works with any brand defined in your configuration
- • Brand names: Must match Config.Cards brand exactly
📸 Auto‑Capture Screenshot System
Screenshot Command
/testjimgcardscreenshot - Generate inventory icons for all cards⚠️ Critical Warning - Game Pool Error
WARNING: Generating hundreds of screenshots at once will cause a game pool oversize error and crash the game. If you need to add new images, consider:
- • Comment out all brands except one
- • Run screenshot command for single brand
- • Repeat process for each brand separately
- • Restart script between brands if needed
Screenshot Process
- 1. Renders all cards against green screen background
- 2. Automatically crops to 200x200 pixel icons
- 3. Saves locally to ui/inv_images/ folder
- 4. Optionally uploads to Discord via webhook
- 5. Optimizes images for inventory display
Webhook Integration
-- Configure in server/webhooks.lua
local Endpoints = {
screenshot_image = {
enabled = true,
url = 'https://discord.com/api/webhooks/YOUR_WEBHOOK_URL'
}
}
-- Set webhook in-game
/testjimgcardscreenshotwebhook [URL] -- Set Discord webhook URLScreenshot Benefits
- • Consistent Sizing: All icons standardized at 200x200 pixels
- • Professional Rendering: Clean green screen background
- • Automatic Optimization: Images optimized for inventory display
- • Discord Integration: Real-time upload to your Discord
- • Batch Processing: Handles all 458+ cards efficiently
Comprehensive Webhook System
Available Webhook Events
shop_buy_basket # Player purchases from card shop
shop_sell # Player sells cards to shop
pack_use # Player opens booster packs
rewards # Card rewards and giveaways
grading_use # Player uses grading service
grade_card # Card grading completion
binder_add # Cards added to binders
binder_remove # Cards removed from binders
deck_add # Cards added to decks
deck_remove # Cards removed from decks
screenshot_image # Auto-capture icon uploadsWebhook Configuration
-- server/webhooks.lua
local Endpoints = {
shop_buy_basket = {
enabled = true,
url = 'https://discord.com/api/webhooks/SHOP_BUY_WEBHOOK'
},
grade_card = {
enabled = true,
url = 'https://discord.com/api/webhooks/GRADING_WEBHOOK'
},
pack_use = {
enabled = true,
url = 'https://discord.com/api/webhooks/PACK_OPEN_WEBHOOK'
}
}Webhook Features
- • Rich Discord embeds with card images
- • Detailed transaction information
- • Real‑time activity monitoring
- • Customizable endpoint URLs
- • Support for multiple Discord channels
Discord Embed Examples
- • Card pack openings with rarity highlights
- • Grading results with CVG scores
- • Shop transactions with prices
- • Binder organization activities
Advanced Developer Tools
Console Logging (dprint)
- • Both client and server use a dprint() helper
- • Only outputs when Config.Debug is true
- • Detailed error messages and stack traces
- • Metadata validation warnings
Rate Limiting
- • Client-side allowClientAction() prevents spam
- • Configurable cooldowns per action type
- • Prevents rapid-fire shop/grading requests
- • Logs blocked actions in debug mode
Performance Monitoring
- • IntersectionObserver for card effects (tcObserveCardEffects)
- • Reduced-motion accessibility toggle
- • Lazy-loading for card images in UI
- • Effect pausing when cards leave viewport
Developer Best Practices
Asset Management
- • Keep all card images in ui/i/ folder
- • Use high‑resolution source images (1024x1024 minimum)
- • Let screenshot tool downscale for consistency
- • Maintain organized folder structure
Brand Consistency
- • Keep brand names consistent across all configs
- • Match Config.Cards brand with Config.BoosterPacks brand
- • Use consistent naming conventions
- • Document your brand structure
Production Deployment
-- Set for live servers
Config = {
Debug = false, -- Disable dev commands
Target = true, -- Keep target system enabled
Language = 'English'
}🎯 Next Steps
Continue building and validating content: