Cities: Skylines

Cities: Skylines

324 ratings
How to Earn Achievements with Mods Enabled
By mgAmber
Let's face it: everyone who's played Cities: Skylines has wished that they could earn achievements in a modded save file at one point or another. Now, thanks to a smart bit of coding, you can.
   
Award
Favorite
Favorited
Unfavorite
Introduction
This guide serves as a fix for the orginal achievement enabling mod created by bad criminal, which a lot of people have had trouble getting to work due to recent Cities: Skylines updates. The original code created for this mod is owned by them and I do not claim to hold any rights other than the intellectual property of this guide itself. Before I begin, I would like to thank bad criminal for making the source code publicly available, and for their support of this guide.

If you are running Windows 7 Pro 64-bit, please navigate to the section of the guide titled "If you are running Windows 7 Pro 64-bit...". More than likely, you will not be able to get the mod working using the regular method, and will have to follow the instructions created by SmokeDog and Ecktos in order to get the mod to work on your OS. (Don't worry, though, it isn't complicated.)

The Windows 7 Pro 64-bit fix may also work for other versions of Windows. Various users have reported success running 8.1 using this method; if you are having trouble getting the mod to work on another version of Windows, you may want to try SmokeDog's and Ecktos's tips.
Downloading the Mod
Theoretically, bad criminal's mod does not actually need to be downloaded in order to work since they publicly released the coding, and you can more than likely manual create a file instead. However, I am going to be basing this guide around downloading the mod anyway. Navigate to the workshop via the link here and add the mod to your game:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=407055819&searchtext=achievement

Now that the mod is installed from the workshop, launch the game, and double-check to make sure that it is listed in your mods menu.

Navigating your Files
Here is where a small bit of work is required. For whatever reason, the folders created during the install are either empty or generally nonfunctional. Exit the game and navigate to your Cities: Skylines folder, which should be at "C:\Program Files (x86)\Steam\steamapps\common\Cities_Skylines".

You should have a screen which looks something like this:

Click "Files", and then "Mods". Assuming this is the only mod that you have installed, you should have four folders: "HardMode", "UnlimitedMoney", "UnlockAll", and the fourth folder, which contains the achievement enabler. On my computer, this folder is simply named "SkylinesMod".

Enter this folder, and enter the folder inside, which should be named "Source". Here you will find a .cs file that is supposed to contain the code for the mod; if your install was anything like mine, the file should be completely blank, which is presumably where many people are encountering a problem. This is where bad criminal's code comes into play.
Enabling the Workaround
Change the .cs file to a .txt file, and open it; if any text is inside, clear it, and enter bad criminal's code, which can be copied from the following link. Again, this is not my code, and I do not claim to own any part of it, but bad criminal has made it publicly available for use as stated on their mod's workshop page.

https://gist.github.com/anonymous/c524671571c3879381b2

Your .txt file should now look like this:

Please note that you may also have to add the following lines of text before the rest in order to get the mod working.

"using ICities;
using ColossalFramework;

"

Some users have been able to get it to work just fine without these lines of code, but others have reported that the mod will not function for them at all without those lines inserted at the beginning.

Rename the file as "SkylinesMod" (if it is not already named this), save, and then exit. You can keep it as a .txt file; the mod should still work just fine.
Setting Up your Game
The final step, which is important, is to open Cities: Skylines and navigate to your mods menu. Make sure that coolvid69's mod, which should now be displaying properly, is set to "Off". Not doing so should in most cases prevent you from earning achievements. Your screen should now look like this:


When selecting a saved game that has mods enabled, the achievement icon will remain gray until you earn another achievement in that saved game. Do not be alarmed if the icon is still gray, as this is does not mean that the mod isn't working. Additionally, some achievements which require a set number of special buildings may not be earned if you already have the required number of buildings in your world. For example, if an achievement requires that you have five police stations in your city and you have already built six, you will not be able to earn that achievement for that city, even if you destroy the extra police station. Please keep this in mind.
If you're running Windows 7 Pro 64-bit...
Several users running Windows 7 64-bit have reported that they still cannot earn achievements after doing all of the above. Fortunately, user SmokeDog has provided a fix in the comments that should get you up and running. For convenience, I've decided to include it here, as it seems to be a reoccurring problem.

PLEASE NOTE THAT THIS FIX MAY ALSO WORK FOR USERS ENCOUNTERING ERRORS ON OTHER VERSIONS OF WINDOWS.

Originally posted by SmokeDog:
I am on Windows 7 Pro 64-bit. For me, none of the mods I have installed were stored in steamapps/common or %LOCALAPPDATA%. I found all the files were stored in "Steam/steamapps/workshop/content/xxxxxx/yyyyyy" .

So, once I had found this folder with SkylinesMod.dll, I created a Source directory, and inside I created the SkylinesMod.txt file as per the above guide, with the code pasted in. I saved this, and started up C:S.

For me, this mod would only then work if I had the "Enable Achievements" mod switched ON in the content manager. I first tried with it switched off, knowing I didn't have the City Planner achievement, created a small district and applied a policy to it, nothing happened. I exited back to the main menu, switched ON the mod from the content manager, then tried the same thing with a district, and I got the achievement. Thanks for the guide, and I hope this info about my experience helps someone else.[/quote]
Originally posted by SmokeDog:
To clarify my last post: "Steam\steamapps\common\Cities_Skylines\Files\Mods" did not contain any custom mods I have installed, only the default ones - HardMode, UnlimitedMoney, and UnlockAll, as well as NewMod which seems to be the template files for making a new mod. I also checked in %LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods, and there was nothing in there either. Hence why I had to find the files in steamapps/workshop/content.

Ecktos, who has gotten the mod to work using SmokeDog's method, further clarifies the solution:
Originally posted by Ecktos:
Worked perfectly for me, using the workaround by SmokeDog on Win7 pro, I have set it out below in an easy to follow step by step guide so it should be very easy for anyone to follow.

Step 1, Click the Windows button and type SkylinesMod.dll into the search box, once windows has located SkylinesMod.dll right click on it and select the option Open file location and a new window will open.

Step 2. Inside this file create a new folder and name it Source

Step 3. Open the newly created Source folder and right click, mouse over the New option and select Text document once the new text document has been created name it SkylinesMod and press return to confirm the new name.

Step 4. Copy the text from https://gist.github.com/anonymous/c524671571c3879381b2 then open the SkylinesMod text document and paste the copied text into it, click File in the top left corner of the SkylinesMod text document and click the option Save.

The files are now set up correctly and the mod will run as expected, but remember you must enable the mod in the Content Manager for it to work. The Achievement tab will remain inactive until a new achievement is attained at which point the tab will activate and will allow you to view the new achievement and any previous achievements you have obtained.

Thanks for taking the time to work out how to make this mod work, and thanks to SmokeDog for the Win7 workaround, awesome job!

If the mod still does not work after this, please let me know in the comments. Again, special thanks to SmokeDog for finding a fix to this issue, and to Ecktos for giving us step-by-step instructions!
Congratulations!
If you've correctly followed the steps above, you should now be able to earn achievements while playing in your modded cities! Thanks for reading, and if you found this guide helpful, please leave a thumbs up! As I mentioned above, if you are still having trouble getting the mod to work, please let me know in the comments below.
159 Comments
JiffyPark 27 Jun, 2021 @ 5:00pm 
link is broken
Nakatomi 3 Jun, 2020 @ 3:41am 
Doesnt work anymore not since they added there own launcher to the game
Fondo monetario Internacional 26 Oct, 2018 @ 2:30pm 
Dont work NOTHING on win 7 for my. 6 hours try to fix this shit. Maybe this dont work anymore
stmSantana 13 Oct, 2018 @ 10:57am 
If the item subscribed in the workshop is not downloaded to your PC folder, Just try log out and restart the Steam client.

Also remember that Steam's server will often get bad:steamfacepalm:.
It is natural that items will not be downloaded when the Steam server is in bad condition.
Please try again after a while.:coffeecup:

That is absolutely not a problem of this mod only.
Do you make a local copy every time when one MOD is not downloaded?
However, if you are in a hurry and can not wait a few minutes to unlock the achievement, this guide will be very useful.:47_thumb_up:
mgAmber  [author] 13 Oct, 2018 @ 10:41am 
Yeah, I'll update it as soon as possible. Thanks for the help.
Schotty 13 Oct, 2018 @ 10:22am 
@Mikasa could you edit your guide a bit? Apparently on Linux the steps are the same as on Windows 7. One needs to go into the steam/workshop folder and create Source/SkylinesMod.cs.

Also at least in my case I needed to enable the mod.
maxresdefault 24 Aug, 2018 @ 4:12pm 
Like many others, the workshop files are not in the mods folder for me.
Diospectre 15 Aug, 2018 @ 12:50pm 
Works very well on my Microsoft Windows 10 Pro by using SmokeDog's method. I had to turn the mod "ON" to make it work, I tested it by tracking a citizen as I didn't have that achievement yet before.

I inserted "using ICities;using ColossalFramework;" line and left the file as "SkylinesMod.txt", not "SkylinesMod.cs"

But for an unknown reason, the in-game achievement tab is still unselectable even after I achieved a new achievement and the saved game file still says that my achievement is disabled, but it's actually not disabled, so I can't complain)

Thanks for the guide.
mgAmber  [author] 15 Aug, 2018 @ 10:57am 
Thank you for the update.
Scribe Assistant 13 Aug, 2018 @ 12:26pm 
SmokeDog's solution also work for Windows 10 as of august 2018.