R2API Colors

v1.0.3·Updated 2024-10-21

API for registering Colors to the game

About this mod Author’s original text

R2API.Colors - Easy Addition of Colors and Damage Colors

About

R2API.Colors is a submodule for R2API that adds a single unified method for adding both Colors and Damage Colors to the game.

These new colors can be used on Attacks for adding unique coloration to the damage numbers, and add unique colors to ItemTiers, and more miscellaneous color usages.

Use Cases / Features

R2API.Colors can be used for mods to add their own ColorIndex and DamageColorIndex to the game, which then can be used in a plethora of scenarios.

This is done via code by methods that return the ColorCatalog.ColorIndex or DamageColorIndex that will represent said color.

Alongsided this, R2API.Colors also adds two new Scriptable Objects, which can be used to pre-serialize Color Indices.

These are the SerializableColorCatalogEntry and the SerializableDamageColor.

These scriptable objects can later be used for example, in EntityStateConfigurations for serializing the DamageColorIndex of a certain attack in an entity state.

Related Pages

Changelog

'1.0.3'

  • Fix compatibility with other mods that modify ColorCatalog.

'1.0.2'

  • Fix for SOTS update.

'1.0.1'

  • Fix the NuGet package which had a dependency on a non-existent version of R2API.Core.

'1.0.0'

  • Split from the main R2API.dll into its own submodule.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackRiskofThunder-HookGenPatcherRiskofThunder-R2API_Core

File & checksum

Filename
R2API_Colors-1.0.3.zip
File size
14.6 KiB