• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Greetings everyone,

Today, let's have a look at the two biggest changes/new stuff happening on the Modding side of Cities: Skylines.
Let's get started on how the day/night cycle affects the Asset editor and user-created models:
After we decided to add this feature alongside the After Dark expansion, our first reaction was to ponder what would that mean for the ton of assets already created on the Steam Workshop. We knew it would be impossible to completely automate the process to lit those assets during night time, but we wanted to minimize and ease the amount of manual work required by content creators.
Our first step was to turn all prop assets which are expected to emit light into assets emitting light. Street lamps/poles (see below) and so forth are heavily used in custom assets, therefore it made sense to take that road, as it would provide a base lighting for all assets already using them.

ul9359B.png
To allow more granularity to the lighting process of a building, we also added various light props such as wall-mounted and floors lights. Heck we even added a sub-category to the Common Props toolbar. Below is an example of how to properly mess up the night look of a residential building using wall-mounted lights, also features the new Light props toolbar.

rSdD1qL.jpg
In order to visualize the asset both at day and night time in the Asset Editor, we replaced the previously existing slider Light rotation to control the time of the day. The lights toggling/animation logic are simulated in Editor just as they would be in-game, so the preview of the building for a given day time is accurate.

kCkyywE.png

The dynamic lighting was the first aspect to consider, but we also needed a way to get the windows to lit up therefore we added support for texture-based illumination using illumination maps.
Conveniently, we have had illumination maps all along (the _i suffixed images used when importing asset) but they have obviously been heavily underused as our themes only features day time until now.
It used to be the illumination map acts as a mask where a value of 0 (black) means no illumination and a value of 255 (white) means full illumination using the diffuse texture information.
We preserved this behaviour but squeezed the color value to range between 0 and 120 instead, where 0 still mean no illumination contribution from the diffuse texture and 120 means full contribution. We hereby freed the range 128 to 255 to allow windows to be lit randomly. A value of 192 means neutral, so if you want a building to be unlit at all times, the illumination map needs to be solid 192. The likelihood of a window to be lit at a given time and its intensity are randomized for values within 128 and 255, the closer the value is to a boundary the more likely it is to be lit and stronger.

As an example below is a residential house with its windows lit and diffuse, specular and illumination map composited next to each other.

UUDTQfL.jpg
In this case, the UV mapping is such that the windows use very little texture space but you can see them clearly at the bottom right of each texture. Notice the illumination map value of unlit areas is 192.
Also, the specular map, while irrelevant to the lighting is shown in the picture as it is worth noticing in most cases, if you have already created a specular map for your asset, you already have a base windows mask to derive from when creating the illumination since windows are usually reflective and you have already cranked up the specular mask color.


Next, let's talk about a brand new feature which affects both content creators and players: District styles.
After shipping the free patch introducing the European theme and buildings, a rather high demand for these buildings to be made available in all themes rose from the forums. It was not done as such because of both technical and visual motives:
- memory usage would have gotten very tight for our user with minimum system requirements and we did not want to break the game for them.
- Buildings have specific requirements to tie-in with corner buildings and we would have needed to redo the entire stock buildings set to scale with the wall-to-wall and corner buildings feature. That obviously was not a viable option.
Coincidentally, another pretty highly requested visual feature was the ability to set a policy which would define the look of a district.
While we did not feel comfortable making this feature a policy as policies should have an impact on gameplay and not purely on visuals, we did add an option to select what we call "Styles" from a new Dropdown component in the District info panel.
We added a default building set with the European buildings and when enabled in the Content Manager, it will be available in the game dropdown.

yFHlWqy.jpg

Once a style is set to a building, it will start using/replacing buildings from that style matching the level and density requirements for spawning hereby you can have a European style district in your city.
The screenshot below shows European buildings in the good old Los Santos map which is built on a tropical theme.

H6UNbcu.jpg

This is pretty cool but here is the good(er) news: content creators can also create and share their own styles on the Steam workshop.
In the Content Manager, there is a new section called Styles and you can create a style to which you can add any building uploaded to the Steam Workshop.

otrq9jO.png

xcocjku.png

Provided you include buildings which covers all levels and densities used in the game, you will have a fully customized look for a given district \o/
We can't wait to see what new amazing combinations you are going to come up with!

That's it for today.
Thanks for your time reading this diary, it's back to coding for me, there is still some work to be done :)

/damsku
Technical Director @ Colossal Order
 
Hey, very nice update and expansion, but what about the Content Manager?

There are lots and LOTS of items in the workshop. I'm not a mod-heavy player and I have hundreds of downloaded items regardless. The Content Manager *still* doesn't provide any reasonable way to deal with many items at once, not even a simple switch to disable all the custom content! The manager also tends to get really laggy when the item count increases above just a few dozen, and it doesn't help with having to scroll through a long list to make sure that every asset is enabled/disabled according to our needs. And with every update of a workshop item, its on/off state is reset, because the game sees it as a completely new asset.

I already discussed these issues in this topic, but I guess noone noticed. I suggested things like ID-based content management, a setting if newly downloaded assets should be enabled by default, "enable/disable all content" switch (along with switches for each category), a search box to quickly find any new or specifically named assets or those from a specific author or category, and the ability to organize content into folders or groups. Those things aren't anything difficult to code, and would make the lifes of us - players and content creators alike - a whole lot easier.

Thanks in advance for considering the above.

Problem solved ;)
http://steamcommunity.com/sharedfiles/filedetails/?id=449020940&searchtext=improved+asset

But it would me nice to see this in the standard game, yes.
 
I might have said it before... but the lights on towers and the buildings with big glass surfaces are faaaar to bright. And too many of the windows are lit :D

Yup, Just coming here to post this. I'll let the screenshot do the talking.

yc9yxea.png


