Upcoming Games

No games to display

Full list
Add a game

Upcoming Events

No events to display

Who's Online

southlaker, Terry, jc92, swiftaw (4 users seen recently)

RealTimeTrains to SimSig WTT converter (RTT2WTT)

You are here: Home > Forum > General > Timetabling > RealTimeTrains to SimSig WTT converter (RTT2WTT)

Page 1 of 1

RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 00:17 #67824
guidomcc
Avatar
246 posts
Put in a RealTimeTrains link, get a SimSig Loader XML WTT out.

Ingredients

  • RTT Advanced Search results page copy the link before running the program

  • A list of sim locations and tiplocs

  • A list of train categories



What it doesn't do

  • Handle freight very well

  • Deal with layouts that are not current

  • Work with data from the past

  • Pre-loader sims is there a way to convert the XML WTTs?
    [li]Activities



How to do it

  1. First you will need a text file telling the program what locations and tiplocs you want it to target. The format is thus:
    Location|TIPLOC !condition
    Conditions tell the program to only apply that Tiploc within the specified circumstances:

    !E Entry point
    !#2 platform 2
    !/DF line DF
    !@UM path UM

    It's best to make sure at least one tiploc has no conditions as a catch-all for that location, otherwise it will be missed if none of the conditions are met.
    The location file for Aston is provided as an example.

  2. You'll also (probably) want to categorise the trains, which can be done with a category file, and at the moment there is a 1 category minimum. This is formatted similarly:
    2A,2B|Description|Max Speed|Length|Power
    2A and 2B being the TDs that this category will be applied to.
    The power is handled in exactly the same way as the XML WTTs:

    O Overhead
    3 3rd rail
    D Diesel




Download
This is a .zip file containing a WTT created by the tool, and a setup file. It's still somewhat buggy.

rtt2wtt.zip

Known issues
I'm posting this now because I have some questions regarding the XML WTT format (I couldn't find any documentation, but if there is any, I'd love to take a look) as the loader doesn't currently recognise files created using this tool.
How does the loader recognise WTTs?
How much information is required to be in the file? Will the sim fill in any gaps with default values?
Are the DownDirection, PrevPathEndDown and NextPathStartDown tags required?

Thanks

Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 09:48 #67842
Finger
Avatar
220 posts
Quote:
the loader doesn't currently recognise files created using this tool.
How does the loader recognise WTTs?

Just a wild guess (haven't looked at your files): Do you have TimetableHeader.xml in place?

Quote:
Will the sim fill in any gaps with default values?

Mostly yes, with 0 or empty. Mind you, having a train with 0 length running 0 mph is not nice.

Quote:
Are the DownDirection, PrevPathEndDown and NextPathStartDown tags required?

They are irrelevant.

Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 11:13 #67848
Peter Bennet
Avatar
5354 posts
Interesting.

I've got it to load to Aston sim and there are 49 fatal errors, seems that there is a rogue location Lichfield LL, not sure where that came from as looking at RTT that's not in a trains schedule. Can you tweak your program to delete it?

There is a train Type (323) and it's shown as proper to some of the timetables but you need to validate the TT to get the data to actually populate - is there some sort of tweak you can make there?

You need the Next workings added somehow.

Peter

Converted to WTT.
[attachment=2960]TimetableHeader.wtt[/attachment]

Post has attachments. Log in to view them.
I identify as half man half biscuit - crumbs!
Last edited: 15/01/2015 at 11:16 by Peter Bennet
Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 16:28 #67876
guidomcc
Avatar
246 posts
" said:
" said:
the loader doesn't currently recognise files created using this tool.
How does the loader recognise WTTs?

Just a wild guess (haven't looked at your files): Do you have TimetableHeader.xml in place?


Yes


" said:

" said:
Will the sim fill in any gaps with default values?

Mostly yes, with 0 or empty. Mind you, having a train with 0 length running 0 mph is not nice.


Okay. It should scrape the timed speed and give it a dummy length (100 I think?) if there isn't a matching category.


" said:

" said:
Are the DownDirection, PrevPathEndDown and NextPathStartDown tags required?

They are irrelevant.
Okay. I saw them in a timetable created by the SIM and wondered if I needed to generate them.


" said:
I've got it to load to Aston sim and there are 49 fatal errors, seems that there is a rogue location Lichfield LL


Sorry! There were some successfully created XML files included with the download if you'd like to take a look at what it can produce - I can't look at what you've uploaded until later however.
Regarding Lichfield LL, the program is not coded specific to any sim, this all comes from the location file. Lichfield Trent Valley is a quirk as the high- and low-level stations are both under the same location on RealTimeTrains, so that location file must contain platform conditions:
Lichfield Trent Valley|LCHTTVL !#2
Lichfield Trent Valley|LCHTTVH

" said:
you need to validate the TT to get the data to actually populate - is there some sort of tweak you can make there?


What do you mean by validate the timetable?


" said:
You need the Next workings added somehow.


I was going to suggest using the tool in the sims for this, once the files are readable by the sim.

Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 16:54 #67878
Peter Bennet
Avatar
5354 posts
" said:

Regarding Lichfield LL, the program is not coded specific to any sim, this all comes from the location file. Lichfield Trent Valley is a quirk as the high- and low-level stations are both under the same location on RealTimeTrains, so that location file must contain platform conditions:
Lichfield Trent Valley|LCHTTVL !#2
Lichfield Trent Valley|LCHTTVH

Though you seem to have managed to import it twice as LL and TV as both locations are in your timetable with identical times.




" said:

" said:
you need to validate the TT to get the data to actually populate - is there some sort of tweak you can make there?


What do you mean by validate the timetable?

Sorry, validate is probably the wrong term.

The WTT as uploaded contains the data for a train type 323. The timetable I looked at shows the assigned type a 323 under train characteristics but the data is not populated. If you re-select the train type in that field it populates the data on the individual train - you need to have that imported automatically somehow. How is beyond my ability.

Peter

I identify as half man half biscuit - crumbs!
Last edited: 15/01/2015 at 16:57 by Peter Bennet
Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 17:27 #67882
guidomcc
Avatar
246 posts
" said:
Though you seem to have managed to import it twice as LL and TV as both locations are in your timetable with identical times.


Darn, I'm sure I squashed that bug the other day too! I see the problem now, consider it fixed.


" said:
The WTT as uploaded contains the data for a train type 323. The timetable I looked at shows the assigned type a 323 under train characteristics but the data is not populated. If you re-select the train type in that field it populates the data on the individual train - you need to have that imported automatically somehow. How is beyond my ability.


I think I understand.. So even if you reference a train category in the schedule, you still need to define the speed, length, power etc in the schedule?

Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 17:43 #67886
Peter Bennet
Avatar
5354 posts
" said:

" said:
The WTT as uploaded contains the data for a train type 323. The timetable I looked at shows the assigned type a 323 under train characteristics but the data is not populated. If you re-select the train type in that field it populates the data on the individual train - you need to have that imported automatically somehow. How is beyond my ability.


I think I understand.. So even if you reference a train category in the schedule, you still need to define the speed, length, power etc in the schedule?
When manually writing a TT you can pre-define standard trains e.g. Cl 156, or 2xCl 156 with speed/length etc defined accordingly. When you then write a timetable you can select the pre-definition (or bespoke) and the data will populate. What you have is the class 323 defined but for some reason the actual data is not being imported though the CL323 is specified as the stock.

For some reason you are having the stock type label imported before the definitions are being set (probably technically incorrect but that's the effect).

Peter

I identify as half man half biscuit - crumbs!
Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 18:08 #67888
Danny252
Avatar
1461 posts
" said:
" said:
The WTT as uploaded contains the data for a train type 323. The timetable I looked at shows the assigned type a 323 under train characteristics but the data is not populated. If you re-select the train type in that field it populates the data on the individual train - you need to have that imported automatically somehow. How is beyond my ability.


I think I understand.. So even if you reference a train category in the schedule, you still need to define the speed, length, power etc in the schedule?
I discovered that this is currently the case - Geoff claims you shouldn't need to include it, and I never got any official reply about whether it was a bug or just mistakenly included in his list when I pointed out it was required.

Last edited: 15/01/2015 at 18:08 by Danny252
Log in to reply
RealTimeTrains to SimSig WTT converter (RTT2WTT) 15/01/2015 at 18:47 #67890
Finger
Avatar
220 posts
" said:
" said:
" said:
The WTT as uploaded contains the data for a train type 323. The timetable I looked at shows the assigned type a 323 under train characteristics but the data is not populated. If you re-select the train type in that field it populates the data on the individual train - you need to have that imported automatically somehow. How is beyond my ability.


I think I understand.. So even if you reference a train category in the schedule, you still need to define the speed, length, power etc in the schedule?
I discovered that this is currently the case - Geoff claims you shouldn't need to include it, and I never got any official reply about whether it was a bug or just mistakenly included in his list when I pointed out it was required.

You're terribly wrong - Geoff never said that. What I meant in that other thread, and what I believe Geoff was consenting to, was that contents of the train category is irrelevant and can be omitted, but that means stuff under //TrainCategories/TrainCategory. Each train must still define everything in its own element (//Timetables/Timetable). (Everything except driving rules, which are taken from the TrainCategory, but wouldn't life be too boring without arbitrary exceptions? )

I hope this will help allay further misunderstanding.

This is not an official stance on the subject. I just happen to have a library for reading and writing both old and loader WTTs (except for the shiny new features).

Log in to reply