Cities: Skylines

Cities: Skylines

36 ratings
Compass
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
30.208 KB
Mar 3, 2023 @ 11:23am
Jun 17, 2023 @ 6:53am
6 Change Notes ( view )

Subscribe to download
Compass

Description
Simple mod that displays the cardinal direction you're viewing.

This is my first mod - so please be kind (but still honest)

Options
  • Rotate displayed direction by 0-270° in 90° steps or automatic detection (Default: 180°)
  • Change the display mode to show the cardinal direction as name, angle or both
  • Show/Hide the panel with a hotkey (Default is Alt + C)
  • Multiple display types: Disc and solid state (default)
  • Reset of Panel position can be done by changing the display type
  • All settings can be reset in the options panel
  • Double click on the panel rotates the camera north

Known Issues
  • Display type "disc" has some graphical glitches / alignment issues (suggestions for a fix appreciated)

About the automatic detection of the offset
This feature is still experimental but all my tests showed that it is working.
Cities:Skylines is very weird in this regard as the latitude changes everything as expected but the longitude changes the direction of the sun as well.
Also this is currently not restricted to 90° steps so if your map is not located perfectly on 0°, 90°, 180° east or west it will not align with the sides of the map! eg. if the map is for Osaka, Japan (latitude 35, longitude 135) your sun will be above one of the corners at midday and that corner will be declared as south, on the other hand if your city is between São Paulo and Rio de Janeiro (latitude -23, longitude -45) your sun will be above another corner of the map during midday and that direction will be north.


SourceCode here:
https://github.com/jarnar85/cs_compass
35 Comments
mistermcd Jan 9 @ 1:30pm 
With this mod enabled, my output log is spammed with:

GameSettings: '' is not found or cannot be loaded. Make sure to call GameSettings.AddSettingsFile() to register a settings file before using SavedValue(). [Settings - Internal]

When I disable this mod, the errors go away.

Thoughts? Have I missed something or have you missed something? ;-)
StayHungryStayFoolish Jun 17, 2023 @ 10:33am 
Alt+C is used by ACME, but you can setup another hotkey, which works just fine. Thank you for the update.
jarnys  [author] Jun 17, 2023 @ 7:54am 
@spdyvkng with the latest update double click on the panel rotates the camera north

@MarkyMark122 with the latest update it's possible to reset the panel locations (reset all settings in options or change the compass type in options)

@THZ the "Auto" offset in the latest update should match what you were expecting (very weird behavior by the game engine though)
THZ Jun 9, 2023 @ 10:42pm 
part 1). Thank jarnys for confirming the situation of 0° and 180°. Here are my tests about the ways to keep the sunrise & set correctly, when Compass’s angle offset is 0° or 180°. For a long-established city with saved-file records, changing 0° to 180° would essentially swap the city's east-west landscape. The following is my test and observation, which does not represent absolute correct.
Some people, including myself, using mods with latitude and longitude adjustments like 'Theme Mixer 2', the sunrise & set locations can also be changed. Only certain latitude and longitude settings can make the city's sunrise & set correct. Translated by app, don't mind if the sentences are still strange. Due to the character limit, it is divided into 4 parts.
THZ Jun 9, 2023 @ 10:42pm 
part 2).•Condition1: When Compass’s angle offset = 0° (CS Vanilla) :
The examples are presented in the following format:
(latitude, longitude), [SUNRISE, SUNSET],,,my conclusions about sun’s movement.
(50°, -90° / near Canada), [southeast, southwest],,,CORRECT for general Cities in North Hemisphere. my using.
(-50°, -90° / near Chile), [northeast, northwest],,,CORRECT for South Hemisphere instead.
(50°,0°/ near UK), [southwest, northwest],,,incorrect anywhere on Earth.
(35°,139° / near Japan), [northwest, southeast],,,incorrect on Earth.
(40°, -70° / near New York), [southeast, West-northwest],,,the sunrise position is correct, but the sunset is not.
Conclusion: Longitude -90° is important, When Compass’s angle offset = 0° (Vanilla)
Regardless of whether in the Northern or Southern Hemisphere, the longitude value of -90° is almost the only perfect correct one. Any other non(-90°) value would result in an incorrect directions of the sunrise & set.
THZ Jun 9, 2023 @ 10:42pm 
part 3).•Condition2: When Compass’s angle offset = 180° , the longitude should be positive 90 degrees always.
The examples are presented in the following format:
(latitude, longitude), [SUNRISE, SUNSET],,,my conclusions about sun’s movement.
(50°, 90°),[southeast, southwest],,, CORRECT for general Cities in North Hemisphere.
(-50°, 90°), [northeast, northwest],,,CORRECT for South Hemisphere instead.
(50°,0°/ near UK), [northeast, southeast],,,incorrect anywhere on Earth.
(35°,139° / near Japan), [southeast, northwest],,,the sunrise position is correct, but the sunset is not.
(40°, -70° / near New York), [northwest, southeast],,,incorrect on Earth.
Conclusion: Longitude 90° is important, when Compass’s angle offset = 180°. Longitude 90° is almost the only perfect correct one instead.
THZ Jun 9, 2023 @ 10:42pm 
part 4).When "Angle Offset" of the "Compass" is set to 0° or 180°, there are still chances for correct sun’s movement by other mods like with longitude and latitude. If tests differs from mine, then there should be other mods influencing it. I shared my tests with y'all by the way.
Translated by app, don't mind if the sentences are still strange. The above is for reference purposes.
jarnys  [author] Jun 8, 2023 @ 11:45am 
If you change the offset in the settings to 0° the displayed angle-numbers are the same as the native ones of the vanilla game.
The default offset of 180° just changes it so that the sun rises in the east and sets in the west (only the displayed numbers/directions are changed, not the internal calculations of the game)
THZ Jun 8, 2023 @ 10:44am 
I would like to confirm the direction of Vanilla North. Is the offset set to "0"? I'm currently creating corner buildings with various angles. In my description, I also mentioned the tool "Move It," which allows for angle adjustments. When I mention a specific angle, such as "0 degrees," indicating that it is facing north(?), it should not be viewed as facing south from others' perspectives. Nevertheless, I have found a solution. I will try to avoid using directional terms like "North" or "South" in the description, so the issue has been resolved. Sorry bothering you & thank you for hearing my story.:steamthumbsup:
jarnys  [author] Jun 8, 2023 @ 8:47am 
@THZ my tests showed that the 180° offset fits the movement of the sun on all maps. If it doesn't fit on your map you can simply change the setting to 0° offset. But if possible provide me with the map so I can try to figure out a commonality.