• 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.
Trolleybuses!

Greetings fellow city-builders and welcome to another Sunset Harbor Dev Diary!

Ever since Cities: Skylines was released, we have received hundreds of requests for one specific feature: Trolleybuses! And to go along with every one of those requests, vivid debates took place within the community about whether or not trolleybuses are too hard to implement, if the feature is “too niche” or if “they” actually ever even read the suggestions posted on the forums.

Let us assure you that we are indeed constantly listening, and every single idea is considered when we are deciding what to do next! Also, we are just as enthusiastic about public transport as you are, and you would have to be very creative to suggest something that we would consider to be “too niche”

The reason trolleybuses have never been added is their technical complexity. Trolleybuses are basically “trackless trams”: electrical buses that draw their power from overhead wires. Unlike trams, they utilize two wires and two trolley poles to complete the electrical circuit. And like a normal bus, a trolleybus is able to change lanes and stop on the side of the road. As the bus is moving, its poles rotate and tilt to stay attached to the wires. In the game as well as in reality, the trolley poles are the most tricky part of the whole system.

We are glad to inform you that we have managed to overcome the technical challenges, so Trolleybuses will finally be available in Cities: Skylines – Sunset Harbor!

DevDiary_Trolleybus1.png

They are finally here!

The trolleybus system in Cities: Skylines – Sunset Harbor consists of four components:
  • Trolleybus Depot
  • Trolleybus Roads
  • Trolleybus Stops
  • Trolleybus Vehicle
To get started with trolleybuses, you first place a Trolleybus Depot. After that, you can place Trolleybus Roads and create Trolleybus Lines with roadside stops. Your depot will then send out trolleybuses to operate the lines. It is important to remember that the trolley poles must be attached to the wires at all times, so your Trolleybus Depot and your Trolleybus Lines must be connected by Trolleybus Roads as well!

DevDiary_TrolleybusDepot.png

Trolleybus Depot sending out new trolleybuses.

DevDiary_Trolleybus2.png

Taking passengers over the river.

That’s the easy part! In the second part of this Dev Diary, we would like to shed light on what we did to make the trolley poles behave realistically. Unlike other diary entries, this one will be slightly more technical. Even if you are not that math and geometry savvy, we still hope you enjoy this inside look!

trolleybus1.jpg


The Wire

Let’s take a closer look at the roads! On every road segment, you will find three catenary masts: One at the start, one in the middle and one at the end. The electrical wires span the masts, and with some mathematical calculations we can find out the start and end coordinate of each wire section. Let’s call them
image2019-9-24_12-6-9.png
and
image2019-9-24_12-6-21.png
(using a small arrow to mark them as 3D vectors).

A mathematical formula to define the line of the wire would be
image2019-9-24_12-6-37.png
with
image2019-9-24_12-6-45.png
and
image2019-9-24_12-6-50.png
.

When the bus is on the road segment, we want its pole to connect to the overhead wire defined by the mathematical formula above.
image2019-9-24_12-7-39.png
is the coordinate where the pole is attached to the wire.

The Trolleybus

The game knows how the bus is positioned and rotated in the world, and from that it is possible to calculate the coordinate where the trolley pole is attached to the bus. Let’s call it
image2019-9-24_12-12-56.png
!

The trolley pole is made of sturdy metal, so it cannot stretch. That means the distance between the coordinate where the pole is attached to the bus (
image2019-9-24_12-12-56.png
) and the coordinate where the pole is attached to the wire (
image2019-9-24_12-7-39.png
) must always be equal to the length of the pole. Let’s call it
image2019-9-24_12-7-48.png
and define this formula to take that into account:
image2019-9-24_12-7-54.png


The Equation System

By inserting the first formula into the second one, we end up with a single equation with a single unknown variable
image2019-9-24_12-9-46.png
:

image2019-9-24_12-8-12.png


With a few tricks we can transform it into a quadratic equation:

Screenshot_1.png


We can use the quadratic formula to solve the equation.
We will get zero, one or two values for
image2019-9-24_12-9-46.png
:

image2019-9-24_12-9-30.png


Note that there will be no solutions if the part in the square root is negative (which happens if the wire is too far away from the bus). Note that the solutions for
image2019-9-24_12-9-46.png
calculated by this formula could also be out of range (
image2019-9-24_12-9-51.png
), so we have to check that as well.

Choosing the Right Position

