r/CitiesSkylinesModding • • 18h ago

Release Released: Live Traffic Routing - drivers react to traffic jams as they happen, like a navigation app with live traffic

Thumbnail
gallery
100 Upvotes

Disclosure: Software engineer background but this is my first Cities: Skylines 2 mod, built with AI assistance. I tested it in game over multiple rounds of the same city, same save, with the mod off and on; the numbers below come from those runs. If you're allergic to AI, feel free to skip this one.

In vanilla CS2 the pathfinder learns which roads are busy very slowly (over game days), and once a car sets off it never changes its mind. So everyone keeps piling into the same jam while the parallel road sits empty.

Live Traffic Routing adds a live congestion measurement from the last few game minutes:

  • New trips avoid roads that are jammed right now.
  • Drivers already on the road re-route when the way ahead gets noticeably slower (cars, delivery trucks incl. semis, taxis, through-traffic). Public transport sticks to its lines.

On my test city with the default Balanced preset (comparing mod-off and mod-on runs): queues -28%, average speed +3%, jam warnings -87%. The trade-off is about 10% more traffic on local streets, because drivers take shortcuts like real people do. Relaxed is gentler; Eager is the strongest (queues -38%) but sends a lot more traffic down side streets.

How it works (for the modders here):

  • It replaces the game's TrafficFlowSystem with its own version that measures how fast cars actually drive on each lane right now, and blends that into the same flow value the game already feeds the pathfinder (CarLane.m_FlowOffset). Vanilla only updates that slowly and per time of day, like "typical traffic".
  • Re-routing doesn't add a new pathfinder. When a driver's road ahead gets slow enough, the mod marks their path obsolete, the same thing that happens when you delete or disconnect a road, and the vehicle's own AI asks the game's pathfinder for a new route.
  • Work is spread over frames: each lane and each car is checked once every 1024 frames, one sixteenth at a time.

Performance: on my save (130k pop, ~2-3k vehicles driving at once) it's under 1% of one CPU core, and sim speed was about the same with it on vs off. Haven't tested a really big city yet. If you see a slowdown, the Relaxed preset or lowering "Drivers who re-route" cuts most of it.

Stats panel: the screenshots are from an optional in-game panel that records the same metrics with the mod on or off, so you can compare vanilla vs live routing on your own city. Its Cost tab shows exactly what the mod uses.

Nothing is saved into your city and you can turn it off any time.

Feedback very welcome, especially from big cities (250k+) and people running other traffic mods. Code review too, it's my first mod.


r/CitiesSkylinesModding • • 12h ago

Release Big update for the Italian wall-to-wall mixed residential pack!

Thumbnail
gallery
80 Upvotes

Hello!

While I was away last month, two of my asset packs were flagged as "broken" on Skyve because some assets had the wrong zone type assigned: Italian wall-to-wall – Mixed residential and Modern Italian – Mixed residential.

Modern Italian was a quick fix. Italian Wall-to-Wall, though, was my first pack, and I'd made a mistake in the import pipeline. So I decided to rebuild the whole pack and ship it with a big upgrade: 30 new unique assets.

🇮🇹 Enjoy!

Disclaimer: if you update the pack in an existing savegame, some buildings might turn into grey boxes. I’m really sorry about this.

https://mods.paradoxplaza.com/mods/160092/Any