Cities: Skylines

Cities: Skylines

Loading Screen Mod [Test]
Brot 1. sep. 2019 kl. 3:41
Suggestion: Do not load any agents from the savegame - to help with citizen-related errors etc.
Just a quick suggestion that I feel rather fits with this mod's latest awesomeness, i.e. tackling simulation errors...

I think it's a rather common problem that with a savegame that you've played extensively, at some point you'll be getting errors like "Citizen not found!" and the like cluttering your log, even though the error is not critical and the game keeps running. I am wondering if these errors (and many other things, such as phantom citizen units and whatnot) could not perhaps be resolved by simply not loading any of the agent-related data from the savegame. Essentially, you'd be loading a city that consists of just terrain, networks, and buildings, but would not have any inhabitants or vehicles in them. Once the save is loaded, the game should then start to re-populate your city from afresh if I'm not wrong.

I've tried fiddling with some quickly thrown together Harmony patches myself, but the loading routines used in this game are rather too complex for me grasp. Therefore I'm asking the grand master of it all, thale5, do you think something like this could be done, or that it would even be useful?

Many thanks, and keep up the great work!
Sidst redigeret af Brot; 1. sep. 2019 kl. 3:42
< >
Viser 1-15 af 16 kommentarer
thale5  [udvikler] 1. sep. 2019 kl. 13:01 
That is an interesting idea. The city should get things going again but who knows what actually happens. I think I'll test this.

There may be some mods out there that cannot tolerate an empty city.

