[Patch] Departure boards, 24h clock + binary 25 (r27452)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

Unfortunately saving the number of days per tick in the savegame would break compatibility between unpatched and patched versions of the game even more than the patch does already :( (currently savegames are compatible except that vehicles that haven't started their timetables will be messed up.)

While this might not matter when including the patch in a patchpack that breaks savegame compatibility with vanilla OpenTTD anyway, I'd prefer to retain as much savegame compatibility as possible in the standalone version of the patch. Sorry!
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: [Patch] Departure boards, 24h clock + binary

Post by supermop »

I think its best to try to keep the patch as agreeable to trunk inclusion as possible,
sph
Engineer
Engineer
Posts: 20
Joined: 14 Oct 2010 16:09

Re: [Patch] Departure boards, 24h clock + binary

Post by sph »

Small fix for the latest trunk. This is without the timetable skip patch.
Last edited by sph on 17 Nov 2010 16:42, edited 1 time in total.
sph
Engineer
Engineer
Posts: 20
Joined: 14 Oct 2010 16:09

Re: [Patch] Departure boards, 24h clock + binary

Post by sph »

Crap, I forgot to add the extra files in the diff file. Sorry for that :)
Attachments
departureboardswallclock8b5-r21219.diff
(96.68 KiB) Downloaded 138 times
hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

sph wrote:Crap, I forgot to add the extra files in the diff file. Sorry for that :)
We've just duplicated efforts :oops: but thanks anyway!

As nothing much has changed in the patch for a while, I've made the current release be version 8.
sph
Engineer
Engineer
Posts: 20
Joined: 14 Oct 2010 16:09

Re: [Patch] Departure boards, 24h clock + binary

Post by sph »

A small question:

In file departures_type.h, there is this typedef:

Code: Select all

    typedef SmallVector<StationID, 32> StationIDList;
and it's only used a few lines below:

Code: Select all

    StationIDList calling_at; 
Isn't it a better idea to just remove the typedef and use this one directly:

Code: Select all

    SmallVector<StationID, 32> calling_at;
This prevents a conflict with the cargodist mod which also defines a StationIDList.
hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

sph wrote: Isn't it a better idea to just remove the typedef and use this one directly:
Yes, as the type is only used once. Thanks for spotting that.
sph wrote: This prevents a conflict with the cargodist mod which also defines a StationIDList.
It probably conflicts with other patches too. I'm not going to make it compatible with every other patch ever written.
sph
Engineer
Engineer
Posts: 20
Joined: 14 Oct 2010 16:09

Re: [Patch] Departure boards, 24h clock + binary

Post by sph »

hthhs wrote:It probably conflicts with other patches too. I'm not going to make it compatible with every other patch ever written.
Nobody expects that either, but that doesn't take away that the risk of conflicts can be reduced by simply avoiding unnecessary types. The departure board works just fine alongside cargodist if it wasn't for this single type conflict ;)
Kimby
Engineer
Engineer
Posts: 48
Joined: 02 Dec 2009 15:42

Re: [Patch] Departure boards, 24h clock + binary

Post by Kimby »

Great patches hthhs :bow: I can't imagine having to live without the arrival/departure board now.

I do have a request for a small cosmetic change. :oops: Currently vehicles are mentioned as going to the farthest destination with a "calling at" for closer stations. That works perfectly for situations like long lines between 2 cities with stops in between.

But consider circular lines, like a city metro doing "North, East, South, West and back to North" while another does "North, West, South, East and back to North". When you look at the departure board in North, you'd see metros for:
- "East": those actually go to West first
- "West": those actually go to East first

In this light I'd request that when you detect a line is circular (and I hope that wouldn't be too difficult), you'd change the departure board in
"East, continuing to South and West" where it's currently "West, calling at East and South". I think that would make a lot more sense and it doesn't sound any more difficult than what you're already doing.

