Temporary Traffic Fix: A Step-by-Step Guide

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

unmerged(262783)

Private
2 Badges
Feb 4, 2011
17
0
  • Cities in Motion
  • Cities in Motion 2
There's been some confusion about how to manually update the traffic in the game so I've decided to post this step-by-step guide. Hopefully, this alleviates the traffic and gridlock issues for some and give Collosal Order a little more time to fix the problem.


UPDATE 2/24/11: pdguru created a thread that simplifies this process a bit. He followed the instructions here, modified the necessary file and packaged it all up to make the process easier for the masses. Go here if you want to skip the steps I've outlined below and just download the modified files: http://forum.paradoxplaza.com/forum/showthread.php?523291-Traffic-Reduction


Step 1: Download, unpack and run the GS File Viewer

Download Liechti's excellent utility here, make sure you get the latest version: http://www.citiesinmotion.net/download/index.php?page=EntryFiles&entryID=5

Once downloaded, create a folder on your computer and unpack the contents of the downloaded zip file to that folder. I simply created a folder on my desktop and unpacked the files to it.

You should now have a folder with a bunch of files in it. Look for an application called "GSFileViewer" (GSFileViewer.exe). It'll have a blue icon that resembles a barrel. Run that program.


Step 2: Extract the metro.gs file

In GS File Viewer press the "Open GS file..." button. Next, navigate to your Cities in Motion folder and select the metro.gs file. Press "Open". If you did this correctly, you should now see a collection of folders with each one containing more files and folders:

Step2.png


Press the "Extract whole GS file to folder..." button. Navigate to your Cities in Motion folder and select it. Make sure it is highlighted and press the "Make New Folder" button towards the bottom. It'll make a new folder and allow you to name it. It is very important that you name it "metro". After you've named it, make sure it is selected and press "OK". The GS File Viewer will now extract all of the files inside metro.gs into your new "metro" folder.

IMPORTANT NOTE: When the Cities in Motion game starts up it'll check for the existence of the "metro" folder. If it sees it, it'll ignore the metro.gs file and use the files in the metro folder instead. Be aware that any patches you apply to your game will only update the "metro.gs" file and not any files in your metro folder. Therefore, you must remember to delete your metro folder after installing a patch or else some of the changes made by the developers will be ignored.


Step 3: Fixing traffic

Navigate to your "Cities in Motion\metro\scripts" folder. Open the "game.script" file with a text editor like Notepad. Scroll down until you see the following lines (around line 80 approx.):

Code:
// time in seconds after the citizen can move again
$grid.citizens.minCycleDuration = 300;
$grid.citizens.maxCycleDuration = 600;

These values control how often a citizen moves about the city. After arriving at their destination a citizen will not move again for at least 300 seconds but is guaranteed to be moving again within 600 seconds.

If you revise these values upwards you will reduce the number of citizens moving around at any given time and therefore, reduce the amount of traffic on the streets. However, you will also reduce the number of citizens looking to use your public transport.

I've set these to 450 and 900 respectively and am very happy with the results so far.


Good luck!
NullCharacter
 
Last edited:
Nullcharacter - this helps a lot, thank you. Now, is there a variable that sets the way traffic goes (i.e. chooses major or minor roads)? Some of the problem (particularly Amsterdam) seems to be that cars come off the main roads and take the minor ones and clog them up.
 
You could also try the following:
Follow Steps 1 and 2 (you'll have to extract objects.gs too) from NullCharacters Post then go to ..\Cities In Motion\metro\objects\vehicles\ where there should be the folders era1 to era 4 which contain the vehicles. Each ground-vehicle folder contains a script file which will contain these lines (with different values):

Code:
this.acceleration = 2.0;
this.braking = 0.3;
this.speed = 0.9;
this.turning = 1.0;

I doubled all acceleration values and set all braking values to 0.8. This seems to make traffic run alot (maybe too much - the values are too high I guess) smoother. Pretty unrealistic of course but for a temporary fix it could be worth trying. :)
 
I did something similar. However instead of changing the private cars vehicle speed, or the overall traffic, I changed the amount of passengers each of the player vehicles can carry.

For me, the main problem is not so much congestions (that can be reduced by going off road, and seems to be somewhat realistic (if a bit over the top for the top roads)). However I wouldn't mind that if I wouldn't go bancrupt on every map, unless I rush to metro, a one way tactic I do not deem fun. I play on easy, and I want to rake up insane amounts of cash to create an insane public transport network. I can't do that if the ROI of my whole network is either 2'000 in the negative, or barely profitable, often 100 or less, even when I pay minimum wages, and neglect all the infrastructure, while keeping the prices in dark red. All that, and i'm still not able to transport all the customers, it's insane.

To do a similar thing as I did, you need to use the gs-unpack tool (mentioned in the first post) but instead of the metro.gs file you need the object.gs file (btw. what _is_ this gs archive format? I was unable to find any information online), then go to the "vehicles" subfolder and change all the *.script files entry on the "capacity" line. I used a quick and dirty script that added half to what already was there, for example the streetcar used to carry 10 but now carries 15.

