Drastic-RiskOfFrames icon

RiskOfFrames

Performance for big modpacks: faster startup and less wasted CPU work in late-game fights. Works as host, solo and client (host doesn't need it).

By Drastic
Last updated 12 hours ago
Total downloads 297
Total rating 0 
Categories Tweaks Client-side AI Generated
Dependency string Drastic-RiskOfFrames-0.0.27
Dependants 0 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2121 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2121

README

RiskOfFrames

Performance for Risk of Rain 2 with big modpacks. On a typical gaming PC the game is limited by its main CPU thread, not the graphics card, so lowering graphics settings barely helps. This mod removes CPU work instead, and cuts startup time. Every feature was measured on and off in real fights with a ~150-mod pack.

Works when you host, play alone, or join someone (the host doesn't need it). Every feature can be switched on or off in BepInEx/config/daz.RiskOfFrames.cfg; most apply immediately, startup ones at the next launch.

Fights

Feature Default What it does
Overload Mode (30 Hz When Overloaded) on (solo / joining) When FPS stays under 30 for 2 s, the game simulates 30 steps per second instead of 60 until FPS is back above 45. Measured 32% faster frames as host/solo and 20% as client in heavy fights. While active, very fast attacks and short hit windows are checked half as often. Hosting others: opt-in (Also While Hosting Others).
Projectile Per-Frame Updates on Projectile visuals and network positions are updated once per rendered frame instead of on every physics step.
Offscreen Culling on Off-screen characters skip writing their bone poses (their animation logic still runs); off-screen effect particles, item models and limb IK pause. Never your own character.
Batch Damage Numbers on Writes all of a frame's damage numbers in one pass instead of copying every number on screen for each new one.
Corpse Cleanup on Finished death animations stop; settled ragdolls freeze; above the corpse limit the oldest corpses fade even when visible.
Idle Sound Emitters / Merge Duplicate Sounds on Finished pooled sound emitters stop updating; identical sounds at the same spot in one frame play once.
Merge Duplicate Effects on The same effect spawned at the same spot several times in one frame spawns once.
Faster Target Searches on Host: target searches build only the results asked for; homing missiles stop re-searching every step when there's nothing to find.
Lean Projectile Physics on Projectiles with nothing to draw skip rigidbody interpolation.
Leaner Inventory Updates on Host: monsters' item effects refresh every 4th step instead of every step.
Limit Catch-Up Spikes on Caps physics catch-up at 8 steps per frame, which stops 400 ms freezes from spiralling. Solo/client by default.
CustomEmotesAPI Idle Cost on, if installed Idle emote components don't run every frame.
Performance Log on FPS and fight size every 30 s to BepInEx/RiskOfFrames-perf.csv.

Startup

Measured 176 s → ~76 s to the main menu with a 158-mod pack.

Feature What it does
Fast Post-Processing Init Caches the post-processing type scan (63 s → 0.01 s with a big pack).
Draw Loading Screen Less Often Draws the loading screen every 6th frame, so loading gets the time.
Pause Garbage Collection During Startup No GC passes over a multi-GB heap while almost nothing is garbage yet; resumed at the main menu or at a memory limit.
Prefetch Mod Asset Bundles Opens the bundles mods will load in the background as soon as mods start loading.
Faster System Initializers / Faster Content Loading / Uncapped Loading Screen Removes per-frame time slicing and busy-waiting from the game's loaders.
Startup Scan Cache, Defer Config Saving, Skip Log Stack Traces, High Loading Priority, Skip Splash And Intro Smaller startup savings.

Opt-in: Graphics Jobs (Next Launch) adds gfx-enable-gfx-jobs=1 to the game's boot.config (measured anywhere from 14% faster to 9% slower; turn it off and launch once before uninstalling).

Files

  • plugins/RiskOfFrames.dll: the mod.
  • plugins/rof_native.dll: small native helper library (Rust); optional, everything works without it.
  • patchers/RiskOfFrames.Early.dll: startup features that must run before other mods load.