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.
To build ensure you have .NET 8 or higher installed.
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\commonRimWorld to RimWorldDevsteamapps\common directory.
/Users/[username]/Library/Application Support/Steam/steamapps/common/.RimWorld to RimWorldDevsteam_appid.txt with contents 294100 in the /steamapps/common/RimWorldDev directory, alongside RimWorldMac.appNote: 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\DevSaveDataYou 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/bashYou 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.
Note: While the GitHub documentation still refers todevelopment, make sure to base your branch offdev.
Multiplayer repository for the first time, add the --recursive switch to your clone command, eg:
Multiplayer repository, you can fetch the Language files using the following command:
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)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.
The below instructions only apply to Windows.
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.1doorstop_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.