Page 4 of 15

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

Posted: 15 Sep 2010 10:23
by hthhs
VVG wrote: Variable minute's length has been done already. If you are going to make a minute's length variable, you might find this http://www.tt-forums.net/viewtopic.php?f=33&t=49799 helpful.
Using this sounds like a good plan. I'll attempt to compile with both this and departureboards.

EDIT

departureboards0.82rc + virtual time

Use this patch after applying departureboards0.82rc and virtual time to get departure boards to display times in hh:mm format:
departureboards0.82rc-virtualtime.diff
(2.83 KiB) Downloaded 185 times

Comm Cody wrote:One Question. Does this mess up vehicle invention date? Or the year you pick in the start new game menu?

EDIT And it does.
Which vehicles does it mess up for you?
ChillCore wrote: On topic,
hthhs,
When the departure tables are empty you have put a redirect to openttd.org. Lol, they are not there either, I checked. :mrgreen:
Would it not be better to give a more relevant message? eg. "The departure times are not calculated yet. Are you using timetables?" or something alike?
That would make all kinds of sense. :p

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

Posted: 16 Sep 2010 15:58
by Dwight_K._Schrute
I have a little problem...

My trams don't appear on the departure board... don't know why... They all have timetables (see screenshot)

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

Posted: 16 Sep 2010 18:26
by hthhs
Dwight_K._Schrute wrote:I have a little problem...

My trams don't appear on the departure board... don't know why... They all have timetables (see screenshot)
Hmm, that's odd - trams work for me.

Do they load from the station, or only unload?

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

Posted: 16 Sep 2010 21:43
by Dwight_K._Schrute
They load and unload... no special orders...

that's really weird... in other cities it's the same... but trains an buses work properly ?(

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

Posted: 17 Sep 2010 08:52
by hthhs
Would you mind sending me your save file?

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

Posted: 17 Sep 2010 09:01
by Dwight_K._Schrute
Here it is... But my version is patched with Chill's Patch Pack v10.. so I hope you can open it...

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

Posted: 17 Sep 2010 14:05
by Dwight_K._Schrute
Ok.. now it hates me completely :evil:

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

Posted: 18 Sep 2010 19:33
by hthhs
I'm stumped. :( I really can't see why it's not working. I haven't managed to replicate the behaviour from scratch either, even using the same patchpack. The order list you've given them should be fine.

Unfortunately as you're not using the patch applied to an otherwise unpatched source I'm not in a position to figure out what's going wrong. Sorry! Maybe the patchpack changes something to do with vehicle orders, and/or the vehicles have an order to go to a station and stay for 0 days/ticks?

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

Posted: 18 Sep 2010 20:11
by Scautura
I have exactly the same issue, with the same patch pack - Daylength is set to 3, my timetables are automated (as such, some are "stay 0 days" - does this matter only for the departing station, or all stations in the list?). It does seem to have occurred after I built a few stations (5th or 6th station, or so) and any further stations also exhibit the same behaviour. I've had it occur in a brand new game, and an older savegame.

I'm inclined to believe it's a bad interaction between patches, so I'll see if I can replicate it with a "vanilla" patched version.

Affected stations (in which savegame):

Drafingbourne Transport: Trefingfield, Plindston North, Drafingbourne, Dinston Heights
Draston Transport: Daningwell South

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

Posted: 18 Sep 2010 20:37
by hthhs
Scautura wrote:I have exactly the same issue, with the same patch pack - Daylength is set to 3, my timetables are automated (as such, some are "stay 0 days" - does this matter only for the departing station, or all stations in the list?). It does seem to have occurred after I built a few stations (5th or 6th station, or so) and any further stations also exhibit the same behaviour. I've had it occur in a brand new game, and an older savegame.
Any "go to station" order with a travel time of 0 days or a stay time of 0 days is significant and will cause the patch to stop trying to find the next departure for the vehicle as it assumes that the vehicle is not fully timetabled.
Scautura wrote:I'm inclined to believe it's a bad interaction between patches, so I'll see if I can replicate it with a "vanilla" patched version.
Thank you! That would be much appreciated :) I haven't encountered this problem so maybe I have a weird playing style that doesn't cause it to happen.

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

Posted: 18 Sep 2010 21:27
by Scautura
Results:

