Developer API Overview
Estimated reading time: 2 minutesModLoader exposes a public API to Mod developers via global objects for querying Mod info, inter-Mod communication, image loading, and more.
Global Objects
API Categories
- modUtils Reference — Mod queries, current Mod name, common utilities
- AddonPlugin System — Addon registration, exposing and calling Mod APIs
- Image Loading — Intercepting and replacing images via HtmlTagSrcHook
- Lifecycle Hooks — Load-phase callbacks and hooks
SugarCube2 Events
SC2 emits these jQuery events during gameplay. Mods can listen for them to react to game state:
