Cities: Skylines - After Dark - Dev Diary 2: What's new with Modding?

Cities: Skylines - After Dark - Dev Diary 2: What's new with Modding?

  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

co_damsku

Developer
16 Badges
Nov 22, 2010
570
144
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Heir to the Throne
  • Magicka
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Pillars of Eternity
  • Stellaris
  • Tyranny: Archon Edition
  • BATTLETECH
  • Surviving Mars
  • Cities: Skylines
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.

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.

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.


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.

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.


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.


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.



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
 
  • 20
  • 8
Reactions:

Greygor69

Colonel
76 Badges
Jun 6, 2009
1.127
543
  • Stellaris
  • Hearts of Iron III Collection
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Semper Fi
  • Sword of the Stars II
  • Heir to the Throne
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Crusader Kings II: Sunset Invasion
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
It's nice to see you're like the NSA

You listen :)

Perhaps CO needs a new Badge




This is looking really good, but you do of course realise my next question, when's Dev Diary 3 ;)
 
  • 3
Reactions:

Zed68

General
7 Badges
Aug 26, 2014
1.857
880
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
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

NO NO NO NO and NO !!!

This is wrong, very very very wrong !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


The diffuse map CAN't be used for the color of the illumination, this means that all windows will just be a lit version fo what was there before !! Even if we used a specular map on top before, the reflection was tinted by the diffuse depending on the angle you looked at it and the light that touched it. We simply CAN'T have it that way !!!!

Now (as an example) we CAN'T use the fact that a black diffuse will give darker reflections at certain angles.

THIS IS THE WORST IDEA EVER guys !!!!!!!!!!!!!
 
  • 1
Reactions:

Zed68

General
7 Badges
Aug 26, 2014
1.857
880
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
We already had to deal with some limitations, but this is one more and I feel completely betrayed as a builder by this decision.


All the glass buildings will have to conform to this, they will obliagatory look weird at some angles during the day because the color underneath (if they are made to have light at night) will show.
 

akeela84

Colonel
25 Badges
Feb 17, 2015
1.034
225
  • Cities: Skylines Deluxe Edition
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris Sign-up
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Stellaris
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars Pre-Order
This is really good news for this game and even makes more easy to select a certain style. :)
Keep on the good work. :)
 

Mr Maison

Colonel
13 Badges
May 9, 2013
849
676
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Cities: Skylines Deluxe Edition
Thanks for the info. So we can just continue to use the Illumination maps as they currently are? What about how the day cycle affects the illumination? I'm hoping the illumination turns off during the day because not everything that glows at night will be windows and we want to maintain desaturated colors. Perhaps there could be a way to set the map to where a certain value turns on and off during the day/night cycle.

I'm loving the inclusion of "Styles".
 

Zed68

General
7 Badges
Aug 26, 2014
1.857
880
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
Guys you take it that we just want to light up the whole thing with bright white color or uniform color, but that's not what builders will and want to do.

We want to be able to have different tinted colors of windows during the night. And if the diffuse is used as the light color it just forbids us to do so or it will mess up the looks of our buildings during the day.

My latest tower... http://steamcommunity.com/sharedfiles/filedetails/?id=505937746

Thank you, I'm dead there. My only choice will be to have it light in red at the top... and not at all at the bottom because to get this effect I used a black/red gradient under the specular.
 

Greygor69

Colonel
76 Badges
Jun 6, 2009
1.127
543
  • Stellaris
  • Hearts of Iron III Collection
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Semper Fi
  • Sword of the Stars II
  • Heir to the Throne
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Crusader Kings II: Sunset Invasion
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
@co_damsku You said

"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!"

If you don't include all levels, What Happens when the game wants to increase level

Does the building Remain at the highest level that's available, does it disappear to an empty lot or does it generate an error because it can't level up.


I was just thinking, if you had a style called "Slum" and only run down Level 1 and Level 2 buildings would this be a way of creating a Slum District? Or am I misunderstanding.
 
  • 1
Reactions:

ghostbirdofprey

