
Don't forget that Unity now has a bunch of extension methods that are more often than not defined in their own extension dll. If you only want to include the dlls you really need, you can use dnSpy to open all the Unity dll's and then search for a given API. Picking them by hand takes time because you need to know where your API is located: You can either hand pick them or add them all to your project.

Unfortunately, this is harder than it looks because you now have 62 Unity dll's in C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\. To fix this, remove the old references and add the new ones back. RimWorld has a slightly different folder structure and the Unity API is spread over many dlls: Next, you will get broken references to all the Unity dlls you used in your project. \v1.1\Assemblies\" and close/save the dialog. Since I chose to have my 1.0 version fixed in the old Assemblies folder and the new version in v1.1\Assemblies I opened the project settings, clicked on Build and Configuration: All Configurations and changed the output path:Ĭhange it to ". You also want to change the output path of your mod dlls. There you change the following then close and save the project: Right click on the project in the Solution Explorer and choose "Edit Project File" which opens an xml file. NET Framework 4.7.2 and close/save the dialog.įor newer project formats, it is easiest to just edit the project file yourself. If you are using the old project format, you can select the project in the Solution Explorer and then choose "Properties" from the right-click context menu to get to the project settings:Ĭhange it to. You need to change your Visual Studio project from. Here is how I did it, it depends on your version of Visual Studio project.
#Rimworld mod harmony update
NET version has changed, you need to update your project.
#Rimworld mod harmony code
There are other source code changes too but since the. Since RimWorld uses a new Unity version which comes with. The root / is required and then I add v1.1 which points to my custom folder v1.1.Īs a result, RimWorld 1.0 uses the root folders and RimWorld 1.1 finds my new Assemblies folder inside v1.1 and prefers it over the root Assemblies folder and re-uses all my different assets from before.įor more configuration possibilities, please have a look at the ModUpdating.txt document that comes with RimWorld. So I use LoadFolders.xml to define a tag that contains a list of folders to search for. RimWorld 1.1 per default looks for folders with the same version number ( 1.1) but I like my folders alphabetically relevant and chose a slightly different name: v1.1. Currently, this results in red (but harmless) error messages in RimWorld 1.0 but works for both versions. The About.xml file is shared between RimWorld 1.0 and 1.1. If you don't update the About.xml file, RimWorld 1.1 will show your mod in yellow text to indicate that it is not made for the new version: This guide will help you to make the transition as smooth as possible. Since you need to touch your code and your project anyway, it seems logical to update Harmony too. The simplest way to solve this is to not allow Harmony 1.x on RimWorld 1.1. 🔴 IMPORTANT: Harmony 1.x and 2.x are not compatible with each other. I did change the syntax of the API to be more consistent which means some renaming on your side. It introduces a few new features and contains all the bug fixes and improvements that have cumulated since v1.2.0.1. The release of RimWorld 1.1 is in sync with the release of Harmony 2.

For more details, ask your favorite discord admin or visit the Ludeon forums. My focus is C# and patching the game with Harmony. While I am sure that there will be changes to the xml loading part and the fields and structures of RimWorld, this guide will not cover this. If you use a different IDE, please adapt your changes. During the guide, I will use Visual Studio 2019. It will also serve as a guide to common changes that I encountered while I upgraded my own Camera+ mod.
#Rimworld mod harmony upgrade
I will tell you how you upgrade to Harmony 2 and why. This guide will help modders to update their C# mod to RimWorld 1.1. It's just a personal thank you from me to the community. I am not affiliated with LUDEON studios or with developing RimWorld. This guide is my personal attempt to help everyone through the journey of upgrading their mods. My name is Andreas Pardeike, aka Brrainz, or the creator of Harmony. Updating RimWorld from 1.0 to 1.1 Introduction