Also in the last part of this video you see all the lights turning off at once on a building.. Would be really cool if you could find a way to have them randomly turn on and off like a sparkle effect. I'm sure there is probably a way to do it seeing how you made the game recognize and make lights randomly turn on using 128-255. Also would be really cool if you could make lights turn on and off very very slowly at night like people were coming in and out of their offices or something.

 
Last edited:
  • 1
  • 1
Reactions:
I hope we can set some interior maps in the case of glass buildings. Or they will look like big mosquito traps. We definitely need control in the case of glass buildings. Perhaps when or if one of you developers get a chance you can show us an example of a glass building with a custom map added. Does the illumination map react to any color variation outside the diffuse color?
 
Last edited:
I love the new night mode! But I got some not-mainly-night related questions / "requests" / suggestions:

Could you please deactivate the blinking effect of the green and red position lights on aircrafts? I'm fine with the current white ones, but the green and red lights don't blink on passenger planes in real life.

Also about planes: I hope you are gonna change the way they are flying. Right now they act more like fighter jets on steroids (way too sharp curves while turning mid air, too fast descending - imagine you would sit in those planes :D )

I hope also that something like "logo lights" on planes will be possible: not that bright illuminations on the tail. This would be great!
 
I guess you didn't get an answer yet:



The district style will only replace the service + level combinations you put in, so you can e.g. only override level 3 residential high if you wish.

If a building tries to upgrade and doesn't find a same-sized higher level version of itself, it will just not upgrade. So you can work around the system to create a slum style by inserting various level 1 buildings and then a single level 2 placeholder building that does not match the size of any level 1 building in your style.
It is great that the styles only limit the growth of buildings if buildings of that level/service are included. That's something I wanted to implement in the Building Themes mod as well.

I would really recommend you to implement the selection of multiple styles per districts (or at least provide the hooks in the game code so that it can be done by a mod without too much hacking).

It would also be great if there was a way to add vanilla buildings to a style (at least in theory, so mods can do it).
 
  • 3
Reactions:
When I say we squeezed the 0 to 255 range that is in the current build of the game to 0 to 120 in the upcoming patch, this is done so that it preserves the function the game already provides. What that means is if you want to use the diffuse color as emissive, you would need to set your map color between 0 and 120.
However, if your emissive is above 128 (the 8 shades between 120-128 are just a safety gap and are not used), it will not use the diffuse color at all but use varying tones of white (these are the randomized ones which cause a light to look on/off and of different intensity between buildings).
192 is the neutral color because it is mid-range between 128 and 255 and the implementation is so we sample both ways, hence a window in the illumination map will be between 192 and 128 or between 192 and 255.
Sof if your window diffuse texture is red and its illumination map is 140 for example, the window will be red at day time and have a random white-ish/yellow-ish color and intensity at night time. However if its illumination map was 120, it would emit red at night.


I'm coming back on this because I still have some questions...
Between 0 and 120 we have full control of the intensity (but color will be the diffuse)

Between 128 and 255 we will get random white/yellowish color... but no control over intensity ? Or is the 128-255 range used for that ? What does this 128-255 range do actually ?


Edit : I've got a request (I've already suggested it) It wouldn't change the weight of the building maps.
Why not add a colorwheel (like the color variations one) to let us add a tint to our light map ? This way we could vary the color of our building illumination. (and still have some variation induced by that 128-255 range).
 
  • 2
Reactions:
Zed. See original post:

"The likelihood of a window to be lit at a given time and its intensity are randomized for values within 128 and 255, the closer the value is to a boundary the more likely it is to be lit and stronger"

I like the idea of the colorwheel!
 
  • 2
Reactions:
Yeah I understand it now...So if we chose to use the random thing we will have to make our windows plain color (or it might look weird... we'll have to test that). But hey I see no other way.
Then... I don't get why brighter windows should have more chances to be lit than dim ones, but there I see no other way either.

The fact that we're limited to one greyscale map is quite limiting anyway.

I like the idea of the colorwheel!

This could have two uses actually.

1 - Still be able to use "painted" windows but not depend on the diffuse map if under 120
2 - Be able to use the randomizing but have the ability to get blu-ish or red-ish or anything-ish colored buildings when between 128 and 255.
 
Last edited:
  • 2
Reactions:
About the upcoming bike system and bike paths, please consider:

* Having bike paths able on all small, medium & large roads (so that upgrades are manageable)
* Of course, like pedestrian paths, separate bike paths too
* Add possibility for the bikers to change from bike to metro/train

:)

And please, bring us elevated train station(!) What's ok enough is for the first standard elevation (12m).

Also: Zonable pedestrian paths
 
Last edited:
  • 3
Reactions:
It seems impossible for modders to make elevated railway station. Could the DLC/patch please add one? To go with the planned transport expansions. 12m elevation would be OK enough.
 
  • 2
Reactions:
CO, please, add null checks before accessing fields etc. of BuildingInfo in BuildingManager class. Most players' saves get corrupted when players unsubscribe custom assets and some of Building.Info field values of BuildingInfo type become null after loading a save game. It won't affect performance but will save many save games from corruption (and thus players' nerve cells).
 
  • 6
  • 1
Reactions:
Pax stream just ended, here's a small list of new information about the expansion:

- There will be bicycle roads, same size as pedestrian roads and they can snap on each other. (please, some modder make a car lane from this template!)
- If a Cim owns a bike he will take his bike for his route he can stop halfway to take the rest with a bus/train etc.
- The new zones will be districts, just like the current farming, oil and ore districts. and they will include bars and casino's. There is also a new pier park which can be placed on the shoreline.
- The day/night cycle will take a total of 60 days, so 30 days of daylight, 30 days of night. Plenty of time to boost realism with cims going to work etc.
 
Last edited:
  • 6
Reactions: