Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FilterAPI

FilterAPI brings the official AMCI (All-client Mod Client Identification) protocol introduced in Among Us 18.0 to BepInEx mods: modded lobbies get a real identity, modded hosting, and mod-filtered lobby search — with a single attribute and a single button.

Features

  • Mod registration — register your mod with the official AMCI protocol by adding one attribute to your plugin class ([AmciModGuid]).
  • "Mod" button — a dedicated button in the create-game screen (cloned from the vanilla mode buttons) toggles modded lobby filtering on and off.
  • Modded hosting — while enabled, hosting uses the HostModdedGame tag (25) with your mod GUID appended, so the server can identify the lobby as modded.
  • Mod-filtered search — while enabled, the lobby search carries a mod filter, so only lobbies running the same mod GUID are shown.
  • Zero vanilla-client pollution — vanilla clients never see modded lobbies in the public list (they are excluded from the normal matchmaking pool), and modded clients with the filter off behave exactly like vanilla clients.

Requirements

  • Among Us 18.0 or newer (the AMCI client integration only exists in 18.0+)
  • BepInEx 6 (IL2CPP), e.g. BepInEx.Unity.IL2CPP 6.0.0-be.735
  • A server that implements AMCI:
    • the official Innersloth servers, or
    • a custom server such as Impostor with AMCI support (HostModdedGame handling + mod filter matching + modded-lobby exclusion from the normal list)

Installation (players)

  1. Drop FilterAPI.dll into BepInEx/plugins/.
  2. Install at least one mod that registers an AMCI GUID (i.e. a mod built against FilterAPI with the [AmciModGuid] attribute, e.g. FilterAPI.Example). Without it there is nothing to register and the button does nothing.

Usage (mod authors)

  1. Reference this project or the FilterAPI NuGet package.
  2. Add the attribute to your plugin class:
using FilterAPI.Attributes;

[BepInPlugin("com.example.mymod", "My Mod", "1.0.0")]
[AmciModGuid("5b9e6f2a-1c4d-4a7e-9f3b-8d2c6e0a4f1d")] // your own self-assigned v4 GUID
public class MyModPlugin : BasePlugin
{
}

Get a GUID from any UUID generator, e.g. https://www.uuidgenerator.net/.

  1. (Optional) Reference FilterAPI.Networking.AmciMods from your mod to query the registered GUIDs:
AmciMods.Primary      // Guid? — the primary registered AMCI GUID
AmciMods.Registered   // IReadOnlyDictionary<string, Guid> — all registered mod ids → GUIDs
AmciMods.IsEnabled    // bool — whether modded filtering is currently active

Behavior

Client state Hosting Lobby search
Mod button on HostModdedGame tag + mod GUID → lobby is modded Only lobbies with the same mod GUID (modded lobbies of other mods and vanilla lobbies are hidden)
Mod button off normal HostGame → vanilla lobby Only vanilla lobbies (modded lobbies are excluded, same as a vanilla client)
Vanilla client (no FilterAPI) Never sees modded lobbies

Note: the "off" state intentionally mirrors the vanilla client — modded lobbies are only visible through a mod filter, matching the official AMCI design ("modded games are excluded from the normal matchmaking pool").

Configuration

BepInEx/config/ume.filter.api.cfg:

Key Default Description
AMCI.Enable true Whether the AMCI mod GUID is registered with the matchmaker (hosting + search). Equivalent to the in-game "Mod" button.

How it works

  1. FilterAPI scans all loaded BepInEx plugins for the [AmciModGuid] attribute and collects their GUIDs (AmciMods).
  2. AmciMods.Apply() writes the primary GUID into the vanilla CurrentModRegistration.ModRegistrationGuidString.
  3. The vanilla 18.0 client does the rest:
    • InnerNetClient.HostGame checks CurrentModRegistration.TryGetModRegistrationGuid() and switches to the HostModdedGame tag (25) with the 16-byte GUID appended.
    • HttpMatchmakerManager.CoRequestGameListFiltered calls UpdateFilterSetWithModRegistrationSettings, which adds a mod filter to every matchmaking request.
  4. The server marks the lobby as modded, excludes it from the normal pool, and only returns it to searches carrying the matching mod filter.

Server side (Impostor)

The server must support:

  • the HostModdedGame message (tag 25) with the trailing 16-byte mod GUID (marks the lobby as modded),
  • the "mod" matchmaking filter (ModFilter with AcceptedValues),
  • excluding modded lobbies from unfiltered searches.

Building

dotnet build FilterAPI/FilterAPI.csproj -c Release
dotnet pack FilterAPI/FilterAPI.csproj -c Release   # produces the NuGet package

The project references AmongUs.GameLibs.Steam and BepInEx from the BepInEx NuGet feed (https://nuget.bepinex.dev/v3/index.json) — see nuget.config if restore fails.

Example

FilterAPI.Example is a minimal plugin that registers a sample AMCI GUID. Install it alongside FilterAPI to test the flow end to end (host a lobby with the Mod button on, then search for it from a second client with the Mod button on).

About

FilterAPI support the new Innersloth Matchmaker Filter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages