CallOfCreator.PathfindingAPI 1.0.0

dotnet add package CallOfCreator.PathfindingAPI --version 1.0.0
                    
NuGet\Install-Package CallOfCreator.PathfindingAPI -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CallOfCreator.PathfindingAPI" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CallOfCreator.PathfindingAPI" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CallOfCreator.PathfindingAPI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CallOfCreator.PathfindingAPI --version 1.0.0
                    
#r "nuget: CallOfCreator.PathfindingAPI, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CallOfCreator.PathfindingAPI@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CallOfCreator.PathfindingAPI&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CallOfCreator.PathfindingAPI&version=1.0.0
                    
Install as a Cake Tool

Pathfinding API

An Among Us mod that adds pathfinding support for other mod developers to use.

Features

  • Uses A* pathfinding to find routes through the map while checking for collisions
  • Supports Airship moving platforms, ladders, Fungle ziplines, doors, decontamination doors, and vents

Submerged is not fully supported yet. The API may be able to find normal walking routes, but it does not currently handle Submerged elevators or other custom map mechanics.

Installation

  1. Download PathfindingAPI.dll from the Releases tab.
  2. Place it in BepInEx/plugins alongside Reactor.dll. Reactor is required.
  3. Install a mod that uses the API. Pathfinding API does not create NPCs by itself

All players in the lobby need both Pathfinding API and Reactor installed.

Usage

Add a reference to your project

Reference PathfindingAPI.dll directly or add it as a project reference.

There is currently no NuGet package.

Then add the following dependency to your main plugin class:

[BepInDependency(PathfindingPlugin.Id)]

Move a player

using PathfindingAPI.Core;
using PathfindingAPI.Movement;
using PathfindingAPI.Navigation;
using PathfindingAPI.Options;
using Reactor.Utilities;
using UnityEngine;
Coroutines.Start(PlayerControl.LocalPlayer.CoMoveTo(
    new Vector2(x, y),
    result =>
    {
        if (result.Status == PathMovementStatus.Arrived)
            DoSmtArrived();
        else
            DoSmt(result);
    },
    options: new PathOptions { AutoOpenDoors = true }));

Replace DoSmtArrived and DoSmt with your own handlers.

The callback runs when movement either finishes or fails. The result includes the movement status, planned path, and the waypoint where movement stopped.

Call this on the client that owns the player. If you want to move another player's character, send the request to that player's client first Movement itself will synchronize normally.

PathOptions controls which types of routes the pathfinder is allowed to use:

Option What it does
UseLadders Allows routes that use ladders.
UseZiplines Allows routes that use Fungle ziplines.
UseDecontamination Allows routes through decontamination doors and waits for their normal cycle.
UseMovingPlatforms Allows routes that use the Airship moving platform.
WaitForDoors Allows routes through closed doors and waits for them to open. When disabled, closed doors are avoided unless AutoOpenDoors is enabled.
UseVents Allows routes through connected vents when the player's role is allowed to vent.
AutoOpenDoors Requests that a closed door opens when the player reaches it.

Ladders, ziplines, decontamination, and moving platforms are enabled by default

WaitForDoors, AutoOpenDoors, and UseVents are disabled in a new PathOptions instance.

When no options are provided for a player-based search, vent usage follows that player's normal vent permissions.

The API can also find routes for NPCs, but it does not create or manage custom NPCs for you, vent traversal is only available if the player's current role allows them to vent.

For grid spacing, wall costs, and other pathfinding settings, see PathOptions.cs.

Movement tolerance is in PathMovementSettings.cs. Pass these settings to CoMoveTo or FollowPath when you need to change them.

Find a route without moving

Create a request using two Vector2 positions. start is the starting position and goal is the destination.

var request = MapPathfinding.CreateRequest(start, goal);

Call request.Step() once per frame until request.Status is no longer PathStatus.Searching.

After that, read request.Result. Only use the returned points if the result status is PathStatus.Found.

To cancel an unfinished search, call:

request.Cancel();

Do not set PathStatus.Cancelled manually.

You can also yield request.Run() from a coroutine to let the search run over multiple frames

If you prefer using a callback:

Coroutines.Start(MapPathfinding.FindPath(start, goal, path =>
{
    if (path.Status == PathStatus.Found)
        ShowRoute(path.Points);
}));

Replace ShowRoute with your own handler

Follow a route you already planned

Coroutines.Start(player.FollowPath(
    path,
    result => OnMovementEnded(result)));

The player should start near the route's first waypoint

FollowPath follows the route you provide, while CoMoveTo first calculates a route from the player's current position.

Movement stops if the player becomes blocked or cannot use one of the required crossings.

Your callback can start another pathfinding request if needed. For example, you could retry with UseMovingPlatforms = false if the Airship moving platform cannot be used

Results

Movement status Meaning
Arrived The player reached the final waypoint.
NoPath Pathfinding failed. Check the path's search status for more information.
Cancelled The supplied pathfinding request was cancelled.
Interrupted Movement was interrupted because the player died or disconnected, a meeting started, or the game ended.
NotOwner This client does not own the player
Busy The player cannot move or already has an active path follower.
Blocked The player stopped moving or failed to make progress.
TraversalFailed A transport, crossing, or doorway could not be used.
InvalidPath The supplied path contains invalid waypoint or crossing data.

Credits

Disclaimer

This mod is not affiliated with Among Us or Innersloth LLC, and the content contained within it is not endorsed or sponsored by Innersloth LLC. Portions of the materials contained herein are the property of Innersloth LLC.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 64 9/19/2026