Page 19 of 25

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.14

Posted: 07 Jun 2010 17:36
by Morloth
SirkoZ wrote:By the way - what's up with latest 'Cabs (2.0.1x) not building any ships (especially when I set max. road vehicles to 0)?
Darn! Just noticed it just now. Fixed it now, so it will be fixed in the next release (hopefully today).
SirkoZ wrote:Any while describing fastness of '.1x of 'Cabs - it's not faster - it's in fact - slower/choppier than 2.0.7; black being white, yes?
No, at least not as far as I've noticed. But I'll look into this and come back to you.

Thanks for notifying me :).

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.14

Posted: 07 Jun 2010 17:49
by Lord Aro
similar to a screenshot some posts ago i caught this:

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.14

Posted: 08 Jun 2010 01:21
by SirkoZ
Morloth wrote:Darn! Just noticed it just now. Fixed it now, so it will be fixed in the next release (hopefully today).

...No, at least not as far as I've noticed. But I'll look into this and come back to you.

Thanks for notifying me :).
Thank you for the prompt reply and fix. 8)
Lord Aro wrote:similar to a screenshot some posts ago i caught this:
Though somewhat funny - it is the shortest path...well - probably not really but as jaggies in 3D graphics - this and those come from approximating diagonal line with squares/pixels...

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.14

Posted: 08 Jun 2010 05:38
by planetmaker
SirkoZ wrote:Though somewhat funny - it is the shortest path...well - probably not really but as jaggies in 3D graphics - this and those come from approximating diagonal line with squares/pixels...
Not really... a slope is always "longer" than a flat tile as there's the possibility that the vehicle slows down due to it.

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 08 Jun 2010 16:51
by Morloth
New update, this should fix most problems :).

Changelog:
* Ships are now constructable again.
* Allow NoCAB to spend more money on new connections.
* Penalize turns and bridges more for road vehicles.

Thanks for the reports!
Bram

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 08 Jun 2010 16:55
by planetmaker
Morloth wrote: * Penalize turns and bridges more for road vehicles.
I don't think it's necessary to penalize a bridge in general as a bridge does not necessarily mean a height difference in the road level.

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 09 Jun 2010 15:32
by Kogut
But bridges costs more and...

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 09 Jun 2010 15:35
by Morloth
Kogut wrote:But bridges costs more and...
:'(. I'll have a look later this week to see what I can do.

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 09 Jun 2010 15:40
by Kogut
Morloth wrote:
Kogut wrote:But bridges costs more and...
:'(. I'll have a look later this week to see what I can do.
It is copy paste for planetmaker from Lord Aro's post. http://www.tt-forums.net/viewtopic.php?p=882031#p882031

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 09 Jun 2010 15:43
by Morloth
Kogut wrote:
Morloth wrote:
Kogut wrote:But bridges costs more and...
:'(. I'll have a look later this week to see what I can do.
It is copy paste for planetmaker from Lord Aro's post. http://www.tt-forums.net/viewtopic.php?p=882031#p882031
Aaaaah! Ok! No problem than ^^

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 09 Jun 2010 17:10
by Lord Aro
Kogut wrote:
Morloth wrote:
Kogut wrote:But bridges costs more and...
:'(. I'll have a look later this week to see what I can do.
It is copy paste for planetmaker from Lord Aro's post. http://www.tt-forums.net/viewtopic.php?p=882031#p882031
you should of quoted me then X(
:]

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 10 Jun 2010 08:22
by Kogut
crash

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 11 Jun 2010 14:24
by mwyeoh
Just reporting a crash too

NoCAB 2.0.16

OTTD 1.0.2-RC1

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 12 Jun 2010 08:11
by Kogut
similar

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 12 Jun 2010 16:46
by Morloth
Kogut wrote:similar
Are you using and NewGRFs by any chance? Because I don't see the problem in the code just glancing over it.

The other bug is fixed btw :).

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.15

Posted: 12 Jun 2010 20:04
by Kogut
Morloth wrote:
Kogut wrote:similar
Are you using and NewGRFs by any chance? Because I don't see the problem in the code just glancing over it.

The other bug is fixed btw :).
Swedish houses
Total bridge replacement set
YARRS
ISR

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.16

Posted: 14 Jun 2010 10:57
by Morloth
Prementioned bugs are fixed now :). Thanks for the reports!

- Get the correct bridge length for pathfinding.
- Make sure to return false if a road station couldn't be build.
- Correctly detect bidirectional connections.
- 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.

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.16

Posted: 14 Jun 2010 11:18
by planetmaker
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:
- 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
- speed of rail vehicles can be limited by the track type (if played with rail types newgrfs)
- speed of planes depends on the plane speed multiplier 1/1, 1/2 or 1/4
- overall speed of vehicles depends upon breakdown settings
- 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)

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.16

Posted: 14 Jun 2010 12:38
by Morloth
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.

Re: NoCAB - Trains, Trucks, Busses, Aircraft and Ships! v2.0.16

Posted: 14 Jun 2010 13:05
by planetmaker
Sounds reasonable :-) Agreed also that rail types might be a nifty feature :-). Caring for (own and other) road stops on the way for RV might be a good thing for the future, though, too. After all they can be a MAJOR source of jams.
Morloth wrote: 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.
That's a principle problem. I have my doubts whether it CAN even be exposed. It's after all not even exposed to the player and OpenTTD doesn't know it itself before the refit is executed (similar for a number of other newgrf things); I just listed it for completeness :-)

In any case: great progress; I'm always amazed at how quick you are to fix bugs and churn out a new, improved version :-) Kudos!