By inserting
image2019-9-24_12-10-3.png
and
image2019-9-24_12-10-8.png
into our wire formula
image2019-9-24_12-10-17.png
, we can calculate two theoretical pole-wire-attachment coordinates
image2019-9-24_12-13-1.png
and
image2019-9-24_12-13-8.png
. One will be above the front part and the other above the back of the bus:

image2019-9-24_12-10-37.png

As the pole of a trolleybus is typically facing backwards, we need to find out which of the two positions is the correct one.

Haven’t had enough of vectors yet? Let’s define a few more:

Screenshot_2.png


Rendering the Trolley Poles

Uh, that was a lot of math! Now that we know where the pole is attached on the bus (
image2019-9-24_12-12-56.png
) and where the pole is attached to the wire (either
image2019-9-24_12-13-1.png
or
image2019-9-24_12-13-8.png
), it is possible to render the pole in the correct position and rotation.

As we learned, a trolleybus has two poles (otherwise the electrical circuit would be incomplete), so we will just repeat the same steps to draw the second pole.

And now you know what kind of stuff goes on behind the scenes to render the poles! Of course, in order to make trolleybuses realistic, this was just one small portion of the overall work that was needed!

DevDiary_TrolleybusNight4.png

The last shift of the evening.

Once again, we've reached the end of a Dev Diary. We hope that you liked this insight into the development of Cities: Skylines and that we didn’t scare you with all the formulas! Gotta say, the end result is really mesmerizing. We could just watch the buses circle around for hours! What do you guys think about the trolleybuses?

Until next time, city-builders!

Your Colossal Order dev team
 

Attachments

  • image2019-9-24_12-10-32.png
    image2019-9-24_12-10-32.png
    309 bytes · Views: 94
  • image2019-9-24_12-10-27.png
    image2019-9-24_12-10-27.png
    286 bytes · Views: 42
  • image2019-9-24_12-9-19.png
    image2019-9-24_12-9-19.png
    208 bytes · Views: 32
  • image2019-9-24_12-8-8.png
    image2019-9-24_12-8-8.png
    208 bytes · Views: 28
  • image2019-9-24_12-7-34.png
    image2019-9-24_12-7-34.png
    349 bytes · Views: 32
  • image2019-9-24_12-7-19.png
    image2019-9-24_12-7-19.png
    349 bytes · Views: 30
  • image2019-9-24_12-7-0.png
    image2019-9-24_12-7-0.png
    246 bytes · Views: 51
Last edited:
I already stated exactly what you stated. The only positives I'm reading are just like yours...the real life scenarios. Not game play. No, you and others talk about how great trolleybusses are in real life. Not once have I read an argument why they make any "game sense" at all. We have trolleybusses already. They are just a different form of propulsion. And I'm not paying full price for a DLC that only provides a different form of propulsion for a bus. That I'm not paying for, not full price. I can easily wait until the holiday sale for this DLC. I have half of it now in the form of mods and the other half, I'm not going to use or am not that thrilled about anyway.
Now, @KappaLappa can you tell me why trolleybusses make any 'game sense' whatsoever?

Your response by the way is so precious! I love it!
It really depends on what you mean by "game sense". The trolleybus mechanic and capacity is almost identical to regular (or biofuel) busses, so they would not add anything new for someone who plays by making the most efficient city possible, for example. But for most people, the look of the city matters at least somewhat. For people termed "painters", the way they play the game is by focusing on the look of the city over anything else. This would add to their gameplay experience if they want to build, or be inspired by, one of the many cities that feature, or have featured, trolleybusses.

I understand how it would not add to your gameplay, but do you not see all the different ways people play cities skylines? Trolleybusses are just one of the things included in the DLC, with many features also included that are much more "function" based.
 
I am not 100% sure how will the trolleybuses behave based on the videos I've seen so far but as I've mentioned I'd expect them to be able to use the same bus stops as buses. That's one difference to trams. Then they would also be 100% environment friendly, just like trams, but unlike buses and bio-fuel buses.

If I also include the eye candy in the equation, then this is something new, visually pleasing to my eyes. And especially if I have steep hills in my city that I want to cover with clean transportation then this is now an option. So far I had to do serpentine roads (sometimes quite unrealistic or difficult to lay) to get trams up the hill as well. The same goes for subway. If you are not making a realistic city then you can of course have your trains climb steep hills, but that's not what I am after.

