CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
575 stars 85 forks source link

Service reserve? #315

Open originalfoo opened 5 years ago

originalfoo commented 5 years ago

I suspect this is out of scope, but raising issue just in case.

When game hits vehicle limit, it can have big impact on services, which causes side-effects such as increased crime, health issues, slower fire response, etc.

There is a CSL Service Reserve mod that essentially 'pre-books' some vehicle slots to keep them free for use in late game. However it's not compatible with TM:PE.

The concept is also somewhat flawed - even if vehicle slots are reserved, as soon as a disaster occurs those will quickly get used up and nothing much changes.

Some discussion from Steam:

Dying:

Is there a chance to include a customable reserve for service vehicle spawning in VehicleManager's CreateVehicle() function? By hitting vehicle maximum, only already spawned police service vehicles will react, which may causes long way travel through the whole map, even if there is a police station in close range. Same may happen to other emergency vehicles as well during their ride back to base.

aubergine18:

Dying: It's something we can consider, but I can already perceive several problems with the approach.

For example, let's say we reserve 10 vehicles, what happens when those 10 vehicles are active but then more crimes (or other emergencies) occur?

We could potentially add the vehicle count of each service building to the reserve, ensuring services can run at full capacity, but that would take a potentially big chunk out of the main vehicle limit potentially affecting industry and public transport.

Would it be better to reduce the rate at which emergencies occur instead? So if the vehicle limit is reached, emergencies could be prevented until there is some room for more vehicles to spawn?

What do you think?

Dying:

I understand your points. I would not reduce emergencies rate, because it makes a city alive. Furthermore if ND DLC is installed and in use, it still would cause a lot of emergency requests. What about a priority, that in your mentioned case it won't use capacity of public transport, commercial and industries, but civil spawn only?

One single request may take less than 25 seconds, if a close vehicle or station will be used. We all won't miss a civil car coming from outside. In case of a disaster (lot of emergency calls), it is absolutely realistic, that you won't see much traffic coming from outside.

Talking about police, there is also the patrol spawing, which is infected by hitting maximum. E.g. Airport Police or Campus Police are boring to death. Rarely patrols within district and most emergency calls will be solved by any other law enforcement department (sometimes far out of their restrictions). These patrols are also important for some buildings (e.g. Industries DLC main buildings are checking pass by police patrol car, if not it would show "crime rate to high").

I am using Service Vehicles Manager 2.0 with it's customable district service, which works well with TMPE, until I hit vehicle maximum. Some coming from game itself, like the "death wave" 6 years after build up of houses causes a lot of hearses request once.

RenaKunisaki commented 5 years ago

Maybe a priority system? If an emergency/service vehicle needs to spawn, it can despawn a private vehicle to free up a slot.

Dying1 commented 5 years ago

I hope it is okay to join here and let you know some current issues in game at vehicle maximum wit active TM:PE(LABS) and Service Vehicles Manager 2.0 and Transport Lines Manager (TLM) (both by Klyde45). My current map has a polulation of 180K and uses 17 titles so far. There is also custom industries (IND DLC) in use, which causes a lot of spawing, but decreased a bit by increasing vehicle capacity. Furthermore SVM2.0 general setting is district response only for all servies (if possible):

Firefighters: Seems to work fine mostly. Game tries to use station next to fire. If the full station is busy, it uses another one. Each fire cause a spawn of minor one vehicle (I saw sometimes 2 trucks or 1 heli and 1 truck). Havn't seen that a truck returning to base was used for a fire nearby instead of a new spawn. If it is possible, this would reduce spawing requests.

Medical: Same as firefighters. Returning vehicles do have (mostly) no capacity left for another emergency call and would not be realistic, so this point do not need to be touched. However the return to station (hospital etc.) with sick Cim is without sirens and emergency lights anytime and speed limit is as for any other vehicle (road limit). Íf it is possible to have a random chance for active settings like the way to emergency call, it would be more realistic and would decrease the active time of this vehicle.

Police: Games uses vehicles of patrol (spawned already) first, before a new vehicle will be spawned + the vehicle will receive another task very often at the moment of arrival. You can see it that emergency lights and sirens won't stop and vehicle will drive dricrely to another request. There is also the possiblity of a donut breaktime, returning to base or continue the patrol (maybe based on shift time status) . If I understand the vanilla setting value for capacity of police cars correctly (20.000), it may response to 20K calls until end of shift. The big issue of it is, that the distance of patrol vehicle to emergency call is not checked. Therefore several cars move through the whole map, some stations are real busy and some may "sleep", even if there is a emergency next. I also see some police vehicles despawing after arrival at emergency place. This seems to be for areas without possiblity to reach the place of another current emergency request (if the vehicle is on islands or without any road connection to the new emergency side).

Prison bus: Seems to have the lowest priority. The value of active vehicles changes extremely in case of need of another service vehicle or even other things (e.g. industries/commercial...). This forces despawn of prison buses and inmates are moving by feet to the prison (direct way over land and sea).

Road Maintenance: Seems to use 100% of available vehicles anytime all over the map

Park Maintenance: Same as Road Maintenance.

Post/Mail: Same as Road Maintenance all over the map.

Taxi: Same as Road Maintenance next to response for any request through the whole map until end of shift. Never saw a taxi waiting at stand, but pick up of tourists (only?) there.

Hearse: This varies a lot. I had one custom depot with max. of 40 cars, which sometimes used by 100%. Without this exception, it seems that only corpse pick up requests force a spawn and try to use the nearest station (as long as this one is not 100% busy).

Garbage: Service though the whole map, but whyever not 100% use.

VictorPhilipp commented 5 years ago

fyi TMPE currently reserves the last 5 slots to non-private cars. https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/14687d6394e2b6a9f9db6bef3d91d19b0ebdbc01/TLM/TLM/Custom/Manager/CustomVehicleManager.cs#L34

originalfoo commented 4 years ago

Would be good if we could scale the service reserve based on city size. 5 vehicles is fine for small city, but ineffective for large city.

Langbakk 4 hours ago
Please integrate the function from CSL Service reserve into this mod or make TM compatible with CSL Service Resereve. TM seems to be killing of any city above 250k pop by not allowing you to reserve vehicles for public services

Also, the VehicleManager.MAX_VEHICLE_COUNT - Reserve calculation should be performed once per tick (or once per RL minute or something?), not once per vehicle creation (I assume the jitter handles that already as current calculation is based on two constants, but if we make it scale based on pop we'll have to change where the calculation is performed).

rmjohnson144 commented 3 years ago

It there a way to manually select a reserve service vehicle count like in the CSL Service Reserve Mod? This is very useful in emergency times, especially in a max vehicle limit has been reached, so we can clean up the mess without total citywide abandonment to occur.

It may not help much in disasters, but plain overloaded vehicle limits, it is very handy, so you can recover quickly before meltdown.