GithubHelp home page GithubHelp logo

skylines-traffic-manager's Introduction

Skylines-Traffic-Manager 1.04rc

This mod lets you add priority roads, control traffic lights, change lanes and add/remove crosswalks.

Features:

Add/Remove Traffic lights

  • You can add/remove traffic lights on all road junctions

Priority Signs

  • Set main and secondary roads.
  • Diamond(yellow) sign is main road, all cars on that road have a priority over all other roads.
  • Triangle(red and white) sign is secondary road, cars have to yield to vehicles from the main road. Stopping is not required.
  • Stop sign is also a secondary road. Cars have to stop, look for incoming cars and if the road is clear - continue on their trip

Manual traffic lights

  • Manually control all traffic lights on a junction
  • Useful for designing your timed traffic lights (See 'Timed traffic lights'), clearing traffic and role-playing as a traffic cop
  • Important: Traffic lights revert to normal when inactive

Timed traffic lights

  • Set traffic light timers on one or more junction to allow for more heavy routes to clear more traffic.

  • Configure multiple junctions at once to create a green wave.

  • For people asking how to use it, here's a simple how-to:

  1. Select timed traffic lights.
  2. Select the desired junction (select one 4-way junction for a first-timer)
  3. Click next.
  4. Click Add State
  5. Set the desired lights on the junction (don't click 'mode', as you want to use the simplest light for a first-timer); Example: set the 2 roads facing each other - green; and the other 2 - red
  6. Set the desired amount of seconds you want the lights to be with the slider (for example: 12)
  7. Click 'Add'
  8. Click 'Add state'
  9. Set the desired lights on the junction (again, don't click 'mode' - you want simple traffic lights); Example: reverse the lights - the ones that are red - make them green, and the ones that are green - make them red.
  10. Set the desired amount of seconds you want the lights to be with the slider (for example: 8)
  11. Click 'Add'
  12. Click 'Start'
  13. Now you have a junction that has a 4-way with one of the roads having 12 'seconds' of green time (it's not exactly seconds, but it's an easier naming) and the other having 8 'seconds' of green time

This will give you a basic idea of how things work. You can watch the video for more complex timed traffic lights.

Change lanes - see 'compatibility mode' below if you do not have this option

  • Change road lanes to allow/disallow lefts/rights, add more forward lanes, etc., traffic will start following it after 2-3 minutes. If you want cars to instantly start following them, use 'Clear traffic' button (See 'Clear traffic')
  • Important: these lanes define the direction, not the road curve, so if you have a T-intersection with 45 degrees curve, forward is forward, not left/right. Sometimes you'll have to do it manually, since the base game does NOT do it that way)

Clear traffic

  • Clears all road traffic
  • Useful when changing lanes, creating manual/timed traffic lights and to clear congestions caused by bad road planning.

No despawn - see 'compatibility mode' below if you do not have this option

  • Enable/Disable despawning caused by traffic congestion or traffic being blocked.

Same road priority (base - not configurable)

  • All cars that are on a same priority level (diamond - diamond, yield - stop - yield - stop), manual traffic lights, timed traffic lights or on modified lanes start to follow the rules for Priority on the right and wait for left turn(wait for right turn in LHD)

IMPORTANT

All roads that have priority signs, enabled manual traffic lights, timed traffic lights or changed lanes automatically start running under an additional layer - Traffic Manager's simulation. Everything else runs under game's simulation Which means that cars start following the assigned lanes and same road priority. The base game sometimes assigns lanes that are not correct, which will cause traffic to not go through that intersection. You'll have to manually fix the lanes to the proper ones, so the traffic can start functioning again

Known issues:

  • No 'save to cloud' support

Incompatible mods (please report which ones it does not work correctly with):

  • Zonable pedestrian roads
  • Lane changer
  • Toggle traffic lights
  • All mods that override the Pathfinder; CarAI.CalculateSegmentPosition (both methods); CarAI.SimulationStep; RoadBaseAI.SimulationStep; HumanAI.CheckTrafficLights; PassengerCarAI.SimulationStep, CargoTruckAI.SimulationStep;
  • All mods that modify NetNode and NetLane flags. (Yes, I know it sucks, I also want a common API/NAM/CKAN, but that will take some time)

Compatibility mode:

When it encounters that another mod is overriding the PathManager, it disables 'Despawn' and 'Lane Changer' tools so it doesn't cause problems. Tested only with Traffic++

Please check yourself if your issue is caused by another mod, it's pretty hard to go through every mod and check if every functionality is working properly

It's important to check if your issue is caused by another mod. Disable and restart the game just to be sure. Some mods do not break everything in the mod, just parts of it, and debugging becomes very difficult.

How to clear ALL traffic manager saves in case a major/blocker bug pops up: Open your Steam folder, go to SteamApps\common\Cities_Skylines\Cities_Data, delete all files with the name 'trafficManagerSave_xxxxxxx.xml'

skylines-traffic-manager's People

Contributors

dornathal avatar klparrot avatar svetlozarvalchev avatar xabbok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skylines-traffic-manager's Issues

Pathing bugs in 1.04rc

I have some screen shots at: http://imgur.com/a/6yIdJ

Apparently, the lane evaluation is reversed for traffic making right and left hand turns on RHD maps.

Right turns always end up in the Lane 1 of 6 lane roads. (Lanes 1-5 straight only. Lane 6 Right turn only. Always picks Lane 1.)

Left hand Turns weave. Highway segment: Left, Left, Straight only turning onto a 6-Lane(3/3 BiDirectional). Lane 1 of the Highway ends up in Lane 2 of the 6-way. Lane 2 of the Highway weaves in to Lane 1 of the 6-way.
Video at https://youtu.be/5zGQYRTcsJI

Update for new version.

The new update broke Traffic Manager. I'm posting here because i think Github is faster than Steam for reporting.

ps: ThankYou for this awesome mod!

KeyNotFoundException and Null reference exception after modifying intersection with timed traffic lights

I'm getting this exception (a LOT of them) after modifying an intersection with timed traffic lights. At least that is what I assume must have caused the exception, of course I can't be entirely sure. It is accompanied by a repeatedly popping up window with a Null reference exception, however that window only pops up when the simulation is not paused.

I've disabled all other traffic mods (Lane changer and switch traffic lights most notably) that I was using.

I'll keep experimenting and will update if i have more details on how to reproduce.

The error persists after I reload an earlier version of that same savegame (one without the modification to the said intersection). It does not occur on my other savegames

Screenshot of exception details:
http://prntscr.com/6vajra

[SUGGESTION] Be able to make roads no-parking zones.

You should be able to make a piece of road a no parking zone, on roundabouts for example, if you don't want cars to park there. Cars already can't park on grass stripped roads, but if you could make any road no parking that would be cool.

NullReferenceException when upgrading from 4-lane to 6-lane road on intersection with a timed traffic light.

I don't have the stack trace on me at the moment (will get one when I get home), but it was coming up out of CalculateSegmentPosition in CustomCarAI.

If needed, I can provide a copy of the save I'm using. I will attempt to also recreate this outside of the save, but right now the issue occurs when I attempt to upgrade a 4-lane road segment that connects to a timed traffic light node to a 6-lane road.

3-lane roads outer lane not used

On 3-lane roads, it usually refuses to use the most outer lane. (same thing I see with highways and 6-lane roads).

3laneproblem
Version 1.01rc

Null Reference Exception when leaving asset editor

NullReferenceException: Object reference not set to an instance of an object
  at TrafficManager.LoadingExtension.OnLevelUnloading () [0x00000] in <filename unknown>:0 

  at LoadingWrapper.OnLevelUnloading () [0x00000] in <filename unknown>:0 
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
LoadingWrapper:OnLevelUnloading()
LoadingManager:UnloadLevel()
PauseMenu:<Quit>m__CC(UIComponent, Int32)
ColossalFramework.UI.UIView:PopModal(Int32)
ColossalFramework.UI.UIDynamicPanels:Hide(String, Int32)
ExitConfirmPanel:OnReturnMainMenu()
System.Object:DynamicEventWrapper_OnReturnMainMenu(ExitConfirmPanel, UIComponent, UIMouseEventParameter)
ColossalFramework.UI.UIComponent:OnClick(UIMouseEventParameter)
ColossalFramework.UI.UIButton:OnClick(UIMouseEventParameter)
ColossalFramework.UI.MouseHandler:ProcessInput(IInputTranslator, Ray, UIComponent, Boolean)
ColossalFramework.UI.UIInput:ProcessMouseInput()
ColossalFramework.UI.UIInput:Update()

This exception is thrown when leaving the asset editor. It appears to prevent the OnLevelUnloading callback in other mods (including mine, Precision Engineering).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.