As for any other differences and advantages or disadvantages all that remains to be seen once this DLC is released.
 
I understand how it would not add to your gameplay, but do you not see all the different ways people play cities skylines? Trolleybusses are just one of the things included in the DLC, with many features also included that are much more "function" based.

I do indeed watch the way others play the game. I am subscribed to many youtubers. I spend I would imagine 20 hours per week watching videos at work. That is why I am confident when I state, there is absolutely nothing new about polebusses but the poles. Their functionality is exactly the same, exactly. We already have them in regular buses, biofuel buses and to a major extent trams. I even watched videos of real polebusses from around the world and ya know what, they act like both trams and busses. Two things we already have. They add zero functionality to what we already have.
Can you tell me what mayoral decisions I will need to make regarding polebusses? It is just a bus attached to a wire. I'm sorry I just can't get excited about the third bus.

Fishing industry..... falls flat for me. Very flat. There was no sport fishing? No charters? No regattas? No races? No sailboats? No marinas? No pleasure craft? No harbor police? No jet skies? No tall ships? In addition there was no need to make any mayoral decisions. I can't schedule a special event? No cost for harbor police, fire, rescue. So it is basically every other resource we already have, with just one part of the chain put onto the water, with the same processing steps we already have. Don't get me wrong I like it. But do I love it? Do I think that CS knocked it out of the park? Or do you think I think they kinda just gave us what we already have with; oil, ore, farming & forestry. Don't get me wrong there is nothing wrong with that. Nothing at all. It is also far from exciting and far short of what it could have been.

Inland water.... I just don't have water/sewer issues in any city I have ever built. Just like I never have power issues. I think for some this may be a great addition. I think for most players it will be, well, ok. Not a game changer. Not a goal to acquire. Just a thing. If you acquire it fine, if not, no biggie. I watch a lot of videos. I can't remember a time when someone had water/sewer issues. Maybe for the very new player but the rest of us? Seems to fill a nonexistent need that's all.

Maps & the rest.... The maps are very nice.
Ok, how does owning a boat, operating a boat, being on a boat, having boats in a city; increases crime while at the same time decreasing cim happiness? How? Just how? CS think fishermen and woman are criminals? What??? Because CS gave us no harbor police or services? But how does a boat increase crime? This makes about as much sense as polebusses.
I like the new policies.
Aviation club sounds cool but I'm of course concerned with the amount of lag they will cause.
Tutorial message log, hilarious. This is the epitome of this entire DLC.
Loading game on pause, I already have that.
Saving the camera position. Ok, whatever. Never been a problem with me how it could be is beyond my comprehension.
Curved road placement, good improvement
Constructing ped paths, good improvement
Walkable quays, good improvement
Eldercare & Childcare, great first steps to increasing/improving/creating an entire healthcare system

IMHO, using the word harbor is a bit of a stretch. Fishing industry would have been more descriptive.
 
They add zero functionality to what we already have.
They may not add functionality, but what they do add is looks. For someone who likes to paint cities, or even just someone who has at least some value in the appearance of the city, how a new item looks is important to their gameplay experience. You mention you watch a lot of videos, so you must have seen content from those who recreate real cities or otherwise aim for realism? I can see it's not the way you like to play the game, but I'm not sure if you're intentionally missing the point. The demand for them is not to do with "mayoral decisions" or "functionality". For a long time, people have been inspired by the various cities in different parts of the world with trolleybusses, and have wanted to recreate this in cities skylines - now they can.

Inland water.... I just don't have water/sewer issues in any city I have ever built
You're again missing the point. This will allow people to play in cities without access to running water, such as the newly added desert map. It also adds to realism, as water treatment facilities are a part of the towns and cities many of us are from.

Ok, how does owning a boat, operating a boat, being on a boat, having boats in a city; increases crime while at the same time decreasing cim happiness? How? Just how? CS think fishermen and woman are criminals? What??? Because CS gave us no harbor police or services? But how does a boat increase crime?
The way I have seen it explained is this: without applying the policy, all the citizens are legally allowed to fish on the map. When you apply the policy, a fishing licence is needed to fish. People are unhappy about having to apply for a licence, and will break the law by deciding to continue fishing.
 
This thread just reminds me of the eternal discussion the missus and I have about scatter cushions...

You're again missing the point. This will allow people to play in cities without access to running water, such as the newly added desert map. It also adds to realism, as water treatment facilities are a part of the towns and cities many of us are from.