Concerning citizens, we could free just the agents (cap 64K) or also all citizens (cap 1M). Freeing all would be drastic - there would be Abandonment but that can be handled. Maybe other issues too. Needs testing.
Brot 2. sep. 2019 kl. 3:33 
Thanks for taking the time thale5, my thoughts exactly. I just lack the technical skills to make it work. But it would be interesting to see what the game does with an "empty" simulation. That said, happy testing! Please let me know if I can be of any help. Thanks a lot!
thale5  [udvikler] 2. sep. 2019 kl. 13:12 
I tested freeing just the agents. My city became a ghost town that started to repopulate quickly, in minutes. First locals, then tourists. No apparent problems. No abandonment either.
Brot 3. sep. 2019 kl. 2:11 
This sounds very promising! I wonder if in this way, errors like the following might be remedied:
Citizen not found! at System.Environment.get_StackTrace() at Building.RemoveTargetCitizen(UInt16 instanceID, CitizenInstance ByRef data) at TouristAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetIndex, Boolean targetIsNode) at CitizenAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetBuilding) at TrafficManager.Custom.AI.CustomHumanAI.CustomArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success) at TrafficManager.Custom.AI.CustomHumanAI.CustomSimulationStep(UInt16 instanceID, CitizenInstance ByRef instanceData, Vector3 physicsLodRefPos) at CitizenManager.SimulationStepImpl(Int32 subStep) at SimulationManagerBase`2.SimulationStep(Int32 subStep) at CitizenManager.ISimulationManager.SimulationStep(Int32 subStep) at SimulationManager.SimulationStep() at SimulationManager.SimulationThread() [Core]

I've been seeing this for months now but was never able to track it down to any particular mod. The detours by TMPE seen in the stack are not the reason why. I'm guessing that to tackle this you might need to free up all citizens, not just agents. What do you think?
Cheers!
thale5  [udvikler] 4. sep. 2019 kl. 12:21 
Thanks for the stack trace! Freeing the agents (and references to them) should be all it takes to fix that. What happens there, an agent arrives at its destination, a building, but the building knows nothing about the agent although it should. The simulation thread handles it well but obviously the game has inconsistent data structures there.
leftbehind 4. sep. 2019 kl. 13:06 
TM:PE has a number of despawn tools (clear traffic, clear stuck vehicles/cims, etc.) that you could take a look at and use if you want.

On many occasions we have managed to revive saves by clearing vehicles/cims (recent example) and the game just repopulates automatically after that.

The only side effect is a death wave due to large influx of new residents in short time (but I hear next version of C:SL slightly diversifies the new residents which in turn makes death waves less problematic).

EDIT: because cims/vehicles can despawn any time for numerous reasons, every mod already has to deal with sudden disappearance of them (eg. see TM:PE, Real Time, IPT2, etc) so it shouldn't cause problems with mods either.

On a similar note, transport lines can also become broken, so maybe also an additional option to not load transport lines could be added? From vague memory, if a transport line is removed but still has vehicles, the vehicles will become confused and quickly despawn. Maybe the option would be dependent on also not loading vehicles/cims just in case?
Sidst redigeret af leftbehind; 4. sep. 2019 kl. 13:09
Brot 5. sep. 2019 kl. 6:57 
aubergine18, yeah I already know about these tools, but thanks. Unfortunately, they won't do the trick. But it sounds like thale5 is getting somewhere with this, which is great!
leftbehind 5. sep. 2019 kl. 8:19 
Yup, being able to clear that stuff in loading process will be much more effective, especially if it can be done before most mods initialise. This could be a powerful tool in getting rid of "Array index out of Range" errors which are often painful to track down and resolve.
thale5  [udvikler] 8. sep. 2019 kl. 9:25 
Options to remove vehicle and/or citizen agents are now available.
If something of interest appears in your output log, please let me know.
thale5  [udvikler] 8. sep. 2019 kl. 9:27 
An option to remove transport lines is a good idea. 'Remove all citizens', too. But I need to do some testing with them first.
Sidst redigeret af thale5; 8. sep. 2019 kl. 9:30
Brot 8. sep. 2019 kl. 10:22 
Great stuff, thale5, thanks so much for this! It works like a charm. Not as far as that particular error I posted earlier is concerned, however. I still get that one with both citizen and vehicle agents removed, no idea why. Any guesses?
While I'm at it, I don't know if freeing up all citizens and citizen units would be a great deal more work, but if you can do it, it might just serve to remedy another common problem: If you adjust RICO settings of a residential building, e.g. by giving it fewer households than it previously had, this won't get updated by itself once you're in game. Instead you have to replop all affected buildings. I'm guessing that if we zeroed out actual citizens as well, this should make the ResidentialAI "re-fill" all buildings, right? Might be worth looking into.
Again, many thanks for your outstanding work.
leftbehind 9. sep. 2019 kl. 10:22 
FANTASTIC WORK!!!!! <3 <3 <3
thale5  [udvikler] 9. sep. 2019 kl. 11:04 
@Brot It's that same stack trace that is repeated in your log every now and then? Thinking it over, that makes sense. We know that:

- the error is produced when a tourist agent reaches its destination, some building
- citizen agents are relatively short-lived - one journey, then freed
- you got (and still get) the error over and over again, so it is produced for new agents, too
- my conclusion: there must be some persistent property in your game that causes the error.

That persistent property could be a mod or something in the city structure/topology. But I don't know.

Yes, I am interested in adding an option for 'all citizens'. Provided it does not bring unforeseen problems. Probably helps with the RICO issue.
leftbehind 9. sep. 2019 kl. 11:22 
Brot share your output_log.txt and I'll see if it's anything I recognise (I get loads of logs like that with people asking if it's bug in TM:PE so it might be something I've seen before and know how to fix).
Brot 11. sep. 2019 kl. 2:32 
@aubergine18 thanks a lot, I appreciate this. Here's just the gist of my massive output_log (I looked through it, trust me there's nothing else of note there):

Enabled Plugins: # Unlimited Oil And Ore # Unlock All # Prop Unlimiter # One-Way Train Tracks # Adjustable Business Consumption # District RCI # Network Tiling # Tree LOD Fix # Tree Movement Control # Garbage Bin Controller # Ticket Price Customizer # Advanced Stop Selection # Topographic Lines Toggle # Prop it Up! 1.4.4 # Ploppable Asphalt # Theme Decals # Camera Positions Utility # Prop Scaling # Stop Hider # Transparency LOD Fix + Cloud Assets Enabler # Find It! 1.5.4 # Theme Mixer # Sharp Textures # Decal Hover Area # Fine Road Anarchy 1.3.5 # No Deathcare # Less Steam # Improved Content Manager # Pollution Solution # Decal Prop Fix # Prop Snapping # Prop Precision 1.0.1 # Transport Line Rendering Fix # Ship Path Anarchy # Tram Station Track # No Radioactive Desert And More! # Fine Road Tool 1.3.7 # First Person Camera # Quay Anarchy # Elevated Stops Enabler # No Questions Asked # Environment Changer # TotalyFree Camera # Prop & Tree Anarchy # Sub-Buildings Enabler # No Fires # Network Skins # Phantom Lane Remover # Real London Sound Pack # CSL Show More Limits # Daylight Classic # Unlock Train Tracks and Metro Tunnels # Extra Train Station Tracks # More Network Stuff # Ambient Sounds Tuner # The Metropolitan Sound Pack # Extra Landscaping Tools # UnlimitedOutsideConnections # ToggleableWhiteness # Unlimited Trees Mod # Precision Engineering # Employement Details Extension # Building Eyedropper Tool # Cash on Demand # Pause on load # Chirpy Exterminator # Prefab Hook # Spawn Points Fix # Enhanced Mouse Light # Building Themes # Demand Master # Sort Mod Settings # Remove Need For Power Lines # Remove Need For Pipes # Ultimate Eyecandy 1.5.2 # ShadowStrengthAdjuster # Procedural Objects 1.5.5 # PropRotating Params # AnimUV Params # Industries Vehicle Converter # Grid be Gone # WG Citizen Lifecycle Rebalance v2.6 # NotSoUniqueBuildings # WG Realistic Population v8.4.0 # Customize It! # No Problem Notifications # Plant Scaling # Building Anarchy # Additive Shader # Relight # More Shortcuts 1.1.0 # Painter # Redcomet's Municipal Sound Pack # Other Rail Track Speed Increaser 1.1.0 # Tiny Segments 2.0 # Remove Road Props # Flood Damage Control # Land Ships # Hide Selectors # Sub-Buildings Tabs # Employ Overeducated Workers V2 # Metro Overhaul # Cargo Hold Fix # Custom Animation Loader (CAL) # Remove All Animals # AutoLineColor Redux # Mesh Info 1.3.3 # Parkify r1.0.3 # Ship Line Tool 1.1.0 # Traffic Report Tool 2.0 # Elektrix's Road Tools # Net Picker # TM:PE 10.20 # Ultimate Level Of Detail # Toggle Traffic Lights # Cubemap Replacer # HDRI Haven Cubemap Pack 2 # Move It 2.5.0 # Hide It! # 81 Tiles (Fixed for C:S 1.2+) # Plop The Growables # Service Vehicle Selector 2 (r4.0.2) # Train Converter # Broken Node Detector 0.3 # Road Removal Tool # Stops and Stations # Surface Painter # Resize It! # Railway Replacer # Prop Line Tool # Unlock All + Wonders & Landmarks # Forest Brush # Loading Screen Mod [Test] # Improved Public Transport 2 [r4.4.0] # No Seagulls # ModTools
I marked the ones that I'd most strongly suspect. Remove All Animals in particular had something about this same "Citizen not found" error posted in its comments at some point, but looking through the mod's code I honestly can't see how anything in there would produce this, plus it's supposedly fixed now.


The errors I'm getting are now one of these two flavours (will update if I spot another variant):
Citizen not found! at System.Environment.get_StackTrace() at Building.RemoveTargetCitizen(UInt16 instanceID, CitizenInstance ByRef data) at TouristAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetIndex, Boolean targetIsNode) at CitizenAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetBuilding) at TrafficManager.Custom.AI.CustomHumanAI.CustomArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success) at TrafficManager.Custom.AI.CustomHumanAI.CustomSimulationStep(UInt16 instanceID, CitizenInstance ByRef instanceData, Vector3 physicsLodRefPos) at CitizenManager.SimulationStepImpl(Int32 subStep) at SimulationManagerBase`2.SimulationStep(Int32 subStep) at CitizenManager.ISimulationManager.SimulationStep(Int32 subStep) at SimulationManager.SimulationStep() at SimulationManager.SimulationThread() [Core] Citizen not found! at System.Environment.get_StackTrace() at Building.RemoveTargetCitizen(UInt16 instanceID, CitizenInstance ByRef data) at TouristAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetIndex, Boolean targetIsNode) at CitizenAI.SetTarget(UInt16 instanceID, CitizenInstance ByRef data, UInt16 targetBuilding) at TrafficManager.Custom.AI.CustomHumanAI.CustomArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success) at TouristAI.ArriveAtDestination(UInt16 instanceID, CitizenInstance ByRef citizenData, Boolean success) at HumanAI.PathfindFailure(UInt16 instanceID, CitizenInstance ByRef data) at TrafficManager.Custom.AI.CustomHumanAI.CustomSimulationStep(UInt16 instanceID, CitizenInstance ByRef instanceData, Vector3 physicsLodRefPos) at CitizenManager.SimulationStepImpl(Int32 subStep) at SimulationManagerBase`2.SimulationStep(Int32 subStep) at CitizenManager.ISimulationManager.SimulationStep(Int32 subStep) at SimulationManager.SimulationStep() at SimulationManager.SimulationThread() [Core]


Thanks for looking into this! Hope I'll be able to pay you and the rest of this wonderful community back at some point, real life permitting, as I have a nice little mod in the works, too. :)
Sidst redigeret af Brot; 11. sep. 2019 kl. 2:33
< >
Viser 1-15 af 16 kommentarer
Per side: 1530 50