-
Notifications
You must be signed in to change notification settings - Fork 55
Home
R2API is designed to provide an abstraction layer in order to expose and simplify APIs to allow developers to modify Risk of Rain 2 more easily, while still keeping mod interoperability in mind.
R2API provides 3 files, each with a different purpose:
This is a MonoMod patch and is ran before any plugin is initialized
- It fixes certain behaviour in the
CatalogModHelper
class - It prevents the game for searching non-game assemblies to prevent stuttering.
- It prevents certain methods from inlining so that they can be hooked.
This assembly provides the On and IL hooks to R2API and other mods.
R2API consists of two parts: it's submodules and it's utility functions.
Starting with the December Content Update for Risk of Rain 2, mods will need to explicitly request submodules to be loaded. These are loaded under the R2API
namespace.
AssetAPI provides a way to load assetbundles into the game. Often used in combination with ResourcesAPI
AssetPlus is an external project for loading language tokens/files, sounds and fonts. It's core repo may be found here
Currently located under Utils.CommandHelper
, CommandHelper allows mods to initialize their convars and concommands.
DifficultyAPI adds a unified way for difficulty mods to add themselves to the menu.
ItemAPI adds a unified way to add Items, equipment, and elites to the game
ItemDropAPI creates a way for custom items and equipment to drop, while also allowing modders to prevent certain pickups from dropping.
LobbyConfigAPI adds a unified way to add rules to the pregame lobby.
PlayerAPI is not a valid submodule at the time of writing. If it were, it'd provide an abstraction layer to the playerstats for an easier way of modifiying these.
ResourcesAPI creates a detour for mods to load in their own resources/assets.
SurvivorAPI adds a unified way to add additional survivors.
SkinAPI Ask Rein
SkillAPI Ask Rein
These are generally located under R2API.Utils
namespace.
Currently located under R2API
namespace, this class is for creating generic notifcations.
Eases up creating (colored) chat messages on mods.
After using R2API.Utils
, this allows mods to generate block messages on their Logger provided by BepInEx.
After using R2API.Utils
, this extends types and objects with cacheable reflection methods. See the Risk of Thunder Wiki.