This mod allows the AI VTuber Neuro-sama to take control of a RimWorld colony! It uses the official Neuro Game SDK to connect the game to Neuro, enabling her to monitor the colony's status and make decisions by executing various in-game actions.
Author: DavidLek
Supported RimWorld Version: 1.6
Note: this is tested in core game using Tony, no DLC required, if DLC is enabled, then Neuro can spawn events, items, or pawns in that DLC too.
WIP: new actions will be added in the future if I have time, PRs are welcome.
- Two Operation Modes: Choose between Storyteller Mode for god-like powers (spawning raids, items, etc.) and Player Mode for a more standard gameplay experience (managing work, drafting, etc.).
- Colonist Management: Neuro can manage colonist work priorities, set research projects, draft/undraft them, forbid items, and designate animals for hunting, taming, or slaughter.
- Combat Control: She can arm colonists with the best available weapons or assign specific weapons to individuals. She can also order colonists to attack specific targets.
- Storyteller Powers: In Storyteller mode, Neuro can trigger a wide variety of friendly, hostile, and environmental events, change the weather, spawn items and pawns, initiate drop pod raids, alter faction relations, and even force mental breaks or inspirations.
- Comprehensive Reporting: The mod sends periodic, detailed reports about the colony's status to Neuro, keeping her informed about colonists, resources, power, research, and threats.
- Automatic Activation: The mod's features activate automatically when a map is loaded and deactivate when returning to the main menu.
The mod integrates the Neuro Game SDK into RimWorld. It establishes a WebSocket connection to a server that Neuro-sama is connected to.
- Sending Data: On a regular interval (every 1500 ticks, or ~25 seconds on normal speed), the mod gathers comprehensive data about the current game state, formats it into a markdown report, and sends it to Neuro as a context message.
- Receiving Actions: Neuro can execute any of the available "actions" at any time. When she decides to do something, the server sends an action message back to the mod.
- Executing Actions: The mod receives the message, validates the parameters, and executes the corresponding in-game function, whether it's changing a colonist's job, spawning a raid, or dropping a meteorite.
You can install this mod either by downloading a pre-packaged release or by building it from the source code.
-
Prerequisites:
- A legitimate copy of RimWorld (version 1.6).
- The Harmony mod, which is a requirement for most RimWorld mods.
-
Download the Mod:
- Grab the latest
.zipfile from the release page.
- Grab the latest
-
Install the Mod:
- Unzip the downloaded file.
- Place the resulting
NeuroPlaysRimworldfolder into your RimWorldModsdirectory.
-
Activate in-game:
- Launch RimWorld.
- Go to the Mods menu.
- Enable Harmony and Neuro Plays Rimworld.
- Make sure Harmony is loaded before this mod. Your mod load order should look like this:
- Harmony
- Core
- Neuro Plays Rimworld
- (Other mods...)
- Restart RimWorld as prompted.
-
Prerequisites:
- Visual Studio 2022 (with the ".NET desktop development" workload).
- .NET Framework 4.7.2 Targeting Pack.
- A local copy of the RimWorld game.
-
Clone the Repository:
git clone https://github.com/DavidLek/RimworldNeuroMod.git cd RimworldNeuroMod/RimworldNeuroMod -
Configure Project File:
- Open
RimworldNeuroMod.csprojin a text editor. - Find the
<RimWorldPath>property. - Change its value from
D:\RimWorldto the full path of your RimWorld installation directory. This is crucial for the project to find the game's code libraries.<PropertyGroup> ... <RimWorldPath>C:\Program Files (x86)\Steam\steamapps\common\RimWorld</RimWorldPath> ... </PropertyGroup>
- Open
-
Build the Mod:
- Open
RimworldNeuroMod.csprojin Visual Studio. - NuGet packages (like the Neuro SDK) should be restored automatically. You also need to get the Harmony dependency from here or directly from the Harmony mod (
0Harmony.dll). - Set the solution configuration to Release.
- Build the project (Build > Build Solution, or
Ctrl+Shift+B). - The build process is configured to automatically copy the compiled mod and all its dependencies directly into your RimWorld
Modsfolder.
- Open
-
Activate in-game:
- Follow Step 4 from the "From Release" instructions above to activate the mod in the game's menu.
To connect to Neuro, the mod needs a WebSocket URL. You can configure this in three ways, listed by priority:
-
Environment Variable (Highest Priority):
- This is the recommended method for streaming setups. Set an environment variable named
NEURO_SDK_WS_URLto the provided WebSocket address. The mod will always use this if it's set.
- This is the recommended method for streaming setups. Set an environment variable named
-
In-Game Mod Settings (Medium Priority):
- Go to
Mods > Neuro Plays RimWorld > Advanced > Mod options. - You can enter a custom WebSocket URL here. This is useful if you can't set an environment variable.
- A restart is required for changes to this setting to take effect.
- Go to
-
Default URL (Lowest Priority):
- If neither of the above is set, the mod will default to
ws://localhost:8000. This is perfect for local testing with the Randy bot included in the Neuro Game SDK.
- If neither of the above is set, the mod will default to
The mod will log which URL it is using in the RimWorld developer console (~ key) when it starts up.
| Action Name | Description |
|---|---|
set_work_priority |
Sets the priority (0-4) of a specific job for any colonist. |
set_research_project |
Selects the colony's active research project from available technologies. |
set_colonist_draft_status |
Toggles a colonist's drafted mode on or off. |
arm_colonists |
Arms all capable, unarmed colonists with the best available weapons. |
arm_individually |
Orders a specific colonist to equip a specific weapon. |
fight |
Orders a colonist to attack a specific enemy or animal, drafting them if necessary. |
manage_animal |
Designates wild animals to be hunted/tamed, or colony animals for slaughter. |
forbid_item |
Forbids or unforbids a specific stack of items on the ground. |
| Action Name | Description |
|---|---|
spawn_event |
Triggers a world event. Can be hostile, friendly, or a resource drop. |
spawn_item |
Spawns a specific item, resource, or building on the map. |
spawn_pawn |
Spawns a new pawn (animal or person), with an optional custom name. |
change_weather |
Instantly changes the current weather on the map. |
drop_pod_raid_random |
Initiates a drop pod raid with a chosen faction, size, and hostility. |
force_mental_break |
Triggers a specific mental break (or inspiration) on a chosen colonist. |
change_faction_relations |
Instantly alters the colony's relationship with a non-player faction. |
- Harmony: Required for the mod to function.
- VedalAI.NeuroSdk.Unity: The Neuro Game SDK.