PC Passengers Parameters In Engine.in

Discussion in 'TSW General Discussion' started by Winzarten, May 16, 2023.

  1. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    461
    Likes Received:
    909
    After another ‘ghost train’ run, trough ghost stations, I had enough, and I’ve spent the last day investigating various passenger related parameters in the engine.ini to see if the experience can be improved. This is more of an overview of what I have found, with some recommendation on what those values can be set to improve the experience.

    Before the summary I have to say - big thanks to Foobian and his TSW: God Mod (https://www.trainsimcommunity.com/mods/c3-train-sim-world/c75-utilities/i2703-tsw-god-mode-alpha-025), it would not be possible to do this without the ability to change all parameters in game, without having to restart the game.

    So, this is what I’ve found:

    Spawning distance:

    Passengers can exist only within the player’s bubble. So even if you set these parameters to insane values, they will only spawn and exist in the world that is loaded. Once station is unloaded, all passengers are unloaded also. This looks to be around 3km, and it doesn’t look to be affected by parameters like r.ViewDistanceScale. So, no matter what, you cannot get passengers to spawn beyond the 3km range.

    ts2.platform.MaxStationPassengerSpawnDistance – This is the maximum distance when “station” spawn points become active. Counterintuitively, station spawns are located on platforms. The purpose of these is to populate the station with passengers while the player is still out of visual range. The issue is that not all stations have these, even on newer routes. It is only this spawn point that can rapidly populate a station after the game was loaded. So if you load into a 'dead' station (like Leeds on NTP), it is most likely becasue it doesn't have a station spawn point. My recommendation is to set this to a big number, like 350000, so these spawn points are always active when a station is loaded.

    ts2.platform.MaxPlatformPassengerSpawnDistance – This is the maximum distance when “platform” spawn points become active. These are those “out of sight” spawn points, that represent people entering the platform from outside. Once these spawn points are active the “station” spawn become disabled (so people don’t magically appear on platform in players sight). Finding the right value for this is a balancing act, on one hand you want to maximize the time for “station” platform to populate the station. On the other hand, you need these spawn points for stations that only have this spawn point. So you have at least some people on platform once you stop. I’m currently running at 150000.

    ts2.passengers.ForceStationSpawningOverride – Set this to 1. When set 0 passengers will only spawn on the station closest to the player. This can seriously cripple the time spawn points have to populate the stations on dense urban routes, so you often arrive to an empty station, with passengers just entering the platform area.

    ts2.passenger.HotSpawningDistancePadding – I have no idea what this does, doesn’t seem to have any effect. I’ve set it to 0. The name makes me think it is the lowest distance at which passengers can spawn quickly to really populate station. If so, I don’t want a padding on that, I want a living world. Even if it means that I will sometimes see passengers appearing out of thin air.

    ts2.passenger.AdjacentStationsSearchDistance – No idea either, I set it to 0.

    Spawn Rate

    These parameters define how quickly will passengers’ spawn. I’ve yet to find ideal values for these, because setting them too conservatively limits the amount of passengers you see once you arrive in station, but too aggressive settings causes the “passenger worm” of people entering the station from outside spawn point. Currently, I’ve those values set to aggressive, as I find it better to have lots of passengers as the initial point and finetune the values down as I continue play.

    ts2.platform.MaxSpawnRequirement – The game computes how much passengers it wants to have at a platform. This is based on the passenger curve specified for the station + various other parameters that are explained later. If the number of passengers that still needs to be spawned is larger than this number, then the game will enforce minimal spawn time on spawners. I have it at 10, because if the game still wants to spawn passengers, I want for those spawn points to be chugging out passengers.

    ts2.platform.MaxSpawnInterval – Maximum time, in seconds, between two passengers spawn. I imagine it is for a single spawn point. Default value is 5, I’ve kept it at 5.

    ts2.platform.MinSpawnInterval – Minimal time, in seconds, between two passengers spawn. Even when set too low, the game will ensure that passengers are spawned correctly, and do not overlap each other. So, setting it to something like 0.1, as I have, is safe.

    ts2.passenger.SpawnLimitScaleFactor – There looks to be some scaling for the spawn limits defined above. I’m not sure what it is based for, either time, total passengers in world…etc. I’ve set it to 1, as it should be no scaling, and the above defined limits should be respected.

    Amount of passengers

    These parameters define how many passengers are allowed to be spawned, most of these have been pretty known to the community before.

    ts2.passenger.DensityScale – Density scaling, most likely of the passenger curve defined for each station, for old, pre rush-hour, routes. I’ve mine at 10.

    ts2.passenger.DensityScaleNew – Similar density scaling, but for new, post rush-hour, routes. As these generally have more passengers, I’ve mine at 6.

    ts2.passenger.DensityScaleForceNew – This most likely force the new density scaling for older routes. Honestly, I’ve this at 0, which is off. I’ve found the there is quite a difference between the default passenger density in pre and post rush hour routes, so I prefer to be able to define scaling for each group individually.

    ts2.passenger.MaxPlatformPassengers – Maximum amount of passengers that can be spawned overall, for the whole world. This is scaled. So, if you have set this to 100, and your density scaling is at 6, you can effectively have 600 passengers spawned overall. Set this to something ridiculously high, like 1000 (so actively 10000 passengers for old routes overall), as you don't want the spawn points to stop spawing, just because there isn't room in some global pool, even if the station is empty. There is no performance impact for passengers that are not rendered (I checked, 500passengers, or 0, the same performance). You’re only paying in some memory, which should never be a limiting factor on PC.



    Passengers variety

    Passengers in TSW are not static models, but rather they are built from variety of “body parts”, by changing these variables you can affect how many of these models will TSW build, and also if it should discard some of them, should it be used too much.


    ts2.passenger.ObjectPoolSize – This governs how many passengers models should the game build. The default value is 50. Increase it if you want more passenger variety. The only real cost is in memory space, which should never be limiting factor on PC. I have it at 200 without any issues.

    ts2.passenger.ObjectPoolUseCount - This one is interesting. It limits the amount a time a model can be used in session, until it is discarded, and a new random model is built. The default value is -1, which means they are never discarded, and you’re destined to used the same 50 models the whole service run. I have it at 5. This might have some CPU overhead, because each time a model is discarded, a new one has to be computed, but I feel TSW I more GPU bound game, so it shouldn’t affect performance much.

    So, to sum it up, these are the values I’m currently running. Just to note, that I’m still changing them often, to figure out what works for me… and what works for me might not work for you.


    Code:
    ts2.platform.MaxSpawnInterval=5
    ts2.platform.MinSpawnInterval=0.1
    ts2.platform.MaxSpawnRequirement=10
    ts2.passenger.SpawnLimitScaleFactor=1
    ts2.platform.MaxPlatformPassengerSpawnDistance=150000
    ts2.platform.MaxStationPassengerSpawnDistance=350000
    ts2.passengers.ForceStationSpawningOverride=1
    ts2.passenger.HotSpawningDistancePadding=0
    ts2.passenger.AdjacentStationsSearchDistance=0
    ts2.passenger.MaxPlatformPassengers=1000
    ts2.passenger.DensityScale=10
    ts2.passenger.DensityScaleNew=6
    ts2.passenger.DensityScaleForceNew=0
    ts2.passenger.ObjectPoolSize=200
    ts2.passenger.ObjectPoolUseCount=5
    
    Also, be aware, that no parameters can fix the bugs that currently exist with passengers, like passengers not boarding the train, or all passengers evacuating the train on the first station. But hopefully it should result, at least, in busier stations, passengers wise.

    Hopefuly someone will find this helpful, and I will also try to update the topic should I find new things.

    Edit1: Looks like density scaling is limiting the overall number of passengers spawned - post amendment
     
    Last edited: May 17, 2023
    • Like Like x 8
    • Helpful Helpful x 7
  2. a.paice

    a.paice Well-Known Member

    Joined:
    Sep 10, 2020
    Messages:
    1,014
    Likes Received:
    1,676
    Nice work. This sounds like a real improvement and I’d definitely try it if I wasn’t on console.
     
  3. max#2873

    max#2873 Well-Known Member

    Joined:
    Oct 9, 2022
    Messages:
    793
    Likes Received:
    1,043
    Yep, console players are sentenced for the TSW emptiness. Unless DTg eventually start caring about their products.
     
  4. tallboy7648

    tallboy7648 Well-Known Member

    Joined:
    Apr 9, 2020
    Messages:
    6,567
    Likes Received:
    10,808
    Why is it that a player has to fiddle with settings just to have stations be busier? Why has DTG not addressed the issue of ghost stations and empty trains?
     
    • Like Like x 2
  5. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    461
    Likes Received:
    909
    Updated the first post, I misunderstood some parameters, I was also able to increase the passenger variety

    ts2.passenger.MaxPlatformPassengers – Maximum amount of passengers that can be spawned overall, for the whole world. This is scaled. So, if you have set this to 100, and your density scaling is at 6, you can effectively have 600 passengers spawned overall. Set this to something ridiculously high, like 1000 (so actively 10000 passengers for old routes overall), as you don't want the spawn points to stop spawing, just because there isn't room in some global pool, even if the station is empty. There is no performance impact for passengers that are not rendered (I checked, 500passengers, or 0, the same performance). You’re only paying in some memory, which should never be a limiting factor on PC.


    Passengers variety

    Passengers in TSW are not static models, but rather they are built from variety of “body parts”, by changing these variables you can affect how many of these models will TSW build, and also if it should discard some of them, should it be used too much.


    ts2.passenger.ObjectPoolSize – This governs how many passengers models should the game build. The default value is 50. Increase it if you want more passenger variety. The only real cost is in memory space, which should never be limiting factor on PC. I have it at 200 without any issues.

    ts2.passenger.ObjectPoolUseCount - This one is interesting. It limits the amount a time a model can be used in session, until it is discarded, and a new random model is built. The default value is -1, which means they are never discarded, and you’re destined to used the same 50 models the whole service run. I have it at 5. This might have some CPU overhead, because each time a model is discarded, a new one has to be computed, but I feel TSW I more GPU bound game, so it shouldn’t affect performance much.
     
    Last edited: May 17, 2023
  6. MercDriver

    MercDriver Active Member

    Joined:
    Apr 3, 2024
    Messages:
    258
    Likes Received:
    242
    First of all thank you for taking the time to investigate these passenger settings, and your very detailed "How to" post.

    I am new to using God Mode, so am I correct in thinking that these changes are made in Console Commands?
    Once set in Godmode do they have to be reset every time you start the game?
    And, finally, do they still work in TSW5?
     
  7. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,963
    Likes Received:
    36,552
    This is something that ought to be configurable in options.
     
  8. Winzarten

    Winzarten Well-Known Member

    Joined:
    Jun 27, 2020
    Messages:
    461
    Likes Received:
    909
    They work in TSW 5. These are regular engine.ini modification, so you can do them either in engine.ini, as any other settings, or you can add them into the dynamic ini in godmode. I prefer the godmode dynamic.ini, because that allows me to tune the settings little bit for each route.

    These are the settings I use currently
    Code:
    ts2.passenger.DensityScale=3.5
    ts2.passenger.DensityScaleNew=2.5
    ts2.passengers.ForceStationSpawningOverride=1
    ts2.passenger.HotSpawningDistancePadding=0
    ts2.passenger.AdjacentStationSearchDistance=80000
    ts2.passengers.Navigation.MaxCameraDistance=1000000
    ts2.passenger.MaxPlatformPassengers=75
    ts2.platform.MaxPlatformPassengerSpawnDistance=180000
    ts2.platform.MaxStationPassengerSpawnDistance=300000
    ts2.platform.MaxSpawnInterval=2
    ts2.platform.MinSpawnInterval=0.1
    ts2.platform.MaxSpawnRequirement=90
     
  9. MercDriver

    MercDriver Active Member

    Joined:
    Apr 3, 2024
    Messages:
    258
    Likes Received:
    242
    I have searched for the Engine.ini file and I cannot find the one that details passengers. Can you point me in the right direction please.
    Changing Godmode every time I play takes a long time, and I am happy with your settings.
     
  10. Emmy_MAN

    Emmy_MAN Member

    Joined:
    Apr 9, 2022
    Messages:
    79
    Likes Received:
    77
    Hi MercDriver

    You will find the Engine.ini file in the following directory.
    Documents\My Games\TrainSimWorld5\Saved\Config\WindowsNoEditor
     
  11. MercDriver

    MercDriver Active Member

    Joined:
    Apr 3, 2024
    Messages:
    258
    Likes Received:
    242
    That is the one I found, but there are no references to the ts2 passenger settings.
    Do I copy/paste your settings into the engine.ini
     
    • Helpful Helpful x 1
  12. Emmy_MAN

    Emmy_MAN Member

    Joined:
    Apr 9, 2022
    Messages:
    79
    Likes Received:
    77
    Hello MercDriver

    Yes you open the Engine.ini file, it should be at the bottom.

    [Audio]UnfocusedVolumeMultiplier=,
    there you make a blank line underneath and then copy the following and paste it into the Engine.ini.


    [SystemSettings]
    and add these lines from Winzarten below and then save.

    Greets Daniel
     
    • Like Like x 1
  13. MercDriver

    MercDriver Active Member

    Joined:
    Apr 3, 2024
    Messages:
    258
    Likes Received:
    242
    Thanks for your help.
     
    • Like Like x 1

Share This Page