RimRef is a NuGet-package that contains reference assemblies for Rimworld. You reference it in your mod project instead of the game.
This makes your project portable, because RimRef can be downloaded by anyone and used from anywhere, unlike Rimworld's assemblies which can't be distributed.
Install RimRef (Krafs.Rimworld.Ref) from your IDE's package manager, or with dotnet:
dotnet add package Krafs.Rimworld.Ref
Likely because you are adding it to a project that uses an old package structure. Fear not! It is easy to fix. Do one of the following:
- Migrate your existing project
- Create a new project library for .NET 5 or later, and replace the
<TargetFramework>
-value in the project file withnet472
.
Reference assemblies are ordinary assemblies from which all code has been stripped, leaving only their signatures. However, these signatures are all the compiler needs to build your project. Not only does this speed up the build process, it more importantly offers a way to reference Rimworld from anywhere without illegally distributing any of its content.
It is automatically generated everytime Rimworld updates. See this script for details.
In short, the script downloads the Rimworld assemblies from Steam every day, and checks if the game's version has changed. If it has, the new reference assemblies are generated and uploaded in a package to NuGet.org.
RimRef's version mirrors Rimworld's version, meaning RimRef version v1.2.3
contains reference assemblies for Rimworld version v1.2.3
.
The script also generates pre-releases from some Steam beta-branches, in which case -beta
is appended to the version, e.g. v1.2.3-beta
.
Published with permission from Ludeon Studios.