risk-of-thunder / R2API

A modding API for Risk of Rain 2
https://thunderstore.io/package/tristanmcpherson/R2API/
MIT License
134 stars 55 forks source link
bepinex hacktoberfest modding monomod risk-of-rain-2

R2API – a modding API for Risk of Rain 2

GitHub Actions Build

About

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.

Installation

Check out this page from the R2Wiki on how to install mods

Developing mods using R2API

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.

On top of the BaseUnityPlugin, you should add a BepInDependency, for example [BepInDependency(DirectorAPI.PluginGUID)]

For then adding the dependency on the C# Project level, you can do that in a multitude of ways, depending on your workflow:

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!

Bleeding Edge / Artifacts

Artifacts builds are available under the Action tab, they are built after each commit / pull requests.

Contributing to R2API

We welcome any contributions, please read the CONTRIBUTING.md file

Changelog

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.