Skip to content

Risk of Rain 2

DigitalHeaven.Games.RiskOfRain2 WIP is a BepInEx 5 mod that brings DigitalHeaven avatar replacement to Risk of Rain 2.

Mod loaderBepInEx 5
Game versionMono (default Steam build)
Rendering pipelineBuilt-in
Humanoid rigFull Unity Avatar rig (17 required bones)

This mod depends on the DigitalHeaven.Unity library for model loading, rig setup, and material creation.

FeatureStatus
OverlayWIP
Avatar replacementWIP
FeatureStatus
Avatar syncWIP

The mod uses full replacement with multiplayer synchronization:

  1. When a player spawns, the mod hides the game’s character meshes
  2. A DH avatar is instantiated and parented under the active character
  3. Pose mirroring copies animations from the game’s Animator to the DH avatar using HumanPoseHandler
  4. The DH avatar is auto-scaled to match the game character’s proportions using humanScale

Avatar barcodes are synchronized across all players using custom HLAPI network messages. When a remote player is using an avatar from a pallet you don’t have locally, the mod can request the pallet data from that player via the network.

Config file: BepInEx/config/io.mltn.digitalheaven.ror2.cfg

SettingSectionDefaultDescription
PlayerAvatar[DigitalHeaven]""Barcode for the player avatar
[DigitalHeaven]
PlayerAvatar = io.example.my-avatar:avatar.dh-avatar

The mod project lives at Games/DigitalHeaven.Games.RiskOfRain2/ and is included in the main DigitalHeaven.sln solution under the Games folder.

Copy DigitalHeaven.Games.RiskOfRain2.csproj.user.example and remove the .example extension. This file configures your local game install path and is git-ignored:

DigitalHeaven.Games.RiskOfRain2.csproj.user
<Project>
<PropertyGroup>
<RoR2Dir>D:\SteamLibrary\steamapps\common\Risk of Rain 2</RoR2Dir>
</PropertyGroup>
</Project>

By default, RoR2Dir is used to locate both BepInEx and the game’s managed assemblies. You can override them individually:

PropertyDefaultDescription
RoR2Dir(see .csproj)Base game path. Controls everything if the other properties are not set.
RoR2ManagedDir$(RoR2Dir)\Risk of Rain 2_Data\ManagedDirectory containing the game’s managed assemblies (Unity engine, RoR2, Assembly-CSharp, etc.).
BepInExDir$(RoR2Dir)\BepInExBepInEx root directory containing core\ and plugins\ folders.

The project references BepInEx DLLs from $(BepInExDir)\core\ and game assemblies from $(RoR2ManagedDir). After building, a post-build target automatically deploys the mod and its dependencies to $(BepInExDir)\plugins\DigitalHeaven\.

The project targets netstandard2.1 and references DigitalHeaven.Core, DigitalHeaven.Unity, DigitalHeaven.Overlay, and DigitalHeaven.Unity.Overlay as project dependencies.