It also means we no longer have to clog our waterways up with tons of water treatment plants.
 
It really depends on what you mean by "game sense". The trolleybus mechanic and capacity is almost identical to regular (or biofuel) busses, so they would not add anything new for someone who plays by making the most efficient city possible, for example. But for most people, the look of the city matters at least somewhat. For people termed "painters", the way they play the game is by focusing on the look of the city over anything else. This would add to their gameplay experience if they want to build, or be inspired by, one of the many cities that feature, or have featured, trolleybusses.

I understand how it would not add to your gameplay, but do you not see all the different ways people play cities skylines? Trolleybusses are just one of the things included in the DLC, with many features also included that are much more "function" based.

I think you proved why it was a waste of time spent. For "painters"? So the devs spent all that time on this and the formulas that went with it for nothing more than "pretty"? Waste!!

I'm sure we could all brainstorm a list of things more important that actually adds NEW game play capabilities.
 
So the devs spent all that time on this and the formulas that went with it for nothing more than "pretty"?

I am sorry but the trolleybus poles rendering formulas are nothing in comparison to most other features of the game. And they could adapt those already implemented in Cities in Motion 2. I think that the dev post about the math behind the poles was mostly aimed for those interested to know how that works and possibly for modders. There were for sure more advanced calculations required elsewhere in the game. Actually, the whole game is just mathematics, although not all of it developed by CO (like the Unity engine behind it).

As for more important things - everyone has a different list.
 
Last edited:
I think you proved why it was a waste of time spent. For "painters"? So the devs spent all that time on this and the formulas that went with it for nothing more than "pretty"? Waste!!
It's not a waste of time spent if it's a highly demanded feature that generates CO revenue. Everyone plays the game differently - e.g. "painting" realistic cities, roleplaying as the mayor, creating the largest or most efficient city possible, etc. Most people have at least some element of "painting" - it's no coincidence most of the workshop items, as well as much of the DLC, address this demand. I don't understand why you feel the need to be patronising to others who play a video game in a different way.

I agree with you on how fishing increases crime and decreases happiness. The fishing pier in the game adds happiness and increases tourism, but somehow fishing boats is the opposite?
The fishing boats themselves have no impact on crime or happiness, it's one of the policies, "Fishing License", that does that. Without implementing that specific policy, fishing goes on unlicensed. With the policy active, cims need to have a fishing licence to fish. You can find countless examples in real life of people being upset by, and defying, rules and regulations. It makes sense to me.
 
They may not add functionality, but what they do add is looks. For someone who likes to paint cities, or even just someone who has at least some value in the appearance of the city, how a new item looks is important to their gameplay experience. You mention you watch a lot of videos, so you must have seen content from those who recreate real cities or otherwise aim for realism?

Looks? It is a bus with poles on it. I'm just not on board with the "looks" opinion. It looks like a bus with 2 poles on it. Nothing more. Nothing beautiful. Nothing picturesque. Nothing awe inspiring. Nothing that says beauty at all.

This is a DLC that can easily wait until the price matches the content.
You nor anyone else is going to convince me that this DLC is worth $15. It just aint, sorry. I'm not paying full price for this. It is not a money issue it is a value issue. It does not hold $15 IMHO.
And if it is just 'paint' as you say. You can't argue that it should be free then, correct?

Remember:
Opinions are like buttholes, in that everybody has one!
 
You nor anyone else is going to convince me that this DLC is worth $15. It just aint, sorry.
It is worth even more to me and those who have wished for the features contained in this DLC. The trolleybuses make a great difference for me personally. But that convinced me and doesn't have to convince you :)
 
About 50 km from where I live, Cambridge, MA has a trolley-bus network that was once part of an extensive tram network up until the 1950's when the trolley buses came along and replaced the trams. During the transition period between all trams and trolley bus replacement, the trams utilized one trolley wire while the buses used both. In most places, the same catenary poles were used and the additional wire was added for the buses. In many places, the former tram tracks are still visible in some places as ruts in the road that the trolley buses ride along.

With that said, I don't see why it's mutually exclusive where trams can't share the ROW with trolley buses. A trolley bus network with visible tram tracks underneath could then support the trams just as trams run now on regular roads with tracks embedded in them. The content creator could also make a "fake" trolley bus or tram which is in reality either or. In case of a fake tram, the second trolley pole is invisible.
 