As a second point: I noticed that on the arrival board, you use the closest station with a "calling at" for stations further away. Is there any particular reason to do it like that ? Usually, the end-of-line stations are the big ones and thus the ones you'd like to see mentioned as is done for the departures. So in the big central station of city A, it sounds as making more sense to me to announce the arrival of the train originating in city B instead of announcing it as the train that came from town C where the train happened to make its last stop. Of course your current method here works just fine for circular lines :twisted:
hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

hthhs wrote: It probably conflicts with other patches too. I'm not going to make it compatible with every other patch ever written.
Sorry for snapping at you, sph - denotational semantics work had made me irritable :(
Kimby wrote: I do have a request for a small cosmetic change. :oops: Currently vehicles are mentioned as going to the farthest destination with a "calling at" for closer stations. That works perfectly for situations like long lines between 2 cities with stops in between.

But consider circular lines, like a city metro doing "North, East, South, West and back to North" while another does "North, West, South, East and back to North". When you look at the departure board in North, you'd see metros for:
- "East": those actually go to West first
- "West": those actually go to East first

In this light I'd request that when you detect a line is circular (and I hope that wouldn't be too difficult), you'd change the departure board in
"East, continuing to South and West" where it's currently "West, calling at East and South". I think that would make a lot more sense and it doesn't sound any more difficult than what you're already doing.
I'm a bit loath to try to do anything about this because it would be perfectly reasonable to e.g. have trains operating between KX and Cambridge in which KX->Cambridge is stopping, and Cambridge->KX is non-stop (and some other trains swapping the stopping and non-stop parts) if this makes timetabling more convenient by making the total journey time closer to a multiple of 60 minutes.

There are also peculiarities such as stations that are only served by trains going in one direction! (A real-life example is Polesworth.) In this case, a train might reasonably have orders A->B->C, but I wouldn't want the train to be shown as "To B" from A, even though the train's journey is circular.

For your example, you could have e.g. "West via East" by including a "Go non-stop via East" order immediately before the order to stop at East.

Sorry! :(
Kimby wrote: As a second point: I noticed that on the arrival board, you use the closest station with a "calling at" for stations further away. Is there any particular reason to do it like that ? Usually, the end-of-line stations are the big ones and thus the ones you'd like to see mentioned as is done for the departures. So in the big central station of city A, it sounds as making more sense to me to announce the arrival of the train originating in city B instead of announcing it as the train that came from town C where the train happened to make its last stop. Of course your current method here works just fine for circular lines :twisted:
Hmm, you've confused me. The current behaviour is to show the station from which the vehicle originated (i.e. the end-of-line station) in larger text. E.g. a train from Edinburgh to KX calling at York (having previously gone from KX to Edinburgh calling at York) would be listed as "Edinburgh calling at: York" in the arrivals at KX. This is how it is done at KX (or at least it was the last time I was there), which was the whole inspiration for this patch, hence the behaviour of the patch.

...please, please tell me if the patch is behaving differently to what I've just described!!
Kimby
Engineer
Engineer
Posts: 48
Joined: 02 Dec 2009 15:42

Re: [Patch] Departure boards, 24h clock + binary

Post by Kimby »

hthhs wrote: I'm a bit loath to try to do anything about this because <...>
Sorry! :(
*cries a bit* :cry: I'll get over it.
It would still be nice to have *some* way to get rid of those confusing messages, but I'll have to think about a way that fixes it and considers your arguments too.
hthhs wrote:Hmm, you've confused me. <...>
...please, please tell me if the patch is behaving differently to what I've just described!!
Sorry, I noticed later on that most trains don't behave like I described. I guess it's some kind of peculiar situation caused by using conditional orders and such. Best forget I mentioned it :roll:
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: [Patch] Departure boards, 24h clock + binary

Post by JGR »

Seeing as the last update was on the 13th of December I presume that this is still under development?

Anyway, I've one minor suggestion.
An option to display the vehicle group name as well of or instead of the vehicle name itself in the departure board.
For me at least the group name is more useful to see at a glance than the vehicle number (and manually renaming several hundred vehicles is not a great solution).
Ex TTDPatch Coder
Patch Pack, Github
Melfice
Transport Coordinator
Transport Coordinator
Posts: 305
Joined: 20 Apr 2006 19:11
Location: Oldenzaal, the Netherlands, gateway to Germany

Re: [Patch] Departure boards, 24h clock + binary

Post by Melfice »

JGR wrote:Seeing as the last update was on the 13th of December I presume that this is still under development?

Anyway, I've one minor suggestion.
An option to display the vehicle group name as well of or instead of the vehicle name itself in the departure board.
For me at least the group name is more useful to see at a glance than the vehicle number (and manually renaming several hundred vehicles is not a great solution).
Not sure if this is something done by a patch or if it's standard behaviour, but vehicles can be named automatically, assuming the first train in a group has a name.

For instance, you'll have group 1000.
You name the first train 1001. Every cloned train (possibly requires shared orders... not sure.) will increase the number by one. 1002. 1003. It just keeps adding up.
Or... Group: Waddleton - Cluckinghill
First train Waddleton - Cluckinghill 1.
Every cloned vehicle will increase that number.

But you'd need to start early with that. If you already have 200 vehicles, I can imagine renaming them now would be horrible.
hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

JGR wrote: An option to display the vehicle group name as well of or instead of the vehicle name itself in the departure board.
Done (patch only, no binary yet) - see the first post of the thread.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: [Patch] Departure boards, 24h clock + binary

Post by JGR »

hthhs wrote:
JGR wrote: An option to display the vehicle group name as well of or instead of the vehicle name itself in the departure board.
Done (patch only, no binary yet) - see the first post of the thread.
Many thanks for that.

I decided to finally bite the bullet and set my system up for compiling OTTD, so it's merged, compiled and seems to be working fine.
Ex TTDPatch Coder
Patch Pack, Github
Grandmaster
Engineer
Engineer
Posts: 72
Joined: 11 Feb 2007 21:10
Location: Rotterdam, Netherlands

Re: [Patch] Departure boards, 24h clock + binary

Post by Grandmaster »

Is it possible to make the departure board also available for way-points, because then I can make my timetabling easier for several lines that do not stop at the same station but still travel a few tiles on a stretch of rail. Also I really like to see trains that don't stop at stations like inter-city's and some freight trains so that those trains also be mentioned.
Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: [Patch] Departure boards, 24h clock + binary

Post by Logital82 »

Request: Is it possible that the arrival times are not shown defaultly and i nhave to selevt if i want to? In a station wehre many different transort vehicles start (train, bus, lorry, plane etc.) there is so much information...mostly i disselect arrivals, then disselect the other transportmodes of the timetable to see e. g. what trains will depart in next hour.
hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: [Patch] Departure boards, 24h clock + binary

Post by hthhs »

Grandmaster wrote:Is it possible to make the departure board also available for way-points, because then I can make my timetabling easier for several lines that do not stop at the same station but still travel a few tiles on a stretch of rail. Also I really like to see trains that don't stop at stations like inter-city's and some freight trains so that those trains also be mentioned.
Departure boards can now also be viewed for waypoints. There's now also the option to show vehicles that have order(s) to go via the station whose departure boards you're viewing without stopping there.
Logital82 wrote:Request: Is it possible that the arrival times are not shown defaultly and i nhave to selevt if i want to? In a station wehre many different transort vehicles start (train, bus, lorry, plane etc.) there is so much information...mostly i disselect arrivals, then disselect the other transportmodes of the timetable to see e. g. what trains will depart in next hour.
Done :)
Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: [Patch] Departure boards, 24h clock + binary

Post by Logital82 »

Thanks so much. Perfect support!
User avatar
PC gamer
Traffic Manager
Traffic Manager
Posts: 213
Joined: 29 Feb 2008 06:28
Location: Estonia

Re: [Patch] Departure boards, 24h clock + binary

Post by PC gamer »

Is it possible to put your departure boards in the mix with cargodist? When it comes to patching openttd, I'm a real newbie. If it is possible to put them together, then I'd happily read the forums and the wiki about patching.
Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 15 guests