• 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.
Status
Not open for further replies.

xone_lai

Second Lieutenant
Feb 12, 2015
104
57
There is a limit even on road? Dang... :eek:
I certainly hope there will be some way to increase or totally remove such limitation, official patch or something.
Computing power isn't going to stay the same for the next few years... Dev should not just build the game for "now" only.
 

Anttonilla

Skyliner
36 Badges
Oct 6, 2014
396
229
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Cossacks
  • Stellaris
  • Age of Wonders III
  • Cities in Motion
  • Cities in Motion 2
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Prison Architect
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Green Cities
  • Imperator: Rome Sign Up
  • Steel Division: Normand 44 Sign-up
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Natural Disasters
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Cities: Skylines - Campus
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
Remember guys that SimCity had a 1024 limit on roads :p But yeah, hopefully modders can do something to this. Otherwise our 81 tile cities will never get filled xP
 
  • 2
Reactions:

KnightHawkTFC

Lt. General
1 Badges
Mar 5, 2015
1.357
319
  • Cities: Skylines
btw I notice the limit is even smaller if you're just in the map editor
16384 -> map editor
32256 -> loaded game ( also 258048 lanes total limit)
1024 -> asset editor

Buildings are limited as well at 32256 in game; 8192 in the map editor, 64 in asset editor

250 transport line limit
127 districts
250000 trees (map editor, in game it's 262139, 64 in the asset editor)

Props:
Asset Ed: 64
Map Ed: 50000
Game: 65531

zoned blocks: 32256

Just fyi if you want to mess around with your assembly to increase some of these keep the buildings\blocks\roadsegments\roadnodes keep them <65536 as the management arrays for these contain ushort counters (16bit limit), and if you change the road\node segment number make sure to similarly up the lane count.
 
  • 7
Reactions:

KnightHawkTFC

Lt. General
1 Badges
Mar 5, 2015
1.357
319
  • Cities: Skylines
Just wanted to add I tested editing the assembly to change both the limitchecker()'s and the constants for NetManager, ZoneManager, and BuildingManager to 64k (and lanes to 512k). Running with the patched assembly without other mods (actually I've have a few minor ones running) I've yet to have any problems, your mileage may vary depending on your system and mod choices.

I actually was able to finish up adding a couple thousand more road segments and then play the OP's map. I'm also in the process of exceeding the zone\building manager limits on another custom 25x map, so far without issue though I've only pushed the limits just north of 42k to date. BTW OP's map design while very pretty and symmetric isn't the best for traffic, not without some changes, but thankfully that was possible once I jacked up the limits. lol

In case someone is thinking of asking hey can you post the patched version... no I will not pass around the modified assembly, not only is that bad joojoo legally, but upon the next update it wouldn't work anyway. So it's best for someone to know how to just do this themselves as it'll need to be repeated after every update. The basic instructions for doing it are below, it's not rocket science, or complicated and only requires some basic knowledge upon the reader:

1. Install Telerik's JustDecompile (free). (JDC)
2. Install the ReflexIL plugin for it (free).
3. [optional]Copy the managed game dlls from your game folder (CitesData\Managed) to a staging area (we'll call this c:\stage\CSL)
4. In JDC open the Assembly-CSharp.dll from the staging area.
5. Navigate down the class tree to NetManager and expand it exposing the code in the right.
6. Activate the Reflexil plugin (top menu: Plugins\Reflixil), you'll get an added section on the right splitting the code view.
7. At the top of NetManager class code find MAX_NODE_COUNT, MAX_SEGMENT_COUNT, and MAX_LANE_COUNT
8. Click on each of those mentioned in step 7, and in the Reflixil window for each change the value from 32768 to 64000, you may have to hit enter, or after changing just click on another area of dialog like const.type just to make sure the new value takes (test that it takes by clicking on something else and then back making sure it still reads 64k). For the Lane Count I used 512000, probably should be slightly higher but unless you really plan on hitting the new limits it should be fine.
9. Now in the same class scroll down and find the CheckLimits() function, click on it, Reflexil window will update showing you the MSIL code for the function.
10. Inside the reflexil dialog scroll down and find the two instances of 32256 and change them to 64000, find the 258048 figure and change it to 512000, you change each by selecting the line and right clicking selecting edit, making the change in the change dialog and pressing update.
11. Do the same for the Awake() function for m_nodes and m_segments, m_lanes.
12. When you've made all the changes you want navigate back up the class tree on the left and select the assembly root node, right click, select the Reflexil sub menu and select Save As.., select a name to save the modified dll as, Assembly-CSharp.patched.dll will be fine our example.
13. Now we're basically done, goto your game folder in steam (you know where you copied things from in #3) rename Assembly-CSharp.dll to Assembly-CSharp_Original.dll. Copy your patched version into that folder and remove .patched from your patched dll file name so it's got the original name.
14. Fire up CSL and enjoy your new limits.

Suggestion - Backup your newly patched dll incase you verifty your steam cache or something else happens where your modified version get's overwritten.

Note 1: This example was for road limits, if you want to screw with Zoneable blocks you can do the same as the above only the values are in the ZoneManger class, if you want to change the building limits it's in the BuildingManager class, if you want more then 256 transport lines (really??).... it's in the TransportManager(65k max), if 127 districts are not enough for you (really?) then DistrictManager (256max cause Array8 type). I suggest making all your changes at once instead of loading up your patched dll version over and over and re-saving. If your wondering why I used 64000 and not the real ushort limit of 65536, well first it's cause I don't think I'm going to exceed that amount, and second I noticed in a couple places CO actually limits the player to a number about 512 less than what the type allows so figured keep it roughly the same reserving a small amount for margin of safety.

Note 2: To restore the original, exit the game, rename your dll back to .patched (or just delete it) and rename your *_Original.dll back to the original name.

Note 3: I've avoided using any mods (serious game changing ones) with this unlimited version that I know use modified versions of the aforementioned classes, maybe some work, maybe some don't I just haven't bothered to look into it much for now as I wanted to test pushing the limits with a mostly vanilla game. Though if some do replace the original class wholesale you could always repeat the above on their versions.

Note 4: This may or may not break some other stuff in the game or melt your computer while playing the game ..etc..etc.. do at your own risk etc..etc disclaimer.
But i've yet to see any issues so far in limited testing, but I expect some performance overhead issues if I ever do start getting close to the new limits, particularly for someone who is ram limited or on a slower cpu system.

Think of it this way, the game used to have to keep track of ~32k items in each of the said categories, and it probably looped through those 32k item arrays when doing look-ups or other such updates and checks that happen every second or so (less or more depending). It's now gotta do that with 64k item arrays so in theory it's going to take twice as long (at least), what that effect is going to be long term I don't know, so far I've not noticed a difference, the only difference I have noticed is more memory use (and file size), which of course is going to happen since we're now allowing it to store more data, but again I've only tried things to around the 41k mark.

Note 5: Hey can I edit the CitizenManager the same way to increase the 1048576 citizen pop limit? Yes, you certainly could, same for Unit_Count, I have not though. On that note don't screw with the Instance_Count (number of actively simulated\animated items) it's already at it's 65k type max, unless you want to change it's type to Array32 and any related\associated plumbing and references that were expecting ushort's as well, which is beyond the scope of this little tweaking how-to.
 
Last edited:
  • 10
Reactions:

mike_wu

Recruit
Apr 26, 2015
1
0
Just wanted to add I tested editing the assembly to change both the limitchecker()'s and the constants for NetManager, ZoneManager, and BuildingManager to 64k (and lanes to 512k). Running with the patched assembly without other mods (actually I've have a few minor ones running) I've yet to have any problems, your mileage may vary depending on your system and mod choices. etc.....
.

I just tried this to increase the road limit and am pretty sure I did everything correctly. However when I load up my saved game I am getting the following error "Object referenced not set to an instance of an Object". Are there any other functions I need to edit? Any help would be much appreciated.

Thanks in advance.
 

trufo

Recruit
Apr 26, 2015
1
0
didn't work for me :(

system : win7x64 i7/16gb

first try
modified: buildingManager, netManager, zoneManager
game settings: no mods (xept unlimited money) - new map
message on startup: "EndDeserialize(NetManager) tag mismatch: [System.Exception]"
in game : no roads, rivers or trees. only the road tool is available. In that only 2 lanes is available... But not working. When quiting, game hangs with circling blue bird.

second try
modified: buildingManager, zoneManager
game settings: same as before
message on startup: "Object reference not set to an instance of an object [System.NullReferenceException]"
in game : same as before
 

rhvjay

Recruit
Apr 26, 2015
7
3
I just tried this to increase the road limit and am pretty sure I did everything correctly. However when I load up my saved game I am getting the following error "Object referenced not set to an instance of an Object". Are there any other functions I need to edit? Any help would be much appreciated.


i'm getting the same error, in saved game and new game.
 

butterflug

Recruit
Apr 26, 2015
1
0
Hey
I've tried to increase the limits, too.
The instructions are nicely clear and understandable and seem to work until i've loaded a map.
I'm getting "NullPointerExeptions" and "Value out of Limits-Errors".
May there be a second instance where those values are checked?
Do you know a new "Workaround" for this nasty little detail?
Thanks in advance for any hints
 

Doctor Machete

Colonel
10 Badges
Mar 31, 2015
833
143
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Cities: Skylines - Parklife
  • BATTLETECH: Flashpoint
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Magicka
May there be a second instance where those values are checked?
Do you know a new "Workaround" for this nasty little detail?
Take a look to this other thread:
https://forum.paradoxplaza.com/foru...re-objects-of-this-type.851434/#post-19223279

The main problem here is there are LOTS of checks, so while CO doesn't expand the modding API (which is expected) is not really worth it trying to expand these limits, as is very hard not to mess with saves and other gamebreaking errors.
 

KnightHawkTFC

Lt. General
1 Badges
Mar 5, 2015
1.357
319
  • Cities: Skylines
Do you know a new "Workaround" for this nasty little detail?

Take a look to this other thread:
https://forum.paradoxplaza.com/foru...re-objects-of-this-type.851434/#post-19223279

The main problem here is there are LOTS of checks, so while CO doesn't expand the modding API (which is expected) is not really worth it trying to expand these limits, as is very hard not to mess with saves and other gamebreaking errors.

---


So yah... I messed around with the problem areas related to this over the weekend a lllllot more and the results were less then encouraging.
Let me give you the TLDR version first: After further review, you're not going to be doing this yourself (and have things really work) and it's something best left to CO. I here by retract my prior "hey it's easy and it seems to work without issue" post, more testing has shown otherwise, getting past the limits is one thing, getting things to really work under the hood after that, not so much. Sorry.

Besides just changing (for roads\buildings\zones) a hundred more entries then already mentioned (and I'm not for-sure I really got them all ) you also have to re-write a couple deserialize functions because the existing ones assume the amount of data they should read from the save is whatever the current size of these arrays are, not the size of what's actually stored (wondering why someone thought that was a good idea?). There is some more but to keep it short, it is _doable_, it is a pain in the butt, less so though for CO, though still more than trivial.

So forget about it and just keep requesting CO up the road\zone\building values themselves (at the very least 10k).

Now, I'm actually still working on this a bit for the fun\challenge of it but it's not for public consumption (nor complete) and because I really don't believe this "if we went even slightly bigger your machines would melt". I don't buy it in the specific context of roads,buildings and zoneable blocks and I want to see for myself. If I ever do get it working before the next update I'll post it.
 

Admiral 8Q

Sergeant
10 Badges
Apr 11, 2015
67
23
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
Here is a clipping of the map. the same top again

I swear, I nearly did fall out of my chair laughing when I saw this! o_O
Welcome to Roadopolis!

Cities%202015-04-05%2002-13-17-25.jpg
 

rhvjay

Recruit
Apr 26, 2015
7
3
For those like me who want to re-create a real city (in my case, Barcelona) we really need bigger numbers. i suppose msi i7, 16gb, geoforce 970 and ssd will be enough to avoid melting the laptop XD.

Anyone knows if there's already any official thread requesting CO to modify limits?
 

Azurespecter

Influencer Manager
Paradox Staff
36 Badges
Aug 14, 2013
595
813
twitter.com
  • Crusader Kings II
  • Europa Universalis IV: Rights of Man
  • Stellaris: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • March of the Eagles
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Steel Division: Normandy 44 Deluxe Edition
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines Industries
Anyone knows if there's already any official thread requesting CO to modify limits?

Every suggestion and feedback thread is official! I know CO has been made aware of this popular request, but I haven't heard back anything specific about it. I assume there are good technical reasons for this limit, but we can all hope that these can be overcome =)
 
Status
Not open for further replies.