Second Lieutenant
28 Badges
Mar 13, 2015
173
182
  • Sword of the Stars II
  • Stellaris
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • BATTLETECH - Backer
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Surviving Mars
  • Cities: Skylines - Mass Transit
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Stellaris: Ancient Relics
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Sword of the Stars
So is there going to be a way to deploy a whole style through the workshop, or will we be stuck having to download a set of related but, nevertheless individual, assets and manually setting them to a style?
Also can a style be set citywide like policies?
 

Zed68

General
7 Badges
Aug 26, 2014
1.857
880
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
I'm now illustrating why I'm very unpleased :



Left, white diffuse under specular. If we want to have something different that just a white light during the night how will it look during the day ? Yes, we won't be able to do that

Middle, black diffuse under specular... well... simply forget that, we won't be able to do it anymore.

Right, red under specular. Now if we use colored glass during the day we are condemned to have it light the same color during the night. No choice.



Well ??? o_O
 
  • 1
  • 1
Reactions:

Zed68

General
7 Badges
Aug 26, 2014
1.857
880
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
A question (might make it a bit less awfull).

If we use a value of 120 in the illumination map and the diffuse is pure black, what will happen ?).

If you make the illumination overcome the base color when pushed to the max, well it might still be "ok"... (but not what we would have liked to have at all).
 

BloodyPenguin

Captain
25 Badges
Apr 19, 2015
308
57
  • Cities in Motion
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Age of Wonders III
  • Cities: Skylines - After Dark
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Cities: Skylines - Campus
  • PDXCon 2019 "Baron"
  • PDXCon 2017 Awards Winner
  • Surviving Mars
  • Cities: Skylines - Snowfall
  • Cities: Skylines
  • Crusader Kings II
  • Cities in Motion 2
  • Crusader Kings II: Sword of Islam
Thanks for the diary! :)
Heck, I imagine sleepless nights fixing my mods after 'Afer Dark' comes out :( Looks like many of them will be affected by these changes. Still it's unclear to me will european buildings load for all biomes (and vise versa) or not ? Is 'Default' style what I call 'International' theme in my mods?
 

Lamahorse

Functioning Alcoholic
72 Badges
Jun 2, 2010
1.444
1.452
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Victoria 2: A House Divided
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Semper Fi
  • For the Motherland
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II
  • Imperator: Rome Sign Up
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Stellaris: Apocalypse
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • Prison Architect
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: El Dorado
  • Crusader Kings III
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Legacy of Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Cities: Skylines - Mass Transit
  • Victoria 2
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Cities: Skylines - Parklife
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Conquest of Paradise
Looking good folks!

Will there be any mechanics to bid and deal with hosting hypothetical events (parades, sporting events) and the corresponding problems (tourism, traffic)?
 
  • 2
Reactions:

BadPeanut

Colonel
17 Badges
Oct 10, 2014
944
493
  • Cities: Skylines Deluxe Edition
  • Cities in Motion 2
  • Cities: Skylines - Parklife Pre-Order
  • Crusader Kings III
  • Prison Architect: Psych Ward
  • Cities: Skylines - Campus
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Cities: Skylines Industries
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • Surviving Mars
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
If not, will vanilla style (European/International) be selected on level load?

Or is it simply a name for mix of all growables (like current behavior)?
I think the inclusion of european buildings is set as a mod in the mods panel, you enable it before loading a game and then when you load the game all european is unlocked (or at least all growables) that way it's still a mod and doesn't break the min specs?

just guessing though *disclaimer
 

BadPeanut

Colonel
17 Badges
Oct 10, 2014
944
493
  • Cities: Skylines Deluxe Edition
  • Cities in Motion 2
  • Cities: Skylines - Parklife Pre-Order
  • Crusader Kings III
  • Prison Architect: Psych Ward
  • Cities: Skylines - Campus
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Cities: Skylines Industries
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Parklife
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • Surviving Mars
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
@boformer you should be super happy - looks like they really liked your implementation and thought everyone should have it! congrats! ',:)
 
  • 5
Reactions:

Xannepan

First Lieutenant
Aug 17, 2014
240
65
Can you please please please add to option to add an (optional) interior map that is used instead of the difuse map if present. I am completely on one page with zed68 on this....