This mod allows you to configure hundreds of available parameters for pathfinding algorithm, at next to zero performance cost.
After first start with this mod enabled, the mod will create a config file, where it will save all available pathfinding parameters. This should work with any version of the game, at least if data structures wouldn't change. The data consists of six dictionaries, three of which are default data combined from game value and updated each run, and three other dictionaries are for modified values. There's dictionaries for car values, pedestrian values and train values. Each dictionary have a list of prefab names followed by pathfinding costs. The number of costs varies per dictionary, as trains have much less options than cars or pedestrians. Each cost consists of four values: Time, Behavior, Money and Comfort. I'm not yet sure how exactly each one works, but it seems that for each one the greater the value the less likely a given entity will choose the route. It's recommended to use behavior cost by default, but you are free to experiment.
To modify values, copy prefab name and the cost you want to change into the same non-default dictionary, for example:
Keep in mind that all four cost values should be set. It's not strictly required to read the file, but if you do not set these values, they will be set to 0 by mod next time the game is started. I can't change that, as the mod uses in-game saving algorithm. As for costs in a prefab - you don't have to set them all, unset values will automatically reset to null value, which means that in-game value should remain unmodified.
It's strongly suggested to save your configuration file to some custom folder, as configuration in the game's user folder overridden often and you may lost your custom configuration.
After first start with this mod enabled, the mod will create a config file, where it will save all available pathfinding parameters. This should work with any version of the game, at least if data structures wouldn't change. The data consists of six dictionaries, three of which are default data combined from game value and updated each run, and three other dictionaries are for modified values. There's dictionaries for car values, pedestrian values and train values. Each dictionary have a list of prefab names followed by pathfinding costs. The number of costs varies per dictionary, as trains have much less options than cars or pedestrians. Each cost consists of four values: Time, Behavior, Money and Comfort. I'm not yet sure how exactly each one works, but it seems that for each one the greater the value the less likely a given entity will choose the route. It's recommended to use behavior cost by default, but you are free to experiment.
To modify values, copy prefab name and the cost you want to change into the same non-default dictionary, for example:
Code:
"CarData": {
"Tiled Street Pathfind - Tram": {
"DrivingCost": {
"Time": 0,
"Behaviour": 10,
"Money": 0.01,
"Comfort": 0.1
},
},
},
Keep in mind that all four cost values should be set. It's not strictly required to read the file, but if you do not set these values, they will be set to 0 by mod next time the game is started. I can't change that, as the mod uses in-game saving algorithm. As for costs in a prefab - you don't have to set them all, unset values will automatically reset to null value, which means that in-game value should remain unmodified.
It's strongly suggested to save your configuration file to some custom folder, as configuration in the game's user folder overridden often and you may lost your custom configuration.