R2API is a modding framework for other mods to work in, providing centralized and simplified APIs for Risk of Rain 2.
This helps keep mods compatible with each other.
At its core, R2API should not change how the game behaves without any other mod installed.
The only change is to keep mods out of quickplay and prismatic trials by request of the Hopoo Games team.
The usage of a mod manager is heavily recommended, you can use r2modman or the thunderstore mod manager.
If you want to manually install still:
-
Install BepInEx.
-
Install HookGenPatcher.
-
Copy the files inside the
plugins
folder from the zip into theBepInEx/plugins
.
Since the R2API 5.0.0
version update, mod creators should ideally only reference the packages they need in their C# projects and their thunderstore packages.
In the dependency array of their thunderstore manifest, they should reference the R2API packages from the RiskofThunder
team, for example: RiskofThunder-R2API_LobbyConfig-1.0.0
In their C# projects, they should only get the corresponding R2API submodules dll they need.
You can do that in a multitude of ways, depending on your workflow:
-
Nuget Package Manager:
- You can access this in Visual Studio by right clicking your project within the Solution Explorer, and installing packages through that manager directly:
- The packages are available under the
RiskofThunder
nuget account, and you can find them through the search bar by typingR2API
.
- The packages are available under the
- You can access this in Visual Studio by right clicking your project within the Solution Explorer, and installing packages through that manager directly:
-
Manually adding nuget:
- We have a wiki page that also explains it
- Edit your .csproj file, and in your ItemGroup (something like this), add PackageReference lines for each R2API module you depend on:
<PackageReference Include="R2API.Networking" Version="1.0.2" />
- You can find these lines for each package on the Risk of Thunder nuget account.
-
Download the dlls directly from thunderstore:
- Add them through the Solution Explorer, right clicking your project, Add -> Project Reference, and selecting the wanted .dll files.
-
If you use Unity:
- You can download the dlls, and drag and drop the modules' dll directly into your Unity Project under any folders that are under the root Assets/ folder.
A lot of documentation is in the included xmldocs, and further information may be on the dedicated R2API wiki.
Do not hesitate to ask in the modding discord too!
Artifacts builds are available under the Action tab, they are built after each commit / pull requests.
We welcome any contributions, please read the CONTRIBUTING.md file
The changelog for all previous major versions can always be found on GitHub.
If you want the changelog for the current major version, please check the corresponding R2API modules READMEs.