Rainflayer

⭐ — (2 endorsements) 📥 248 downloads 📌 v1.1.1 📅 3/6/2026
🟡 Updated this year

By Rainflayer · Client-side

⬇ Download Mod Source: Thunderstore ↗ 📅 Updated: 3/10/2026 📅 Created: 3/6/2026

🔍 Analysis

  • 🏆 #3 of 16 Client-side mods in this game by downloads

📋 About This Mod

Rainflayer LLM-controlled Risk of Rain 2 via BepInEx mod + Python brain Early development — expect bugs, rough edges, and missing features. Setup | Protocol Reference | Architecture | Youtube Showcase Rainflayer connects a large language model to Risk of Rain 2. A BepInEx mod exposes game state (enemies, inventory, objectives, interactables) over a local TCP socket. A Python brain queries that state every few seconds, feeds it to an LLM, and sends back strategic commands that the mod executes at 50 Hz — movement, aiming, skills, camera, all without simulating mouse or keyboard input. Inspired by Mindcraft and Mineflayer . Why Rainflayer? vs. existing bot mods (PlayerBots, ImprovedSurvivorAI) Mods like PlayerBots and ImprovedSurvivorAI use RoR2's native AISkillDriver system — static, hand-tuned rule sets baked into the mod at compile time. They work well as NPC teammates, but their behavior cannot be changed at runtime. You cannot tell them to play more aggressively, follow you to the teleporter, wait around and farm chests, or adapt to what's happening in the run. Rainflayer exposes a reasoning layer. The LLM reads live game state every few seconds and issues commands that dynamically reshape behavior mid-run. Directives like play defensively or go open that chest are interpreted in context and translated into actual inputs. PlayerBots gives you a reliable NPC teammate, while Rainflayer is an experiment in giving an AI agency in a game. Rainflayer runs entirely on consumer hardware using API calls — no local GPU or training involved. The goal is to explore what's achievable with foundation models and game-level APIs today. Who this is for Developers building AI agents who want a real game environment as a testbed Content creators interested in AI + gaming crossover Hobbyists curious about what LLM-driven play actually looks like in practice Modded Risk of Rain 2 players looking for something new This is not a drop-in replacement for a human co-op partner. It's experimental and proof-of-concept — if you want a reliable RoR2 teammate, the RoR2 community has no shortage of players. This exists because nothing quite like it exists yet, and because the broader vision of an AI that can play any game (not just RoR2) is worth exploring. System requirements and RAM usage A common concern with AI mods is RAM overhead. Here's what Rainflayer's expectage usage looks like: Component RAM usage BepInEx mod (C# plugin) < 5 MB Python brain ~50–100 MB Local GPU Not required All LLM inference runs remotely via the Novita.ai API, the Python brain is a lightweight script that makes HTTP calls. Only internet connection is required. Disclaimers Active development, not a finished product. Rainflayer is in early proof-of-concept/beta. Core functionality works but expect rough edges, untested edge cases, and breaking changes between versions. Not all survivors are fully tested. Behavior quality varies by character. Some may work well, others may have unresolved issues. This project includes AI-assisted and AI-generated code. Some portions were created with the assistance of large language models. If you have concerns about AI-generated code, please be aware before using or contributing. Use at your own risk. Rainflayer takes full control of your character. Set EnableAIControl = false in the mod config when you want to play normally without removing the mod. How It Works ┌─ Python Brain (Strategic, ~0.25 Hz) ────────────────┐ │ Llama 4 Maverick 17B via Novita.ai │ │ Reads game state → LLM → commands │ └────────────────────── ↕ TCP :7777 ──────────────────┘ ┌─ BepInEx Mod (Tactical, 50 Hz) ─────────────────────┐ │ Intercepts InputBank + CameraRigController │ │ Entity detection, pathfinding, skill execution │ └──────────────────── Risk of Rain 2 ─────────────────┘ While the brain plays, you can type natural-language goals to influence its decisions in real time: directive> go activate the teleporter directive> play more aggressively directive> clear directive> status This is just the minimum usage case - connecting to your own custom LLMs / AI projects is intended as the broader use case. Requirements Risk of Rain 2 (Steam) BepInEx 5.x — download or install via r2modman Python 3.10+ Novita.ai API key — get one (~$0.10–0.50/hr for Llama 4 Maverick 17B) Installation 1. Install the mod Via mod manager (recommended): Install with r2modman or Thunderstore Mod Manager from the Thunderstore page. Manually: Download the latest release, and drop Rainflayer.dll into your BepInEx/plugins/ folder. Repeat for dependencies. Launch RoR2 once to generate the config file, then close it. 2. Set up the Python brain python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt Create a .env file in the repo root: NOVITA_API_KEY=your_novita_api_key_here 3. Run Load into a solo run in RoR2, then in a separate terminal: source venv/bin/activate python -m brain.main The brain waits up to 2 minutes for the mod to connect. Once connected, it starts making decisions every 4 seconds. ============================================================ rainflayer — RoR2 LLM Brain Server Llama 4 Maverick 17B via Novita.ai ============================================================ Game connected at 12:34:56 Brain is running. Type a directive to influence its decisions. directive> Configuration Mod config Generated at BepInEx/config/justindwang.rainflayer.cfg after first run: EnableAIControl = true DebugMode = false Brain options python -m brain.main --interval 4.0 # decision interval in seconds (default: 4.0) python -m brain.main --timeout 120 # seconds to wait for game connection How the AI Makes Decisions Every few seconds the brain queries the mod for the current game state — health, gold, nearby enemies, interactables, teleporter charge — and sends it to an LLM (Llama 4 Maverick 17B). The LLM returns a short list of commands that the mod executes immediately. The commands the AI can send: Navigation & Interaction Command Args Effect FIND_AND_INTERACT chest Navigate to nearest chest and open it FIND_AND_INTERACT shrine Navigate to nearest shrine and use it FIND_AND_INTERACT teleporter Navigate to teleporter and activate it FIND_AND_INTERACT pillar Navigate to nearest uncharged moon battery pillar and interact (moon2 only) FIND_AND_INTERACT jump_pad Navigate to the jump pad leading to the Mythrix arena (moon2 only) FIND_AND_INTERACT ship Navigate to the rescue ship to escape the moon after defeating Mythrix (moon2 only) GOTO CANCEL Cancel current navigation and clear all island/return-path tracking BUY_SHOP_ITEM Item Name Navigate to nearest shop and buy named item FIND_AND_INTERACT handles the full navigation → combat → interaction loop. If combat interrupts it (enemy within 10m), the mod pauses and resumes after the threat clears. pillar , jump_pad , and ship are long-running journeys (60–120s) — issue once and wait. Moon2 / Commencement Commencement (moon2) has a distinct set of objectives: charge four battery pillars → use the jump pad → defeat Mythrix → escape to the rescue ship. The general flow is: FIND_AND_INTERACT:pillar — navigates across the main platform and through the appropriate passage to the nearest uncharged pillar, activates it, and stands inside the zone until it's fully charged. After charging, use MODE:defend_zone to hold position while the charge ticks up. Repeat for all four pillars. After each pillar charges, the AI returns to the main platform and proceeds to the next. FIND_AND_INTERACT:jump_pad — navigates to the mass island, crosses the chain bridge, and reaches the jump pad teleporting into the Mythrix arena. Fight Mythrix with MODE:combat and STRATEGY:aggressive . FIND_AND_INTERACT:ship — after defeating Mythrix, navigates through the arena escape orb, follows the blood passage back to the main platform, and reaches the rescue ship. There are also GOTO:<island> commands ( blood , soul , mass , design ) for recover

(Experimental) LLM Integration for Risk of Rain 2 Player Control

📊 Mod Details

Game
Thunderstore Mods
Author
Rainflayer
Version
1.1.1
Downloads
248
Endorsements
2
Category
Client-side
Created
3/6/2026
Updated
3/10/2026
Tags
Client-side, Mods, AI Generated, Tools

🔧 How to Install Thunderstore Mods

Use r2modman/Thunderstore Mod Manager. Or manual: install BepInEx, drop mods into plugins folder.

📖 Full step-by-step install guide for Thunderstore →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Thunderstore commands, item IDs, and more.

Keep browsing — more Thunderstore mods await

📋 All Thunderstore Mods 🏆 Top 25 📂 More Client-side 👤 More by Rainflayer 🔎 Similar Mods 🌐 Best Client-side (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods