Cities: Skylines

Cities: Skylines

Image Overlay Renewal 1.9.4
Forsberg 4 Feb, 2022 @ 2:44am
The same error like in dmitry case
Here is the error:

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> ColossalFramework.GameSettingsException: System.ArgumentException An element with the same key already exists in the dictionary. ---> System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,ColossalFramework.SettingsFile].Add (System.String key, ColossalFramework.SettingsFile value) [0x00000] in <filename unknown>:0
at ColossalFramework.GameSettings.InternalAddSettingsFile (ColossalFramework.SettingsFile[] settingsFiles) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at ColossalFramework.GameSettings.InternalAddSettingsFile (ColossalFramework.SettingsFile[] settingsFiles) [0x00000] in <filename unknown>:0
at ColossalFramework.GameSettings.AddSettingsFile (ColossalFramework.SettingsFile[] settingsFiles) [0x00000] in <filename unknown>:0
at ImageOverlay2.IOL2Mod.OnEnabled () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception

I have installed ImageOverlay 2, no any incompatible mods listed. What is wrong?
< >
Showing 1-6 of 6 comments
Elder Brother 11 Feb, 2022 @ 9:34am 
This occurs when a mod tries to store a value as a key in a dictionary lookup table, but the dictionary already contains a key with that value.

It can be caused by errors in the mod, or sometimes having multiple versions of the same mod subscribed. For instance, do you have other image overlay mods installed? If so, completely unsubscribe (don't just disable) and try again.

The fact that you (and @dmitry) are getting this error and I am not tells us that you have different mods than me enabled; one of those is conflicting. Try deactivating all mods, unsubscribing from any additional overlay mods, and run this one by itself. Keep turning on additional mods until the error returns. Let us know which mod is causing the conflict and the community (and Mbyron26) can give you a better answer.

Good hunting!
Fees 13 Feb, 2022 @ 8:55am 
I had the same issue and fixed it by unsubscribing and subscribing again.

Important note: if you unsubscribe while your game is running in the background it does not work.
You need to close the game/exit to desktop and use the steam UI to unsubscribe. Then subscribe again and only then start the game.

For good measure I also removed the ImageOverlay2Config.xml & ImageOverlay2.xml files manually in the steamapps/common/cities_skylines folder before unsubscribing on steam. I'm not sure if this step is needed or does more harm than good. It worked for me anyway.
Forsberg 13 Feb, 2022 @ 2:32pm 
Thank you. I created a clean copy of the game and it works. It is weird because on my modded game there is no any listed incompatible mod. Perhaps some leftovers?

I will have to investigate it.
By the way I may ask here too - when you use skydark to get a height map how can you get a high resolution normal map? Literally no any service provides the same scale height map and map itself highly detailed for roads recreation.
Downloading it via another map would break the scale, but I may consider it if there is no other way.
Last edited by Forsberg; 14 Feb, 2022 @ 2:51am
Elder Brother 14 Feb, 2022 @ 12:44pm 
@Forsberg--that's awesome dude! Glad to know you're working again.

To answer your second question, it depends on how much effort you're willing to put in. You are correct that the maps you get from skydark[heightmap.skydark.pl] are not as detailed as we'd like. (Tip: you can change your graphics settings to the highest levels possible to get a little better resolution.) The problem is particularly noticeable when you zoom in. To get ultimate level of detail when zooming in to ground level, you have to be willing to become a Photoshop expert. In summary:

Download the skydark[heightmap.skydark.pl] map as a base
Go to Google Maps / OSM / etc. and zoom in to your preferred level of detail
Take snapshots of all the areas you want to recreate
Use Photoshop to stich all those snaps into one large image
Resize your large image to match the boundries of the skydark[heightmap.skydark.pl] map

Now when you zoom in using Image Overlay 2 you get detail all the way down to ground level. The problem (IMO) with this approach is that it's incredibly time consuming and only really beneficial for players going for a true 1:1 recreation map as opposed to a playable one. Case in point, most real-world rivers and lakes are not nearly as deep as CSL needs to function properly in-game.
Forsberg 15 Feb, 2022 @ 1:59am 
Thanks, I think I am gonna use the photoshop way but using a map tile grabber, to avoid manual download. There are grabbers which can do it for you and stitch tiles in a one big file.
My goal is to recreate a map at 1:1 scale however there is a scale issue in Cities - roads are way too wide compared to buildings. But I need to live with it somehow :)
MsComradeJump 26 Mar, 2022 @ 1:03pm 
I am having a different error. I have it on Epic (free edition) so I must download via workshop downloader. After I inputted the unzipped file into the AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods, I receive this error code:

A Mod caused an error [System.Exception]

Details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not find file "C:\Users\desktopuser\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods\ImageOverlay2\LocaleImageOverlay2.en.locale".
File name: 'C:\Users\desktopuser\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods\ImageOverlay2\LocaleImageOverlay2.en.locale'
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String
< >
Showing 1-6 of 6 comments
Per page: 1530 50