Skip to main content

SDK API Overview

The MCE SDK provides a clean, stable public API surface for interacting with the engine from your game code. All SDK interfaces live in the OpenMon.MCE.SDK namespace. The public SDK API ships with the Indie, Pro, Source and Studio editions; the Starter edition keeps the API closed.

sdk overview

If it is not on one of these four interfaces, it is not part of the SDK contract.

Design Principles​

  • Interface-based: All public APIs are exposed as interfaces, not concrete classes. This allows the implementation to evolve without breaking your code.
  • Read-heavy: Most SDK methods are read-only queries. Mutations happen through the engine's internal systems (CommandGraph, Inspector, etc.).
  • Event-driven: Key state changes are communicated through C# events.
  • Zenject-injected: Access SDK interfaces via [Inject] attribute.

Entry Point​

The main entry point is IMonsterCaptureEngine:

[Inject] private IMonsterCaptureEngine engine;

From this interface, you access all subsystems:

PropertyInterfacePurpose
engine.DatabaseIMonsterDatabaseQuery monsters, moves, items, types
engine.BattleIBattleSystemBattle state and events
engine.PlayerIPlayerDataPlayer roster, money, name, badges
engine.SaveSystemISaveSystemSave/load operations
engine.VersionstringEngine version string

Quick Example​

using OpenMon.MCE.SDK;
using Zenject;

public class GameDashboard : MonoBehaviour
{
[Inject] private IMonsterCaptureEngine engine;

private void Start()
{
// Query database
var allMonsters = engine.Database.GetAllMonsters();
Debug.Log($"Database has {allMonsters.Count} monster species");

// Check player state
Debug.Log($"Player: {engine.Player.PlayerName}");
Debug.Log($"Team size: {engine.Player.PlayerRoster.RosterSize}");
Debug.Log($"Money: {engine.Player.Money}");
Debug.Log($"Badges: {engine.Player.BadgeCount}");

// Listen to battle events
engine.Battle.OnBattleStarted += () => Debug.Log("Battle!");
engine.Battle.OnBattleEnded += (won) => Debug.Log($"Won: {won}");

// Save/load
if (engine.SaveSystem.HasSaveData(0))
Debug.Log("Save slot 0 has data");
}
}

The database and player interfaces read live engine state. The battle and save interfaces (engine.Battle, engine.SaveSystem) are facades that depend on engine hooks which are not connected yet: read the notes in IBattleSystem and ISaveSystem before relying on their events.

See the individual API pages for detailed documentation of each interface.