RimBridgeServer lets you control RimWorld from outside the game. This is useful for testing mods automatically or building tools that work with RimWorld.
This mod creates a connection point (called a "server") inside RimWorld. Other programs can connect to this server to:
- Check if the game is running
- Pause or unpause the game
- Get information about the current game
- Control the game remotely
This is especially helpful for:
- Mod developers who want to test their mods automatically
- AI tools that need to interact with RimWorld
- External programs that want to read game data
- Easy to use: Works automatically when you start RimWorld
- Safe: Only accepts connections from your own computer
- Simple: Uses a standard protocol that many tools understand
- Compatible: Works with RimWorld 1.6
- Download the mod and put it in your RimWorld Mods folder
- Enable the mod in RimWorld
- Start the game
That's it! The server starts automatically when RimWorld loads.
When RimBridgeServer starts, it will show a message in the RimWorld log that looks like this:
[RimBridge] Server running on port 5174
[RimBridge] Connection token: abc123...
Your external program needs:
- Port number: Usually 5174 (but check the log to be sure)
- Token: The random text shown in the log (for security)
- Address: Always 127.0.0.1 (your own computer only)
If you use GABS (an AI gaming environment), RimBridgeServer will automatically configure itself. No extra setup needed!
Your external program can send these commands to RimBridgeServer:
- ping - Test if the connection is working (responds with "pong")
- get_game_info - Get information about the current game
- pause_game - Pause or unpause the game
More commands may be added in future versions.
RimBridgeServer uses a communication protocol called GABP (Game Agent Bridge Protocol). This is a standard way for programs to talk to games.
The basic steps are:
- Connect to the server using TCP (a network connection type)
- Say "hello" with your security token
- Ask for a list of available commands
- Send commands and receive responses
- Optionally, listen for events from the game
For complete details about the protocol, see the GABP specification.
Requirements:
- .NET SDK
- RimWorld installed
Steps:
- Clone this repository
- Run
dotnet build
in the main folder - The built mod will be in the
1.6/Assemblies/
folder
Tip: Set the RIMWORLD_MOD_DIR
environment variable to automatically copy the built mod to your RimWorld Mods folder.
About/ - Mod information for RimWorld
1.6/Assemblies/ - Built mod files
Source/ - Source code
lib/ - External libraries
.vscode/ - Visual Studio Code settings
This project uses the MIT License. See the LICENSE
file for details.
This mod includes Lib.GAB, which provides the GABP protocol implementation.