This increases the income a bit much, but as I said, I wanted it easy. Obviously I also now need less busses, so the whole network isn't overworked by 20 buses serving less then 10 stations in addition to the private cars. Even better, one can now actually achieve the scenario help demands, before they come back and say "you helped a lot the first time now do another thing for me". I might reduce the multiplier or actually subtract from the preset for metros, one of the desingers must hate all other forms of public transport :wacko:

Caveat: at the end you need to put the resulting "objects" folder into a "metro" folder in the application directory, otherwise your changes will be ignored by CiM.

For example (note objects in metro, not directly in CiM folder):
/Applications(x86)/Paradox/Cities in Motion/metro/objects/
 
I did something similar. However instead of changing the private cars vehicle speed, or the overall traffic, I changed the amount of passengers each of the player vehicles can carry.

For me, the main problem is not so much congestions (that can be reduced by going off road, and seems to be somewhat realistic (if a bit over the top for the top roads)). However I wouldn't mind that if I wouldn't go bancrupt on every map, unless I rush to metro, a one way tactic I do not deem fun. I play on easy, and I want to rake up insane amounts of cash to create an insane public transport network. I can't do that if the ROI of my whole network is either 2'000 in the negative, or barely profitable, often 100 or less, even when I pay minimum wages, and neglect all the infrastructure, while keeping the prices in dark red. All that, and i'm still not able to transport all the customers, it's insane.

To do a similar thing as I did, you need to use the gs-unpack tool (mentioned in the first post) but instead of the metro.gs file you need the object.gs file (btw. what _is_ this gs archive format? I was unable to find any information online), then go to the "vehicles" subfolder and change all the *.script files entry on the "capacity" line. I used a quick and dirty script that added half to what already was there, for example the streetcar used to carry 10 but now carries 15.

This increases the income a bit much, but as I said, I wanted it easy. Obviously I also now need less busses, so the whole network isn't overworked by 20 buses serving less then 10 stations in addition to the private cars. Even better, one can now actually achieve the scenario help demands, before they come back and say "you helped a lot the first time now do another thing for me". I might reduce the multiplier or actually subtract from the preset for metros, one of the desingers must hate all other forms of public transport :wacko:

Caveat: at the end you need to put the resulting "objects" folder into a "metro" folder in the application directory, otherwise your changes will be ignored by CiM.

For example (note objects in metro, not directly in CiM folder):
/Applications(x86)/Paradox/Cities in Motion/metro/objects/

You might want to have alook here mate http://forum.paradoxplaza.com/forum/showthread.php?522690-MOD-Vehicle-Realism
 
Increasing the capacity of vehicles doesn't change the traffic congestion problem.
For fun, I multiply by 10 all capacities and I still had problem because of congestion. with over 300 peoples waiting at some bus station.
 
Anyone found more optimal numbers than 450 and 900? I'm still getting long lines of traffic and gridlocks with these numbers. Haven't yet experimented with any other numbers.
 
The main problem is more traffic lock than people taking their car going somewhere adding to the traffic.
A good solution would be to find a way to avoid those lock.
 
After some try with a demo/beta mix, here is what I saw after modding acceleration/brake x2 :
- without any intervention on the map by me, the traffic is normal. There are some little problem sometimes but it doesn't stay for long.
- if I put a bus/tram line going on heavy traffic road without stoping there but stoping in little street with few vehicles, the traffic was ok
- with the same setting, if you put too much vehicles, they create jam on the road joining the street where they are because player vehicle always go first
- if you put bus/tram stop on heavy traffic road, you're pretty much dead. The chance that it blocks everyone behind is so high and the time to load as well makes it the jam master.

So, this show 2 problems :
- loading time
- no possibilities to overtake stopped vehicles

if one of these problems get solved, then there should be less jam.
 
Hi,

I´m from german Fanpage http://www.citiesinmotion.net/index.php?page=Portal. My english is very boring. But I have good news. The traffic Problem seems to be modifiable.

Extract metro.gs -->Go to Scripts--->Economy, then search for:


Quellcode

1 if ($num < 17700) {
2 $grid.citizens.carMultiplier = clamp(1000.0 / max(1.0, $num - 22550.0) + 1.04, 0.0, 1.0);
3 } else {
4 $grid.citizens.carMultiplier = clamp(8000.0 / max(1.0, $num - 4000.0) + 0.25, 0.0, 1.0);
5 }

then change to:

Quellcode

1 if ($num < 17700) {
2 $grid.citizens.carMultiplier = clamp(1000.0 / max(1.0, $num - 22550.0) + 1.04, 0.0, 0.5);
3 } else {
4 $grid.citizens.carMultiplier = clamp(8000.0 / max(1.0, $num - 4000.0) + 0.25, 0.0, 0.5);
5 }

The red Number can be changed between 0.0 and 1.0.

The traffic will be reduced obviously. The customer traffic remains unchanged. It´s a first step. Try it out.

big thank you to Bennhardt
 
Tried this one for a while, but found that while it did eliminate traffic on the first Vienna scenario, it also killed my number of passengers. I'm assuming this is because "the fix" simply makes fewer people need to travel.

I found that renaming the metro-folder and trying with the latest patch was a more balanced solution.