🎮 RPG Maker SDK - Complete Setup Guide
Real-time game analytics for RPG Maker MV and MZ games. Track player behavior, game events, and custom metrics with minimal setup.
Both versions feature automatic session tracking, environment detection, and zero dependencies.
🚀 Choose Your Version
RPG Maker MV
ES5 compatible JavaScript for maximum compatibility with older RPG Maker MV engines.
RPG Maker MZ
Modern ES6+ JavaScript with classes, async/await, and fetch API for cleaner code.
🔧 Installation (Both Versions)
1Download the SDK
• Download TokebiSDK.js
(MV) or TokebiSDK.js
(MZ)
• Copy to your project's js/plugins/
folder
2Configure Plugin
• Open RPG Maker MV/MZ
• Go to Tools → Plugin Manager
• Enable TokebiSDK
• Set your API Key (get it from tokebimetrics.com)
• Save your project
3Test Installation
• Playtest your game (F5)
• Press F12 to open console
• You should see: [Tokebi] SDK initialization started
⚙️ Plugin Parameters
Parameter | Description | Default |
---|---|---|
API Key | Your Tokebi Analytics API key | (required) |
Game Name | Game title (auto-detected) | Project name |
Enable Tracking | Turn analytics on/off | true |
Debug Mode | Show console messages | true |
🎮 Usage Examples
Basic Event Tracking
Track custom events anywhere in your game using Script commands:
// In RPG Maker Events (Script commands) Tokebi.track('level_complete', { level: 'forest_dungeon', score: 1250, items_collected: 5 }); Tokebi.track('item_purchased', { item: 'magic_sword', cost: 500, currency: 'gold' }); Tokebi.track('boss_defeated', { boss_name: 'Fire Dragon', player_level: 15, battle_duration: 180 });
Combat Analytics
// Track battle outcomes Tokebi.track('battle_end', { outcome: 'victory', enemy_type: 'goblin', exp_gained: 25, damage_taken: 45 }); // Track skill usage Tokebi.track('skill_used', { skill_name: 'Fireball', mp_cost: 12, damage_dealt: 85, target_count: 3 });
Player Progression
// Level ups Tokebi.track('level_up', { new_level: 8, class: 'mage', stats_gained: { hp: 15, mp: 20, attack: 3 } }); // Quest completion Tokebi.track('quest_complete', { quest_id: 'find_herbs', reward_gold: 100, reward_exp: 50, completion_time: 300 });
📊 Built-in Events
These events are tracked automatically - no setup required:
Event | When It Fires | Data Collected |
---|---|---|
session_start | Game starts | Player ID, Game ID |
session_end | Game closes/tab switches | Session duration (calculated) |
🔄 Features Comparison
Feature | RPG Maker MV | RPG Maker MZ |
---|---|---|
JavaScript Version | ES5 Compatible | ES6+ Modern |
HTTP Requests | XMLHttpRequest | Fetch API |
Code Structure | Function constructors | ES6 Classes |
Async Handling | Callbacks | Async/Await |
Session Tracking | ✅ Yes | ✅ Yes |
Environment Detection | ✅ Yes | ✅ Yes |
Platform Support | ✅ Web, Desktop, Mobile | ✅ Web, Desktop, Mobile |
🧪 Testing & Debugging
Console Output
With Debug Mode enabled, you'll see:
[Tokebi] Environment detected: development [Tokebi] Player ID: player_1692123456_7834 [Tokebi] ✅ Game registered: game_abc123 [Tokebi] Tracking: level_complete [Tokebi] ✅ Event sent successfully: level_complete
Verify Events
1. Open F12 Console during playtest
2. Run: Tokebi.test()
3. Should return: "TokebiSDK [MV/MZ] is working!"
🚨 Common Issues
"NO VALID API KEY SET" Error
• Check Plugin Manager → TokebiSDK → API Key field
• Get your key from tokebimetrics.com
• Don't use test_key_123
(placeholder value)
Console Shows No Messages
• Enable Debug Mode in Plugin Manager
• Check F12 Console tab (not Elements)
• Ensure plugin is enabled in Plugin Manager
Events Not Sending
• Check internet connection
• Verify API key is correct
• Look for red error messages in console
• Ensure trackingEnabled
is set to true
🚀 Next Steps
View Your Data
• Log into your Tokebi Dashboard
• Check Events tab for real-time data
• Create Funnels to track player journeys
• Set up Charts for key metrics
Advanced Features
• Player Segmentation - Group players by behavior
• Retention Analysis - Track returning players
• A/B Testing - Compare different game versions
• Custom Dashboards - Build your own analytics views