Cities: Skylines

Cities: Skylines

676 ratings
More PathUnits 1.1.2
3
4
4
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
153.925 KB
6 Jan, 2022 @ 5:58pm
20 Sep, 2023 @ 5:19pm
9 Change Notes ( view )

Subscribe to download
More PathUnits 1.1.2

Description


Doubles the number of PathUnits (used for vehicle and citizen instance pathfinding) available in the game (from 262,144 to 524,288).

Just enable and start a new game, lor load an existing one - no other steps are needed.

IMPORTANT NOTE

It's like using any other limit increasing mod (More Vehicles, More CitizenUnits, etc.) - saves made with this mod active WILL NOT BE RELOADABLE WITHOUT IT.

THIS IS NOT SOMETHING THAT CAN BE UNDONE. FUNDAMENTALLY. Once you've got a quart, there's just no way of fitting it back into a pint pot.

Remember: backups are your friend!

IMPORTANT: AFTER FIRST ENABLING THIS MOD, RESTART THE GAME BEFORE LOADING ANY SAVES/STARTING A NEW CITY
Otherwise you'll probably get 'Array index out of bounds' errors if you use TM:PE (which you almost certainly are).

Mod compatibility



There are currently no known incompatible mods. Note - this does not mean that they don't exist, just that if they do, they haven't been discovered yet!

Specifially compatible with TM:PE.

What are PathUnits?
PathUnits are the game's internal data structure for performing pathfinding (getting from A to B). Getting a single vehicle (or citizen) from its origin to its destination will require a number of PathUnits (depending on the length of the required route).

What happens when the game reaches the PathUnit limit?
Unfortunately, unlike some of the other limits, the game doesn't notify you when you've reached the PathUnit limit. A lack of PathUnits means that the game can't direct vehicles or citizens to their destinations; public transport stops working, city services (including fire engines!) can't spawn properly, and cargo deliveries stop happening. By the time you've noticed you've probably got multiple abandoned buildings.

Stuck cims and vehicles
Sometimes in the game, cims and vehicles can stometimes become 'stuck', and start spamming pathfinding requests, which uses up a lot of PathUnits.

TM:PE includes a function (under the 'Maintenance' settings) to reset stuck cims and vehicles; if you're seeing very high PathUnit usage, doing this is worth a try.

Performance impact
Care has been taken to minimise performance impact; there should be no noticeable performance impact from the mod itself. Naturally, if there are more PathUnits in operation, there may be more pathfinding activity going on, which will have it's own performance impact - but that's not the mod, it's just the game doing more work now that it can.

It's a bit like the Realistic Population 2 mod - there's no performance impact from the mod itself, but if the mod is giving you a bigger city with more citizens, then naturally things will run a little slower than before....

Modders
Please don't assume fixed array sizes in your mods; for PathUnits, don't use hardocded array sizes (including using PathManager.MAX_PATHUNIT_COUNT). Instead, check array sizes at runtime with Singleton<PathManager>.instance.m_paths.m_size. This is especially important when copy-pasting decompiled game code.



Meta
As above - permanently changes the savefile. Saves made with this mod will not be readable without it.

This mod uses Harmony[github.com] version 2.2 by Andreas Pardeike via the Cities Harmony mod by boformer.


Source code
[github.com].


Translations
[crowdin.com].
Please leave a message below if you'd like me to add another language on CrowdIn.


[ko-fi.com]
446 Comments
RelWIN 27 May @ 5:44pm 
@algernon
Need More and More PathUnits #262,144*3 or #262,144*5
algernon  [author] 12 Mar @ 2:50pm 
@Dimensional One There is no simple "canned answer" to that. It depends. Really, it depends on so many different factors and is unique to each city, to different stages of growth for each city, and even at different times even if the city remains completely unchanged. So no, I can't even hazard a rough estimate of a vague approximation.

However, running out of path units would in no way be confused with the symptoms of not having enough RAM or not a fast enough (how fast is 'fast enough' anyway?) CPU.
Dimensional One 12 Mar @ 12:45pm 
I've always been curious about a couple things... If the path unit #262,144, isn't a 1 to 1 ratio for citizens and vehicles, just how much overhead would that require... ballpark figure.

In a city with say 50,000 citizens would that mean you're already using 2x/3x? path units for those and whatever vehicles/dummy traffic exist.
Even at only 3x that would mean you're hitting the 150,000 range it sounds like, possibly.

AND does using traffic managers lane connectors, road arrows or the games vanilla turning lanes option effect any of this?

What roughly would be the number of path units being used for a city of about 50,000 citizens?

Knowing that would let people know if this mod was worth trying or it was simply an issue of not having enough ram or fast enough cpu, instead of it being a shortage of path units in the game for us.
stevejacksonphotography 10 Mar @ 4:03pm 
Thanks for the response. After looking at the stats manager I found i had maxed out the vehicles, not the paths. Your mod is registered by the game and the 500,000+ limit is in place. So I read more of this thread and found there is a more vehicles mod.... I subscribed to this and it has solved my problem. I hope to speak to you again in a few months when either I have ran out of paths or my PC has melted. Cheers :)
algernon  [author] 4 Mar @ 1:55pm 
@stevejacksonphotography If you've maxxed out already, then there's something fundamentally wrong that adding a higher limit won't fix, as it'll just be quickly filled by whatever is causing your limit to max out already. So for your purposes, no; your best option is to work out where your game is breaking and resolve that underlying issue.
stevejacksonphotography 4 Mar @ 6:40am 
Is there anyway to increase the paths further? I've maxed out this mod and need more. I've spent 3 months crafting a city and would like to make it bigger. Thanks
hanwhdqja 19 Feb @ 1:17am 
Hello! I really appreciate your More Path Units and More Citizen Units mods.
Would it be possible to create a mod that increases all object limits in Cities: Skylines,
including Net Nodes, Segments, Vehicles, Buildings, and Props?

If possible, it would be great to have a customizable slider to adjust limits manually.
Many players would find this helpful for large-scale city building.
Thank you for your amazing work:steamthumbsup:
garlik 22 Jan @ 9:48pm 
@algernon Perfect, in that case I’ll keep investigating:) Thank you for the prompt response!
algernon  [author] 22 Jan @ 4:18pm 
@garlik This mod doesn't do anything than change the PathUnit capacity, and I've just tested and confirmed that it has no effect on police cars, crime, healthcare, or fire hazard.

If you are experiencing issues, then statistically the most likely culprit is a conflicting mod, most likely one that doesn't recognize the expanded PathUnit buffer.
garlik 22 Jan @ 10:24am 
Ok, so this is kinda strange, but somehow this Mod seems to have broken the game mechanics. After downloading and installing the Mod, I noticed a sudden uptick in crime wave (from 1% to 30%). I did some digging and found that police cars either don’t clear crimes, or when a crime is cleared, it immediately resurfaces. Then, I verified that healthcare and fire hazard had also been affected.

Iwent back to the original file, and disabled the Paths Mod, and the game returned back to normal, without any glitches. I am not sure what caused this issue or how to fix it—I’m not an IT-able guy—but for now I had to give up on my current city until I, or rather some other mastermind, figures it out :)