{"id":44253881,"url":"https://github.com/All-Of-Us-Mods/MiraAPI","last_synced_at":"2026-02-22T18:01:14.014Z","repository":{"id":255088918,"uuid":"800177097","full_name":"All-Of-Us-Mods/MiraAPI","owner":"All-Of-Us-Mods","description":"Easy to use Among Us modding API","archived":false,"fork":false,"pushed_at":"2026-02-08T22:30:47.000Z","size":35351,"stargazers_count":46,"open_issues_count":8,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-02-09T04:08:55.771Z","etag":null,"topics":["among-us","among-us-mods","amongus","amongus-mod","amongusmods","mira","mira-api","modding","modding-api","modding-tools"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/AllOfUs.MiraAPI","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/All-Of-Us-Mods.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-13T21:06:16.000Z","updated_at":"2026-02-08T22:30:10.000Z","dependencies_parsed_at":"2025-12-01T08:09:19.608Z","dependency_job_id":null,"html_url":"https://github.com/All-Of-Us-Mods/MiraAPI","commit_stats":null,"previous_names":["all-of-us-mods/miraapi"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/All-Of-Us-Mods/MiraAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/All-Of-Us-Mods%2FMiraAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/All-Of-Us-Mods%2FMiraAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/All-Of-Us-Mods%2FMiraAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/All-Of-Us-Mods%2FMiraAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/All-Of-Us-Mods","download_url":"https://codeload.github.com/All-Of-Us-Mods/MiraAPI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/All-Of-Us-Mods%2FMiraAPI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29721045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["among-us","among-us-mods","amongus","amongus-mod","amongusmods","mira","mira-api","modding","modding-api","modding-tools"],"created_at":"2026-02-10T16:00:29.770Z","updated_at":"2026-02-22T18:01:14.001Z","avatar_url":"https://github.com/All-Of-Us-Mods.png","language":"C#","readme":"[![](https://dcbadge.limes.pink/api/server/AEfHJGwggC)](https://discord.gg/AEfHJGwggC)\n\n\u003e This mod is not affiliated with Among Us or Innersloth LLC, and the content contained therein is not endorsed or otherwise sponsored by Innersloth LLC. Portions of the materials contained herein are property of Innersloth LLC. © Innersloth LLC.\n\n# Mira API\n\nA thorough, but simple, Among Us modding API and utility library that covers:\n- Roles\n- Options\n- Modifiers\n- Buttons\n- Custom Colors\n- Events\n- Voting\n- Assets\n- Compatibility\n- ~~Game Modes~~ (coming soon)\n\nMira API strives to be comprehensive, yet straightforward, while also using as many base game elements as possible.\nThe result is a less intrusive, better modding API that covers general use cases.\n\n**Join the [Discord](https://discord.gg/FYYqJU2bvp) for support and to stay updated on the latest releases**\n\n# Usage\n\nTo start using Mira API, you need to:\n1. Add a reference to Mira API either through a [DLL](https://github.com/All-Of-Us-Mods/MiraAPI/releases), project reference, or [NuGet package](https://www.nuget.org/packages/AllOfUs.MiraAPI).\n2. Add a BepInDependency on your plugin class like this: `[BepInDependency(MiraApiPlugin.Id)]`\n3. Implement the IMiraPlugin interface in your plugin class.\n\nMira API also depends on [Reactor](https://github.com/NuclearPowered/Reactor) to function properly!\nRemember to include it as a reference and `BepInDependency`!\n\nFor a full example, see [this file](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/ExamplePlugin.cs).\n\n## Recommended Project Structure\nIt is highly recommended to follow this project structure when using Mira API to keep your code clean and organized.\nYou can also view the Example Mod in this repository for some guidance.\n```\nMyMiraMod/\n├── Buttons/\n│   └── MyCoolButton.cs\n├── Options/\n│   ├── Roles/\n│   │   └── CoolCustomRoleOptions.cs\n│   └── MainOptionGroup.cs\n├── Patches/\n│   ├── Roles/\n│   │   └── CoolCustomRole/\n│   │       ├── PlayerControlPatches.cs\n│   │       └── ExileControllerPatches.cs\n│   └── General/\n│       └── HudManagerPatches.cs\n├── Resources/\n│   ├── CoolButton.png\n│   └── myAssets-win-x86.bundle\n├── Roles/\n│   └── CoolCustomRole.cs\n├── MyMiraModPlugin.cs\n└── MyModAssets.cs\n```\n\n## Roles\nRoles are straightforward in Mira API. There are two things you need to do to create a custom role:\n1. Create a class that inherits from a base game role (like `CrewmateRole`, `ImpostorRole`, etc.) \n2. Implement the `ICustomRole` interface from Mira API.\n\n**Disclaimer: Make sure your plugin class has the following attribute `[ReactorModFlags(ModFlags.RequireOnAllClients)]` or else your roles will not register correctly.**\n\nNote: For step 1, if you are making neutral roles,\nyou can choose either `CrewmateRole` or `ImpostorRole`,\nor even `RoleBehaviour` if you are okay with starting from scratch.\n\nMira API handles everything else, from adding the proper options to the settings menu,\nto managing the role assignment at the start of the game.\nThere are no extra steps on the developer's part.\n\nSee [this file](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Roles/CustomRole.cs) for a code example.\n\n## Modifiers\nMira API uses a different definition of 'modifiers' than other Among Us mods.\nFor example, in Town Of Us, a modifier is an extra \"ability\" that is applied on top of the base role.\nHowever, in Mira API, modifiers are very flexible.\nA modifier is anything that \"modifiers\" a player's abilities or interactions.\n\nMira provides three classes for working with modifiers:\n- `BaseModifier`: The base for every modifier. You MUST add and remove this modifier from a player manually!\n- `TimedModifier`: A modifier that has a time limit. This modifier has to be added manually, but will automatically remove itself after the time limit.\n- `GameModifier`: This works like the typical TOU modifier, where it is automatically applied at the beginning of the game, then removed at the end.\n\nModifiers provide various overridable functions and properties for custom behavior.\nThey can also be used for \"tagging\" a player.\nYou can check if a player has a modifier through the extension method `HasModifier` on a `PlayerControl` object.\n\nTo start using a modifier, pick one of the base classes above and create a class that inherits from it. Implement the properties and methods you would like, then add the `[RegisterModifier]` attribute to the class.\n\nAn example Game modifier can be found [here](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Modifiers/GameModifierExample.cs).\nAn example Timer modifier can be found [here](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Modifiers/ModifierTimerExample.cs).\n\n## Options\nOptions are also simple in Mira API.\nMira API handles all the hard work behind the scenes,\nso developers only have to follow a few steps to create their custom options.\nThe Options API is split up into Groups and Options.\nEvery Option needs to be in a Group.\n\nTo create a group, you need to create a class that inherits from the `AbstractOptionGroup` abstract class.\nGroups contain some properties for developers to control,\nincluding `GroupName`, `GroupColor`, `GroupVisible`, and `OptionableType`.\nThe full list of properties can be found in the `AbstractOptionGroup` class.\nOnly the `GroupName` is required.\n\nHere is an example of a group class:\n```csharp\npublic class MyOptionsGroup : AbstractOptionGroup\n{\n    public override string GroupName =\u003e \"My Options\"; // this is required\n    \n    [ModdedNumberOption(\"My Number Option\", min: 0, max: 10)]\n    public float MyNumberOption { get; set; } = 5f;\n}\n```\n\nYou can access any group class using the `OptionGroupSingleton` class like this:\n```csharp\n// MyOptionsGroup is a class that inherits from AbstractOptionGroup\nvar myGroup = OptionGroupSingleton\u003cMyOptionsGroup\u003e.Instance; // gets the instance of the group\nLogger\u003cMyPlugin\u003e.Info(myGroup.MyNumberOption); // prints the value of the option to the console\n```\n\nOnce you have an options group, there are two ways to make the actual options:\n- Use an Option Attribute with a property.  \n- Create a ModdedOption property.\n\n### Option Attributes\n\nThis is an example of using an Option Attribute on a property:\n```csharp\n// The first parameter is always the name of the option. The rest are dependent on the type of option.\n[ModdedNumberOption(\"Sussy level\", min: 0, max: 10)]\npublic float SussyLevel { get; set; } = 4f; // You can set a default value here.\n```\n\nHere are the available Option Attributes and their signatures:\n```csharp\nModdedEnumOption(string name, Type enumType, string[]? values = null, Type? roleType = null)\n    \nModdedNumberOption(\n    string name,\n    float min,\n    float max,\n    float increment=1\n    NumberSuffixes suffixType = NumberSuffixes.None,\n    bool zeroInfinity = false,\n    Type? roleType = null)\n\nModdedToggleOption(string name, Type? roleType = null)\n```\n\n### ModdedOption Properties\n\nAnd this is an example of a ModdedOption property:\n```csharp\npublic ModdedToggleOption YeezusAbility { get; } = new ModdedToggleOption(\"Yeezus Ability\", false);\n```\n\nThere are currently three types of ModdedOptions you can create:\n- `ModdedEnumOption`\n- `ModdedNumberOption`\n- `ModdedToggleOption`\n\nTo see a full example of an option class,\nsee [this file](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Options/ExampleOptions.cs).\n\n### Role Options\n\nYou can also specify a role type for an option or option group.\n\nTo set the role type for an entire group, set the `OptionableType` property on that group like this: \n```csharp\npublic class MyOptionsGroup : AbstractOptionGroup\n{\n    public override string GroupName =\u003e \"My Options\";\n    public override Type? OptionableType =\u003e typeof(MyRole); // this is the role that will have these options\n    \n    [ModdedNumberOption(\"Ability Uses\", min: 0, max: 10)]\n    public float AbilityUses { get; set; } = 5f;\n}\n```\n\nYou can also use a modifier type for the `OptionableType` property.\nThis will associate that option group with the specified modifier type\nand display it in the modifier options menu.\n\nAn example can be found [here](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Options/Roles/CustomRoleSettings.cs).\n\n## Custom Murders\nMira API provides its own implementation for murders.\nOur implementation allows for more customization on kills, and helps bypass server checks.\nYou can use `PlayerControl.RpcCustomMurder` to perform a networked custom murder, or `PlayerControl.CustomMurder` to normally perform a custom murder.\nFor example: \n```cs\nPlayerControl.LocalPlayer.RpcCustomMurder(Target, createDeadBody: false, teleportMurderer: false, playKillSound: false, resetKillTimer: false, showKillAnim: false);\n```\nThis will kill a player without creating a dead body and without teleporting the murderer.\n\n## Buttons\n\nMira API provides a simple interface for adding ability buttons to the game.\n\nThe only thing you need to do is create a class\nthat inherits from the `CustomActionButton` class and implement the properties and methods.\n\nMira API handles all other tasks and logic required to add the button to the game.\n\nIn case you need to access your `CustomActionButton` instance from another class,\nyou can use the `CustomButtonSingleton` class like this:\n```csharp\nvar myButton = CustomButtonSingleton\u003cMyCoolButton\u003e.Instance;\n```\n\nThe button API is straightforward, but provides a lot of flexibility.\nThere are various methods you can override to customize the behavior of your button.\nSee [this file](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI/Hud/CustomActionButton.cs) \nfor a full list of methods you can override.\n\nAn example button can be found [here](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/Buttons/ExampleButton.cs).\n\n## Custom Colors\n\nMira provides a simple Custom Color API that allows you to add custom player colors to the game.\n\nCreating custom colors isn't difficult, but there are some requirements for Mira to register your colors.\n\n1. Create a ***STATIC*** class to house all your `CustomColor` objects.\n2. Inside this class, create a `CustomColor` property for each color you intend to add.\n3. Add the `[RegisterCustomColors]` attribute to the class.\n\nHere is an example of a custom color class:\n```csharp\n[RegisterCustomColors]\npublic static class MyCustomColors\n{\n    public static CustomColor Cerulean { get; } = new CustomColor(\"Cerulean\", new Color(0.0f, 0.48f, 0.65f)); \n\n    public static CustomColor Rose { get; } = new CustomColor(\"Rose\", new Color(0.98f, 0.26f, 0.62f));\n    \n    public static CustomColor Gold { get; } = new CustomColor(\"Gold\", new Color(1.0f, 0.84f, 0.0f));\n}\n```\n\n## Assets\n\nMira API provides a simple, but expandable asset system.\nThe core of the system is the `LoadableAsset\u003cT\u003e` class.\nThis is a generic abstract class that provides a pattern for loading assets. \n\nMira API comes with a few asset loaders:\n1. `LoadableBundleAsset\u003cT\u003e`: This is used for loading assets from AssetBundles.\n2. `LoadableAddressableAsset\u003cT\u003e`: This is used for loading assets from Addressables.\n3. `LoadableResourceAsset`: This is used for loading **only sprites** from the Embedded Resources within a mod.\n4. `LoadableAudioResourceAsset`: This is used for loading **only audio clips** from the Embedded Resources within a mod.\n\nThe code below shows how to use an asset loaders:\n```csharp\n// Load a sprite from an AssetBundle\nAssetBundle bundle = AssetBundleManager.Load(\"MyBundle\"); // AssetBundleManager is a utility provided by Reactor\nLoadableAsset\u003cSprite\u003e mySpriteAsset = new LoadableBundleAsset\u003cSprite\u003e(\"MySprite\", bundle);\nSprite sprite = mySpriteAsset.LoadAsset();\n\n// Load a sprite from an Embedded Resource\n// Make sure to set the Build Action of your image to Embedded Resource!\nLoadableAsset\u003cSprite\u003e buttonAsset = new LoadableResourceAsset(\"ExampleMod.Resources.MyButton.png\");\nSprite button = buttonSpriteAsset.LoadAsset();\n```\n\nYou can view an example file [here](https://github.com/All-Of-Us-Mods/MiraAPI/blob/master/MiraAPI.Example/ExampleAssets.cs).\n\nYou can create your own asset loaders by inheriting from `LoadableAsset\u003cT\u003e` and implementing the `LoadAsset` method.\n","funding_links":[],"categories":["Utility Mods"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAll-Of-Us-Mods%2FMiraAPI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAll-Of-Us-Mods%2FMiraAPI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAll-Of-Us-Mods%2FMiraAPI/lists"}