Cities: Skylines

Cities: Skylines

605 ratings
More CitizenUnits 1.1.4
3
2
2
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
190.797 KB
14 Nov, 2021 @ 12:32am
9 Nov @ 3:18pm
19 Change Notes ( view )

Subscribe to download
More CitizenUnits 1.1.4

Description


Doubles the number of CitizenUnits (NOT CITIZENS) available in the game (from 524,288 to 1,048,576). Just enable and start a new game, lor load an existing one - no other steps are needed.

IMPORTANT NOTE
It's like using the More Vehicles mod - saves made with this mod active WILL NOT BE RELOADABLE WITHOUT IT. Please use a copy (or throwaway city) for testing before committing to use this on a 'keeper' city (and even then, keep a backup from before you started using this mod, just in case).

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.

New in 1.1
  • Add option to retain original vanilla CitizenUnit limit (for access to the mod's cleanup functions without having to commit to the expanded limit)

The mod also (by default) checks for any invalid CitizenUnits when loading a save, and fixes any that are found; some saves can accumulate significant numbers of these invalid units, all of which count towards the limit without actually doing anything useful. This check can be disabled in the mod's options panel.

Specifically-compatible mods
  • Any mod that doesn't touch CitizenUnits will work fine with this mod - this includes the VAST MAJORITY of all mods, specifically including all the 'big names' such as 81 Tiles, Find It, Move It, visual/effects and graphics mods, etc.
  • All of my mods (specifically including Ploppable RICO Revisited, Lifecycle Rebalance Revisited, Realistic Population (Revisited/2), but all others as well) are compatible with this mod.
  • Any mod that does touch CitizenUnits will still be compatible if it at least checks the buffer size at runtime instead of using hardcoded size assumption; this is the case with most modern mods that deal with CitizenUnits.
  • The latest version of the Real Time mod has been updated to be compatible with this mod.
  • Includes a compatibility patch for TM:PE 11.5 (TM:PE 11.6 is fully compatible with this mod without the need for a patch).



Some older and unmaintained (or outright broken anyway) mods that try to work with CitizenUnits directly won't be compatible with this mod, such as the older Realistic Population and Consumption mod and Citizen Lifecycle Rebalance mods (which are out-of-date anyway, have long been deprecated, and are now hidden on the workshop). The older 'Nursing Home' mods (also abandoned) are also incompatible. There won't be a 'fix' for these mods, as (obviously) they should no longer be used anyway.

What are CitizenUnits?
CitizenUnits (not to be confused with Citizens) are the game's internal data structure for 'assigning' citizens to buildings, vehicles, etc. A CitizenUnit is required for each household, and for every five available jobs at a workplace, for every five available customer slots at a commercial building, and for every five visitor places for an entertainment (e.g. park/unique building/park area/stadium/etc.), for every five student places at a school/college/university/library/etc., for every five patients at a clinic/hospital/gym/etc.), for every five spaces in a public transport vehicle, etc.....

These CitizenUnits are assigned whether or not those places are occupied; e.g. even if there's no-one actually visiting that park or attending that school or travelling on that bus, the CitizenUnits still have to be created and ready to receive citizens.

You can see from that that the number of CitizenUnits in the game can easily outpace your actual population, sometimes by many multiples - but the game has a hardcoded limit of 524,287 CitzenUnits. Once this limit is reached, then it just can't allocate any more. It's just a fundamental game limit, like the node limit or segment limit or building limit or path limit or zone block limit or vehicle limit or CitizenInstance limit etc.

What happens when the game reaches the CitizenUnit limit?
Unfortunately, unlike some of the other limits, the game doesn't notify you when you've reached the CitizenUnit limit; it just carries on, quietly failing in the background. Usually the first symptom that people notice is residential buildings with 0/0 households. Other symptoms include workplaces with fewer jobs available than they should have, commercial and/or entertainment buildings with no visitors, public transport vehicles that can't carry passengers, educational buildings that can't take students, just to name a few.

Performance impact
Care has been taken to minimise performance impact. There is some impact, as the game now has to iterate through twice as many CitizenUnits as before. On activation of the mod (without using any of the additional CitizenUnits) drops seen in testing have only been 1-3%, increasing slightly as the new CitizenUnits are occupied (but still typically less than 5%). This will depend on the specifics of both your city and your computer, and as always, YMMV.

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

Problems?
This has been tested extensively and no issues have been found - so far (other than the mod partial compatibilities noted above).

If you do encounter an issue, please post it in the discussion below with a link to your output log. Please don't try to copy-paste your error message into the discussion; it's not useful. Remember, an OUTPUT LOG IS REQUIRED TO PROPERLY IDENTIFY AND DIAGNOSE ISSUES.

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.0 by Andreas Pardeike via the Cities Harmony mod by boformer.

Special thanks to dymanoid, whose More Vehicles mod inspired this one.


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]
Popular Discussions View All (1)
0
8 Feb, 2023 @ 10:23am
Airline Headquarters Building Using Over 700,000 Citizen Units
dboi88
576 Comments
algernon  [author] 8 Dec @ 1:58pm 
@Wakamiya Eve No. That has already been attempted and failed. This is a very old game and there are limits to what mods can reasonably do.
Wakamiya Eve 8 Dec @ 7:30am 
Will it be possible to add the citizen instances?
algernon  [author] 5 Dec @ 2:58pm 
@SimplyFenske Glad to hear it!
SimplyFenske 5 Dec @ 12:52pm 
@algernon I'm back. A long several days after unsubscribing from heavy assets and messing with my mods (specifically had issues with watch it and watch it alternatives causing it to crash) and finally got around to successfully utilizing the cleanup feature. It took my Citizen Units from 901k to 250k. I'm thrilled. I have a whole new outlook on life now.
1445769064 5 Dec @ 6:13am 
thank you
:steamthumbsup:
algernon  [author] 30 Nov @ 1:54pm 
@SimplyFenske That would be another problem causing the failure to load - maybe the issue is savefile corruption?
SimplyFenske 30 Nov @ 1:23pm 
Deleted theme parks in a separate save and went from 899k to 706k. I'm trying to run the cleanup but now it's failing to load so I'm trying to figure out if there's another problem causing the failure to load or if it could be the cleanup is giving it one too many processes?
algernon  [author] 23 Nov @ 8:33pm 
@SimplyFenske They *might* help a little on the edges, but 900K with a population of 160K indicates a much larger issue somewhere. I assume you've tried the cleanup functions in this mod?

It might be worth (on a copy of your save, of course!) demolishing the theme parks to see if your idea is correct.
SimplyFenske 23 Nov @ 8:16pm 
First off, a general question. I've been using this mod and it's working great. I've appreciated most everything @algernon has made (it's saved my experience of this game time and time again). So my city I've been working on for a few years has a citizen unit of just under 900k with a pop of around 160k. I have three really cool but massive theme parks in my city which I think could be a culprit and I've been trying to thin out the number of park assets in them. without killing the feel, I've also used Ploppable RICO 2 recently to try to manually lower building residential and worker populations. Can you tell me if these are at all things that could be helpful (specifically the latter)? fortunately I'm almost done with this city, but I want to make sure I finish everything I want to get done before I max out game limits.
algernon  [author] 9 Nov @ 7:00pm 
@foamyesque Glad to hear it :) Was a bit of effort, but got there in the end. Thanks for the report!