Despawn Manager
This purpose of this mod is to give the player more direct options to influence or control traffic in the city.
COMPATIBILITY with Cities Skylines
For some cause unknown to me, ever since the Green Cities DLC update, the game locks up on my computer (or even locks up the computer itself). So, I’m still playing the pre-Green Cities DLC version of the game. My point in relating this is to inform the reader that I have not, and cannot, test this mod against the current version of the game.
That said, it should be compatible with the current version of the game. The only problem I can think of in this regard would be if the developers have changed how a key Vehicle.Flags flag is being set — this is the flag that I’m using to manage both the spawning of new Cargo Trains relative to their minimum cargo load thresholds, and the despawning of unloaded Cargo Trains and Cargo Ships. As I see it, the flag is set opposite to what its name (and what meager documentation I could find) implies. Thus, if the developers were to change how the flag is set, this key functionality of the mod would be broken … until someone tells me about it and I can fix the mod’s code.
I’ve been informed that this mod is actually incompatible with TM:PE, at least the current version. Since TM:PE is such a vital mod, I expect that few people will be able to use the ‘Despawn Manager’ mod as it was originally released.
As the ‘Despawn Manager’ mod "patches" some of the game’s base classes (code modules) for some of the VehicleAIs, it is potentially incompatible with other mods which modify the same VehicleAIs.
Foe example, as I was recently testing the "cheats" I added for Garbage Trucks and Hearses, I noticed that they were no longer staying within their defined Districts. So, what was happening is that both the ‘Despawn Manager’ mod and the Districts mod I use wanted to change how the VehicleAIs operate for these two vehicle types, and the ‘Despawn Manager’ mod just happened to "win".
So I have added a feature to the mod that may help mitigate such conflicts with other mods which "patch" the game’s VehicleAIs
1) Modularity: As shown on the first screen-shot, the player may choose the vehicle types for which the ‘Despawn Manager’ mod will "patch" the base VehicleAs. For example, one may choose to use functionality of the ‘Despawn Manager’ mod for only Cargo Trains and Cargo Ships, thus leaving control of other vehicle types to the base game and/or other mods.
2) Vastly reduce the number of 7% filled Cargo Trains which are spawned into the city’s rail network by setting minimum cargo load thresholds, with individual thresholds for:
– import traffic,
– export traffic,
– local traffic
2a) Unfortunately, I cannot add minimum cargo load thresholds functionality for Cargo Ships, as the base game itself doesn’t set the same flags and counters for Cargo Ships as it does for Cargo Trains.
3) Improve the through-put of Cargo Trains and Cargo Ships by optionally forcing them to despawn as soon as they deliver their cargos. This has the added benefit that you can always tell exactly where a given cargo originated;
4) Provide more granular control over whether vehicles automatically despawn during road traffic congestion;
5) Optionally eliminate most dummy traffic (there are two cases that are not covered);
6) As a bonus "cheat" … optionally force delivery trucks (of the pre-Industries DLC sort), garbage trucks, and hearses to despawn once they have completed their task and are returning to their source building.
USING the ‘Despawn Manager’ Features
As with any mod, the ‘Despawn Manager’ mod must first be enabled in the Content Manager.
After enabling the mod, go to its Options panel to choose which of its individual VehicleAI patching "modules" to employ.
When a VehicleAI patching "module" is activated (or deactivated), other functionality options for that vehicle type are enabled (or disabled).
The options you select persist; for Windows, the selected options are saved to a file at "C:Users[user-folder]AppDataLocalColossal OrderCities_SkylinesModConfigDespawnManager.xml"
Aditionally, most functionality options may be activated or deactivated in-game from the Options panel, with the activation or deactivation having immediate effect.
Selecting to have the ‘Despawn Manager’ mod "patch" a VehicleAI not currently selected takes effect upon reloading a saved game; that is, it doesn’t require going back to the Main Menu or the Desktop to enable the ‘Despawn Manager’ mod to "patch" a given VehicleAI.
Assuming that the mod is compatible with your DLCs and other mods, it will be safely usable with existing saves. It doesn’t write any data to the save, so it may be enabled or disabled at any time.
COMPATIBILITY WITH TM:PE
I play Cities:Skylines using Traffic Manager:President Edition, and I always have its "Disable (Congestion) Despawning" option set to ‘disabled’.
In my testing of the ‘Despawn Manager’ mod, I saw no conflict with TM:PE. TM:PE’s "Disable (Congestion) Despawning" option applies globally to congested road traffic, whereas the granular options of the ‘Despawn Manager’ allow for *exceptions* to TM:PE’s global option.
Edit:
As I said earlier, I have to play an *old* version of the game, and consequently I use an old version of TM:PE. So, perhaps that’s why I didn’t see any conflicts between the two mods.
Sadly, the two cases of dummy traffic which the ‘Despawn Manager’ mod cannot eliminare are:
1) Passenger Car dummy traffic. The DummyTraffic flag is not set for passenger cars, so I cannot distinguish dummy traffic cars from non-dummy traffic cars.
2) Passenger Trains leaving the station with 0 passengers. To force such trains to despawn, the mod must be able to:
– determine the number of passengers on the train as it is leaving the station;
– distinguish intercity passenger trains from those belonging to intracity public transit routes.
As I don’t know how to make these two determinations, I cannot code the mod to despawn the correct empty trains.
HEARTBREAKINGLY
Even more sadly, I cannot add minimum cargo load thresholds functionality for Cargo Ships, as the base game itself doesn’t set the same flags and counters for Cargo Ships as it does for Cargo Trains.