Info dump / guides for Cities Skylines 2 modding.
Welcome to the unofficial modding guide and repository for Cities Skylines 2. Since Colossal Order has yet to release official modding tools and documentation for the game, we have taken the initiative to help the community get started with modding. This README provides guidance and references on setting up the environment and using essential tools.
BepInEx is a universal Unity plugin framework which aims to provide a unified overlayed environment for different Unity games. It allows for runtime code modifications and has been widely used in modding various games.
HarmonyX is a library developed for patching, replacing and decorating .NET and Mono methods during runtime. In the context of Cities Skylines 2, it helps in modifying the behavior of existing game functions.
Cities Skylines 2 is developed using Unity version 2022.3.7f1
. In order to mod the game, it's essential to have the appropriate unstripped libraries which provide detailed information about Unity classes and methods. It uses .NET Standard 2.1 version of the Mono runtime.
2022.3.7f1
from this link.I have provided an example mod with this configuration, it will need BepInEx 6 setup in the game folder, enable the console window in BepInEx config settings. You will need Visual Studio 2022.
Cities2_Location
variable is set appropriately in your Visual Studio project so files can copy on build.Contribution & Feedback: We highly appreciate community contributions. Feel free to submit pull requests, create issues, or provide feedback to make this modding guide more comprehensive and user-friendly.
Disclaimer: This modding guide and tools are provided "as is" without warranty of any kind. Modding can be risky, always remember to backup your game files before making modifications.
In the example mod it forces the developer/debug menu to show, by pressing TAB in the game you can show the menu; which provides lots of useful information:
Performance Tip: I have found that the dev menu has a Level of Detail control which allows you to lower the detail further than the default menus would allow, this may make draw distance a lot lower but you can further fine tune performance. I've been able to gain a lot of frames by adjusting this to a value I'm happy with.