osu

Introduction

Assist.Games Research is a side-project that aims to bring expose osu! scripting interface for public usage. By doing so, we provide ways to hook, patch and modify osu! runtime without low-level programming knowledge. The interface is being served by OAC(assist.games osu! client). The scripting interface was designed to provide access to all the features that would allow gameplay modifications.

Terms of usage

Scripting Interface cannot be used online. The API automatically prevents score-submissions when the interface is called by foreign script. You will be banned without warning if we detect malicious intent when using SI in online play. We want to stay on Peppy’s good side here.

Online usage is strictly prohibited for now!

Exported Methods

Creating a script

Setup

Get started by cloning our script template.

git clone https://github.com/assistgames/module-template

then you need to install all the dependecies by doing

npm install

What you’ll need

Exporting Script Class

Inside our /src/main.ts we can see a simple script that does nothing.

In order for the base to understand your script, you must export a Script class, which contains required methods.

import { BaseInterface, ScriptBase } from "../scriptInterface";

export class Script implements ScriptBase {
    private base: BaseInterface;

    constructor(base: BaseInterface) {
        this.base = base;
    }

    ready(): void {

    }
    mapStart(type: "fast" | "lazy"): void {

    }
    mapEnd(): void {

    }
    cleanup(): void {

    }
}

Adding a tab

Let’s add a simple menu tab and checkbox. We can do that by creating a config field like this.

private tabName: string = "My Cool Script";
private enabledOption: ConfigField;
constructor(base: BaseInterface) {
    this.base = base;
    this.enabledOption = this.base.config.field(`${this.tabName}::Enabled`, { value: false });
}

Build your script

Building your script is fairly easy, you need to re-name the output file in the build.js script.

require('esbuild').build({
    entryPoints: ['./src/main.ts'],
    bundle: true,
    outfile: "./my-awesome-script.js", // <---- here
    format: "cjs"
})

Now by running the build command

npm build

you should be able to see a generated .js file.

Loading your script

To load your script you need to move it to the same folder with the base file

    /my-scripts
        /interface.exe
        /settings.json
        /my-cool-script.build.js

after starting interface.exe, it should output any errors if they are present.

Get Involved

Scripting Interface is not free. You currently need to be whitelisted to get access to it, as we’re still updating it actively. Assist Games Research group is maintained by Dima and Cherry.

Feel free to buy on Assist.Games.