I don't see why it's mutually exclusive where trams can't share the ROW with trolley buses. A trolley bus network with visible tram tracks underneath could then support the trams just as trams run now on regular roads with tracks embedded in them. The content creator could also make a "fake" trolley bus or tram which is in reality either or. In case of a fake tram, the second trolley pole is invisible.

That wouldn't make things any less difficult for developers. And I am sure some mixed roads could be done as an additional asset so maybe someone will create such roads and publish them in the workshop.
 
That wouldn't make things any less difficult for developers. And I am sure some mixed roads could be done as an additional asset so maybe someone will create such roads and publish them in the workshop.

I agree it's not necessarily any easier, but it would allow us to have trolley buses and trams on the same roads/ROW as they do in many places. Maybe as you said, a content creator will make something for the workshop.
 
Some trolleybuses doesn't need to get electricity all the time I think. In Lublin (Poland) they don't need that, so they can get anywhere like normal buses! I thought it will work like that in the game too, but for now they are too limited to consider them worth I think.

The better option would be to calculate how much it's drive costs taking into account how much they can use roads with option to power up their batteries. Pros over normal buses? Possibly lower costs. Cons? You have to maintain some roads to optimise the costs.

Edit:
Even in Zurich they don't need to be powered up to be able to drive:

The batteries are charged while the vehicles are in operation using the overhead lines. They are designed in correspondence to Zurich’s special requirements and can thus be operated over stretches as far as 1.5 km without the need for overhead-line operation.
So, I think all in all, trolleybuses could be useful, but the in-game design is flawed. Would be nice to see it balanced somehow
 
Last edited:
I'm pretty disappointed about the trolleybusses... I'm on PS4 and the wires on the bus doesn't show at all. That's not acceptable by any means. That's also kind of the whole feature about the trolleybusses. Right now it just looks like a normal bus with wierd wiring above it...
 
I'm pretty disappointed about the trolleybusses... I'm on PS4 and the wires on the bus doesn't show at all. That's not acceptable by any means. That's also kind of the whole feature about the trolleybusses. Right now it just looks like a normal bus with wierd wiring above it...

That's a bummer. I wonder if it's a rendering issue within the game more than the implementation. I've seen stuff like that in other simulations where tracks and catenary don't render properly. If anything I would bug report this and hopefully it can be fixed in a future hotfix or patch.
 
I admire the amount of time (nearly a calender year old) you have dedicated to your city. Do you have any links to this; musical, magical, mystical city of yours? Any time lapse photography?
How much time per day you mayoring?
Unlimited $?

Some days a lot of hours, especially if nobody else is around. Other times I go a few days without playing, but usually pick away at it when I can. That's typical. Since Oct/Nov I slowed to a crawl, as I was expecting a new DLC, and wanted to build the new stuff in my current city. I don't like to start from scratch with all the new stuff locked. Especially since I try to get stuff up on the wiki as soon as I can. Being at work now isn't helping that. At work (on day 28 of a 38 day trip on a ship) I have only a little free time, so not much progress.

Only have 6 squares used at the moment, and not really sure which to get next.

Unlimited $? No. Sort of feels like it though, as my city has earned a fair bit. No cheats. No mods. --NoWorshop. Really need MoveIt to straighten out a few things though!!

I have a few screenshots that I took awhile back (not a lot of change since then).

20200117225622_1.jpg 20200117225703_1.jpg 20200117225846_1.jpg 20200117225855_1.jpg 20200117225919_1.jpg

It was my first city with full use of the Industries DLC. (When it came out, my current city had room for a forestry industry and then the 9-tiles were full.) Ended up with three Campus universities as well.
 
Last edited:
Unlimited $? No.
I am not so patient apparently :). Also, very nice city, I envy you :).

Once I also had a city I played for several years but had to quit it around August last year because I was no longer able to build/create any more nodes (game limitation) :(. I was quite sad to quit it and didn't want to play Cities: Skylines for several months after that as all I wanted was to extend/update the city I already had invested so much time into. And there was still so much space to work on and things left to update. I am sure I could be playing that for another few years :).

But yeah, was using some mods like move-it and mod that gave me the ability to build things outside city borders (I didn't use 81 tiles) + unlimited money to concentrate solely on the building and nothing else, so was able to expand faster.
 

Attachments

  • Rockvalley.jpg
    Rockvalley.jpg
    4,8 MB · Views: 16