Home - All-Of-Us-Mods/MiraAPI-Docs GitHub Wiki
Mira API
A thorough, but simple, Among Us modding API that covers:
- Roles
- Options
- Gamemodes
- HUD Elements
- Modifiers
- Compatibility
Mira API strives to be simple and easy to use, while also using as many base game elements as possible. The result is a less intrusive, better modding API that covers general use cases.
Usage
To start using Mira API, you need to:
- Add a reference to Mira API either through a DLL, project reference, or NuGet package.
- Add a BepInDependency on your plugin class like this:
[BepInDependency(MiraApiPlugin.Id)]
- Implement the
IMiraPlugin
interface on your plugin class. - Make sure to implement the
GetConfigFile()
method and return your plugin's config. (This will be used for saving options)
This is what your plugin class should look like after following the instructions:
[BepInAutoPlugin("mira.example", "MiraAPIExample")]
[BepInProcess("Among Us.exe")]
[BepInDependency(ReactorPlugin.Id)]
[BepInDependency(MiraApiPlugin.Id)]
[ReactorModFlags(ModFlags.RequireOnAllClients)]
public partial class ExamplePlugin : BasePlugin, IMiraPlugin
{
public Harmony Harmony { get; } = new(Id);
public ConfigFile GetConfigFile() => Config;
public override void Load()
{
Harmony.PatchAll();
}
}