OpenGameInstaller Logo

OpenGameInstaller Docs

What is OpenGameInstaller? Your First Addon Resources

Making your addon.json

To let OpenGameInstaller know how to launch your addon, you need to create an addon.json file. This file must contain two scripts, setup and run.

In the root of your addon’s folder, create a file called addon.json using the following structure:

{
  author: string,
  scripts: {
    preSetup: string,
    setup: string,
    postSetup: string,
    run: string
  }
}
Script NameKeyDescription
Pre SetuppreSetupA script which runs before running the setup script. Use this as a tool to install dependencies.
SetupsetupA script which is used to setup your addon. Use this as the initializer for important files.
Post SetuppostSetupA script which runs after running the setup script. Use this to verify your addon is ready.
RunrunA script which runs your addon. OGI provides an --addonSecret to let addon connect.

Example:

{
  author: "OpenGameInstaller Devs",
  scripts: {
    preSetup: "bun install --frozen-lockfile",
    setup: "bun run setup.ts",
    postSetup: "bun run cleanup.ts",
    run: "bun run main.ts"
  }
}