R2API Difficulty
API for adding custom in-game difficulties
About this mod Author’s original text
R2API.Difficulty - New Run Difficulties
About
R2API.Difficulty is a submodule assembly for R2API that allows mod creators to add their own Difficulties to the game.
Use Cases / Features
R2API.Difficulty is used for adding new difficulties to the game, These difficulties can include new behaviours depending on how the mod creator decides to implement the difficulty itself.
Difficulties added by DifficultyAPI by default will use negative DifficultyIndices, this is done because after RoR2 1.0.0.0, any DifficultyDef with an index greater than Eclipse 8 will recieve all the Eclipse modifiers. If you want this, you can always set "preferPositive" to true.
DifficultyAPI also comes bundled with the SerializableDifficultyDef, a ScriptableObject that holds the definition of a DifficultyDef, after being added by DifficultyAPI, the DifficultyDef and DifficultyIndex properties are assignedd values.
Related Pages
Changelog
'1.1.2'
- Make the API safer.
'1.1.1'
- First added custom difficulty would be incorrectly skipped from the rule catalog system init.
'1.1.0'
- Added the ability to hide new difficulties from the lobby screen
'1.0.2'
- Fix multiplayer lobby being empty (including if you selected to show incompatible games).
'1.0.1'
- Fix hooks not being properly enabled.
'1.0.0'
- Split from the main R2API.dll into its own submodule.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: