Fruit Pie mods
note
This documentation is not yet complete, but it should still give you enough context to play around the mod loader and create your first mods!
Fruit Pie includes a mod loader that lets you define a mod once. It supports Game Maker 8.x games as well as Game Maker Studio games, whether it is emulated to run in the browser or not.
A mod is written in JavaScript. This language was chosen because it has to work in a browser.
The mod can install resources only at build time (objects, scripts, ...), but you can then communicate between your new resources and JavaScript at runtime by sending events.
Quick demo
import { createMod } from "@fruit-pie/sdk";
export default createMod((mod) => {
mod.resource.object.create({
name: "greeter",
persistent: true,
events: {
create: ({ send }) => send("hello", "string(room)"),
},
});
mod.on("hello", (room) => console.log(`hello from room ${room}`));
});