This is a savegame made using the "vanilla" patched version on the previous page. Loaded in that version, it works fine... Loaded in Chill's patch pack and... It breaks (the trams have no departure info). Definitely an issue with the patchpack, and as such, needs to be posted in there his thread (I'm going to crosspost the info)

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

Posted: 23 Sep 2010 11:18
by Steve-N
hthhs wrote:I'm stumped. :( I really can't see why it's not working.
Maybe because it's only getting the vehicle list for station 0 ? Adding the station id to the VehicleListIdentifier might help:

Code: Select all

diff --git a/src/departures.cpp b/src/departures.cpp
index bb83d36..ea7be73 100644
--- a/src/departures.cpp
+++ b/src/departures.cpp
@@ -85,7 +85,7 @@ DepartureList* MakeDepartureList(StationID station, bool show_vehicle_types[4])
                }
 
         /* MAX_COMPANIES is probably the wrong thing to put here, but it works. GenerateVehicleSortList doesn't check the company when the type of list is VL_STATION_LIST (r20801). */
-               if (!GenerateVehicleSortList(&vehicles, VehicleListIdentifier(VL_STATION_LIST, (VehicleType)(VEH_TRAIN + i), MAX_COMPANIES).Pack())) {
+               if (!GenerateVehicleSortList(&vehicles, VehicleListIdentifier(VL_STATION_LIST, (VehicleType)(VEH_TRAIN + i), MAX_COMPANIES, station).Pack())) {
                        /* Something went wrong: panic! */
                        return result;
                }

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

Posted: 23 Sep 2010 19:32
by hthhs
That's an error - thank you for spotting it! :) Serves me right for not checking what had changed properly and just hacking something in that seemed to do what I wanted. It seems miraculous that it ever worked...

The first post of the thread has been updated.

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

Posted: 14 Oct 2010 16:18
by sph
Nice work there!

I tweaked your patch a little bit so it would show the vehicle type icon after the destination. I know you can filter them, but I find this easier to use :)
I hope you like it.

(Patch is applied on the trunk)

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

Posted: 14 Oct 2010 16:29
by Eddi
hm... maybe before the destination would be better?

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

Posted: 14 Oct 2010 16:35
by Logital82
Would be nice to have an arrival time too. SO its easyer to control the "intregral schedule". Dont know the word for this in englisch. It is when one train arrives at maby at 56 and the train in the other direction so departs at 04. or 57 to 03 ando so on...

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

Posted: 14 Oct 2010 16:45
by sph
Eddi wrote:hm... maybe before the destination would be better?
It would look like in the attachment then, somehow it feels a bit more unnatural that way, but that could just be me :)
Logital82 wrote:Would be nice to have an arrival time too. SO its easyer to control the "intregral schedule". Dont know the word for this in englisch. It is when one train arrives at maby at 56 and the train in the other direction so departs at 04. or 57 to 03 ando so on...
Yeah, I've been thinking about that as well. Would be useful to increase the station's throughput by making sure a train is gone before the next one arrives.

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

Posted: 14 Oct 2010 17:07
by Eddi
hm, maybe it's not perfect... how about as a separate column? (so between the destination and the "arrived" column, but aligned)

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

Posted: 14 Oct 2010 17:14
by sph
Eddi wrote:hm, maybe it's not perfect... how about as a separate column? (so between the destination and the "arrived" column, but aligned)
I tried that too (well actually it happened due to a bug), the type icon will look a bit isolated from the rest, it's not really the useful effect you'd have expected. I can live with the second example however, the code is a lot simpler than the first one as well.

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

Posted: 14 Oct 2010 20:08
by hthhs
sph wrote:Nice work there!

I tweaked your patch a little bit so it would show the vehicle type icon after the destination. I know you can filter them, but I find this easier to use :)
I hope you like it.

(Patch is applied on the trunk)
That's a cool idea! I've added it to the patch on the first post of the thread with a few modifications:
- the icons are now orange, like most of the rest of the text
- the icons are shown between the time and destination, because this was easier to implement ;)
- whether to show them or not can be set in advanced settings

Thank you! :)
Logital82 wrote:Would be nice to have an arrival time too. SO its easyer to control the "intregral schedule". Dont know the word for this in englisch. It is when one train arrives at maby at 56 and the train in the other direction so departs at 04. or 57 to 03 ando so on...
Arrivals boards would indeed be useful. I'll look into adding them this weekend if I have time.