RPG Maker SDK
Integrate the Shard SDK into your RPG Maker MV/MZ project for recording, error monitoring, and social events.
Prerequisites: RPG Maker MV or MZ and Shard Launcher running
Note: Ruby-based RPG Maker versions (VX Ace, XP, 2000, 2003) are not supported. This SDK only works with the JavaScript-based MV and MZ versions.
Installation
- Download
ShardSDK.jsfrom GitHub Releases - Copy the file to your project’s
js/plugins/folder - Open your project in RPG Maker
- Go to Tools → Plugin Manager
- Double-click an empty slot and select ShardSDK
- Configure the plugin parameters as needed
- Click OK to enable the plugin
Plugin Configuration
Configure the SDK via the Plugin Manager:
| Parameter | Default | Description |
|---|---|---|
| Launcher URL | http://localhost:9876 | Shard Launcher URL |
| Enable Recording | true | Enable recording triggers |
| Enable Monitor | true | Enable error reporting |
| Enable Social | true | Enable social events |
Quick Start
The SDK exposes a global ShardSDK object. Use it in Script calls or custom plugins:
// Trigger a recording event
ShardSDK.Recording.triggerEvent("myGame_bossDefeated");
// Report an error
ShardSDK.Monitor.reportError("Player stuck in wall");
// Trigger a social event
ShardSDK.Social.triggerEvent("myGame_achievementUnlocked");Using in Events
Script Call
Add a Script call in your event:
ShardSDK.Recording.triggerEvent("myGame_bossDefeated");Common Event Example
Create a Common Event for reusable recording triggers:
- Create a new Common Event named “Trigger Boss Recording”
- Add a Script call:
ShardSDK.Recording.triggerEvent("myGame_bossDefeated"); - Call this Common Event when the boss is defeated
Basic Usage
Recording Events
Trigger recording when gameplay moments occur:
// Trigger a recording event
ShardSDK.Recording.triggerEvent("myGame_e5f6g7h8");Error Monitoring
Report errors and exceptions:
// Report an error with message only
ShardSDK.Monitor.reportError("Player fell through floor");
// Report an error with stack trace
try {
// risky code
} catch (e) {
ShardSDK.Monitor.reportError(e.message, e.stack);
}Social Events
Trigger social content display:
// Trigger a social event
ShardSDK.Social.triggerEvent("myGame_a1b2c3d4");JavaScript Naming Conventions
The SDK follows JavaScript naming conventions:
| Feature | Method Name | Parameter |
|---|---|---|
| Recording | triggerEvent | eventId |
| Monitor | reportError | message, stackTrace |
| Social | triggerEvent | eventId |
All method and parameter names use camelCase to match JavaScript conventions.
Error Handling
The SDK uses fire-and-forget HTTP calls with silent failure:
- If the Shard Launcher is not running, calls silently fail
- No exceptions are thrown to your game code
- Network timeouts are handled automatically (5 second timeout)
- Uses the Fetch API for HTTP requests
Your game continues running normally even if the launcher is unavailable.
Compatibility
| RPG Maker Version | Supported |
|---|---|
| RPG Maker MZ | ✅ Yes |
| RPG Maker MV | ✅ Yes |
| RPG Maker VX Ace | ❌ No (Ruby-based) |
| RPG Maker XP | ❌ No (Ruby-based) |
| RPG Maker 2000/2003 | ❌ No |
Next Steps
- API Reference - Full API documentation
- Recording Overview - Learn about recording features
- Error Tracking - Learn about error monitoring
- Social Events - Learn about social features
- ShardKit CLI - Generate event IDs with the CLI