This document details how to set up a RimWorld Multiplayer development environment.
Note: This guide is written for Visual Studio Code in Windows. If you want to use another IDE or OS, YMMV.
Note: While you can't compile this project on Mac (due to .NET Framework dependencies), Mac instructions are included for testing purposes.
If you wish to have the option to play a "pristine" copy of the game, it is best to have a separate copy for development.
steamapps\common
directory.
C:\Program Files (x86)\Steam\steamapps\common
RimWorld
to RimWorldDev
steamapps\common
directory.
/Users/[username]/Library/Application Support/Steam/steamapps/common/
.RimWorld
to RimWorldDev
steam_appid.txt
with contents 294100
in the /steamapps/common/RimWorldDev
directory, alongside RimWorldMac.app
Note: You can do this multiple times, for example if you wanted a v1.6 Rimworld and a v1.5 Rimworld to do development in both environments.
This way the Steam copy in RimWorld
is still pristine and can be used for standard play. And you have another copy in RimWorldDev
that you can develop in.
You may want different settings depending on whether you're playing with friends, or doing development. With friends you likely want high-res, full-screen. During development you might like the game to be in Window mode, as small as possible (1024x768), and with Development mode enabled!
These instructions allow you to maintain separate game environments between "pristine" and "dev"
steamapps\common\RimWorld\Readme.txt
)-quicktest
option to fast-load into a tiny map.RimWorldWin64.exe
), and edit the shortcut details. -savedatafolder=DevSaveData
DevSaveData
in the same folder as the executable, eg steamapps\common\RimWorldDev\DevSaveData
You can run the file from the command line and specify switches with a command like:
And if you're comfortable with Mac/Linux, you can make a shell script out of this easily enough. However many people may want a "shortcut" icon.
/bin/bash
You can now add the new "Application" to your dock or desktop.
Note: It's recommended to fork the source code to your own account/repository first, and clone that.
steamapps\common\RimWorldDev\Mods
)RimWorldDev\Mods\Multiplayer
)
Note: The build steps assume this relative location and copy binaries accordingly. Otherwise paths will need to be updated and/or binaries moved after each build.
development
, make sure to base your branch off dev
.Languages
folder from an original mod installation (eg steamapps\workshop\content\294100\2606448745\1.5\Languages
) to your mod folder (steamapps\common\RimWorldDev\Mods\Multiplayer\Languages
)
This could be resolved by cloning the repository with submodules, but it's outside the scope of this guide.
If you navigate to the Multiplayer\Source
directory you should be able to build the solution now.
The Source\Client\Multiplayer.csproj
specifies to copy the compiled files back to the Mod directories Assemblies
and AssembliesCustom
as a build action.
Technically you can edit the code to make changes, build and RimWorld will respect these changes. The next section will detail how to perform debugging.
Some guides specify to install a specific mono-2.0-bdwgc.dll
, but I found them to all be out of date. Below is an alternative that I got working.
This will allow you to inspect and eventually debug vanilla RimWorld code.
Rimworld Doorstop allows you to enable the RimWorld Unity debugger. Follow the instructions on their page. Below is a summary.
doorstop_win_release_4.4.0.zip
)
doorstop_config.ini
and winhttp.dll
into the RimWorld root directory (not mod directory)Doorstop.dll
)
Doorstop.dll
file into the RimWorld root directory (not mod directory)doorstop_config.ini
as per the Rimworld Doorstop instructions
\RimWorldWin64_Data\Managed\Assembly-CSharp.dll
\RimWorldWin64.exe
)127.0.0.1
doorstop_config.ini
above>Hint: if you are using dnSpy and have the port set to the default 55555, then you don't need to enter any values. Simply select "Unity (Connect)" and click OK/hit enter.
\RimWorldWin64.exe
.dll
files used by RimWorld.exe
.Multiplayer.dll
and open it, but note that it may not appear right away.
Multiplayer.dll
, enter "data-" into the search bardata-0000022CFEF538E0
. It usually has a version "0.5"Multiplayer.dll
appears there.\RimWorldWin64.exe
and connect over LAN.