DocsRPG Maker SDKOverview

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

  1. Download ShardSDK.js from GitHub Releases
  2. Copy the file to your project’s js/plugins/ folder
  3. Open your project in RPG Maker
  4. Go to Tools → Plugin Manager
  5. Double-click an empty slot and select ShardSDK
  6. Configure the plugin parameters as needed
  7. Click OK to enable the plugin

Plugin Configuration

Configure the SDK via the Plugin Manager:

ParameterDefaultDescription
Launcher URLhttp://localhost:9876Shard Launcher URL
Enable RecordingtrueEnable recording triggers
Enable MonitortrueEnable error reporting
Enable SocialtrueEnable 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:

  1. Create a new Common Event named “Trigger Boss Recording”
  2. Add a Script call:
    ShardSDK.Recording.triggerEvent("myGame_bossDefeated");
  3. 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:

FeatureMethod NameParameter
RecordingtriggerEventeventId
MonitorreportErrormessage, stackTrace
SocialtriggerEventeventId

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 VersionSupported
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