Skip to content

Instantly share code, notes, and snippets.

@iceeburr
Created December 21, 2023 19:42
Show Gist options
  • Select an option

  • Save iceeburr/2d8fba7765428bc1c9ff0774ce5f3ee7 to your computer and use it in GitHub Desktop.

Select an option

Save iceeburr/2d8fba7765428bc1c9ff0774ce5f3ee7 to your computer and use it in GitHub Desktop.
Linux guide for Cities Skylines: 2 modding using BepInEx.

Hello, and welcome to this guide!

In short I will explain how to get BepInEx to work with Cities Skylines: 2 on Linux and the extra steps needed for it to work. Before we start please read this note, this guide was made assuming you are on the same distribution. Packages might be different for you. Also please proceed with caution!

Note

System Information

My hardware, distribution, drivers, etc.

Operating System: Arch Linux x86_64

Host (Laptop Model): Asus Rog Strix G17 (G713RW model from 2021)

Kernel: 6.6.7-arch-1 (default linux)

Desktop Environment: Hyprland (wayland compositor)

CPU: AMD Ryzen 7 6800H with Radeon Graphics (16) @ 4.785GHz

dGPU: NVIDIA Geforce RTX 3070 Ti Laptop GPU (discrete graphics card)

iGPU: AMD ATI Radeon 680M (integrated graphics card)

RAM: 16GiB

Drivers: nvidia, mesa, asusctl, supergfxctl

Asusctl is only necessary if you have an Asus Rog Laptop. Supergfxctl is used to control between MUX modes for the GPUs.

This guide is made for my specific configuration, but it should work for any general distributions that have these packages. Feel free to hit me up on Discord if you need help.

Dependencies

Before we proceed you must install a few stuff.

You will need to have steam installed for this. For me installing steam would be sudo pacman -S steam.

Assuming you purschased the game from another distributor other than Steam or downloaded it from another source like me.

You also need protontricks for BepInEx compatability. yay -S protontricks

You might also need zenity for protontricks to work. sudo pacman -S zenity

Assuming you know what you are doing you already have wine and other basic libaries, drivers and stuff needed. This guide is specifically for BepInEx compatability, but if you need help with running the game itself feel free to DM me.

Steam

Open steam, login into your account, go to your steam settings under "Compatibility" and make sure to enable "Steam Play for all other titles".

For the Proton version I use "Proton Experimental". If you have issues you might want to change this, but I doubt you will have issues with it.

Now again assuming you downloaded the game from another source you will need to add it to steam.

Simply in the bottom left corner press on "Add a Game" then "Add a non-steam game..."

From there click on browse, go to the folder of Cities Skylines: 2 and find "Cities2.exe". Select that and add the game.

If you bought it from steam simply skip the above and continue with the steps below.

Go to your library, find the game and go to the "Properties". Find the small cog wheel to the right of the play button and find it there.

Go to launch options and make sure to change it to this WINEDLLOVERRIDES="winhttp.dll=n,b" %command%.

If you need any extra arguments or variables add them before %command%.

You might also need to go to the compatibility tab in the game's properties and force the use of a specific compatibility tool.

We are done with steam now, but please go back to the cog wheel, go to Manage and "Browse local files" to open the game's folder.

BepInEx and Protontricks

First do protontricks --gui, select Cities Skylines: 2 (might appear as "non steam game").

After that "Select the default wineprefix" and press "OK".

Finally do "Run winecfg".

Important

You may also need to enter "Install a Windows DLL or component" later if it doesn't work. There simply search for winhttp and make sure you check it. Press "OK" and let it download and install.

In winecfg go to "Libraries", in the "New override for library:" enter winhttp and press on "Add". In existing overrides find winhttp and make sure it is "winhttp (native, builtin)".

Make sure to apply and you are good to go.

Now download BepInEx from HERE. Simply click manual download.

Most mods use this version of BepInEx from thunderstore, if you know what you are doing you can install BepInEx from a different source.

Simply extract the files to a folder, open that folder. You will see a few files, a folder named BepInEx, winhttp.dll, etc. Copy those files to the game's root directory. Use Steam to find it if you don't know where it is.

The "root" is where the "Cities2.exe" file is located. After copying the files it should look like this:

image

Now you can simply run the game from Steam, click the play button and exit the game after it loads into the main menu.

How can you confirm it worked?

Simply go to the BepInEx folder in the game's directory and look if it looks like this and has the exact same folders and files, if it does then it worked!

image

You have made it through, congratulations.

How to actually install mods

Simply head to thunderstore, pick the mod you want.

Press "Download manually".

Extract the files into a folder.

Copy that folder to "plugins" folder located in the BepInEx folder inside your game's root directory.

Restart your game, and done!

Troubleshooting / Side Notes

If you ever have an issue hit me up on Discord and I will try to help you. User - "iceeburr"

You might have a black window whenever you startup steam and it won't respond and you will have to forcefully kill the process. This is an easy fix.

In most distributions find the .desktop file of steam. For me it is located in /usr/share/applications.steam.desktop.

Use any editor, scroll a little bit down and find these 2 options.

PrefersNonDefaultGPU=true
X-KDE-RunOnDiscreteGpu=true

Simply remove them and you will fix it.

Alternatively you can start steam via your terminal in CLI mode by doing steam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment