planetmaker wrote:Morloth wrote:- Don't use static values anymore connection length is now determined by the speed of the vehicle and how much it can travel in a set amount of days.
I'm curious on how you go for that.
Especially with newgrfs there are a number of pitfalls in that area, the actual travel time cannot queried reliably beforehand:
...
What I mean with this setting is that the connections NoCAB will consider are no longer determined by a fixed value, e.g. only consider connections who's manhattan distance is less than X. Instead NoCAB considers every connection which, with the current vehicle's speed, can we served within X days (I now use 100). This is a very simplified function, but it is only used for the preliminary selection of connection we might want to build. Once we have this ordered list we use the pathfinders to get better estimates.
But you're right that there are many variables to consider and I only use the standard values at the moment. So if there are changed the calculated estimates will be more off. But to go down your list:
Not considered:
- speed can change with refit
- speed can change with load amount (or basically any thing you can think of, if the newgrf author is evil, like 1km/h only on April 1st)
- slope speed depends upon the acceleration settings (realistic vs. original, both for trains and road vehicles)
- slope speed depends upon the setting for the steepness of slopes
- speed can change for trains when certain wagons are (not) attached
- average speed of RV depends on the amount and busyness of level crossings
- average speed for RV and trains depends upon the busyness of their route and whether there are stations on the way (possibly blocked by other vehicles)
Planned for future:
- speed of rail vehicles can be limited by the track type (if played with rail types newgrfs)
Already considered:
- speed of planes depends on the plane speed multiplier 1/1, 1/2 or 1/4
- overall speed of vehicles depends upon breakdown settings
So yes, if NewGRFs will mess with these values there is little NoCAB can do to detect this at the moment. Some functions (like the speed of a refitted vehicle) are not yet exposed by NoAI (as far as I know). But as more functions become available I'll definitely consider including them.