Elvas Tower: Station clocks - Elvas Tower

Jump to content

  • 9 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • You cannot start a new topic
  • You cannot reply to this topic

Station clocks Creating clocks to synchronize with simulation Rate Topic: -----

#61 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 15 April 2021 - 05:05 AM

Good to hear that it is working well for you.

I'll try to answer all your queries but, for the benefit of people who are not familiar with the code submitted and discussed on GitHub, I will provide some background.

The animated clocks that Jonas has implemented in OR_NewYear_MG work well but introduce a new data file openrails\clocks.dat. It's been ORMT policy for some years that new data files should make use of JSON instead of Microsoft's STF because JSON is well-documented and an international standard. Rob Roeterdink used JSON for the Weather files (back in 2019) and I'm sorry that I didn't mention this policy to Jonas at the time.

To include Jonas work into the official Open Rails code, I have provided a data conversion mechanism that offers to create a JSON file from the clocks.dat if one is found or more recent. The official Open Rails code will read any JSON file and ignore any clocks.dat file.

Please note that we only need the conversion because there may now be a few routes which include animated clocks.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Are OR files of this type (Json) written directly to the Routes folder instead to the Openrails subfolder of the route?

Since animate.clocks-or is a new OR-only file and applies to the whole route, it is written to the Routes folder. This is not the case with every JSON file.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Will STF files like the "carspawn.dat" or "turntables.dat" in the Openrails folder be handled in the same way in the future?

There are no proposals to do that, because "carspawn.dat" is part of MSTS and not an OR-only file.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Is the current dialog box really necessary to ask the user to confirm the creating of the "animated.clocks-or" file ?

The policy declared on our website is that Open Rails will not change your data files, so we need to ask for permission. It only happens if your route has a clocks.dat but not a more recent animated.clocks-or and only happens once, so I don't think it will be a burden.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• Will the "Clocks.dat" (and other STF files) possibly no longer be recognized by future versions?

As we have declared in the past, all MSTS STF files will be recognised by future versions of OR. It is just new types of STF file that we will not be adopting.


View Postjonas, on 14 April 2021 - 09:52 PM, said:

• I am certainly not up to date with the status quo on the subject of Json files and Open Rails. Is there a thread about it?

There are examples of Rob's weather file here. JSON is documented fairly simply here.

#62 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 15 April 2021 - 08:16 AM

View Postcjakeman, on 15 April 2021 - 05:05 AM, said:

Since animate.clocks-or is a new OR-only file and applies to the whole route, it is written to the Routes folder. This is not the case with every JSON file.

Up to today all files added for OR are stored in the Openrails subfolder AFAIK, or in an Openrails subfolder of existing subfolders. Is't it cleaner, and easier to follow, to leave the base folder of the route untouched and to continue inserting the additional OR-related files in Openrails subfolders?

#63 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 15 April 2021 - 09:43 AM

View PostCsantucci, on 15 April 2021 - 08:16 AM, said:

Up to today all files added for OR are stored in the Openrails subfolder AFAIK, or in an Openrails subfolder of existing subfolders. Isn't it cleaner, and easier to follow, to leave the base folder of the route untouched and to continue inserting the additional OR-related files in Openrails subfolders?

Good point, but the openrails subfolders are for OR-specfic extensions to MSTS formats and this new type of file isn't one of those.

(I did discuss this proposal with James Ross and he was quite clear about where the new file should go. Perhaps I should have asked him to explain his thinking.)

#64 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 15 April 2021 - 12:53 PM

In order to prevent further off topic here, I have opened this thread.

#65 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 15 April 2021 - 09:29 PM

Would "animated" also mean digital clocks in English?
I ask because I also specify the clock type in clocks.dat, which in future could also be "digital" instead of "analog" if such clocks will be implemented in Open Rails some day (see the code box here).
So instead of the JSON name "animated.clocks-or" wouldn't even "external.clocks-or" or "terrain.clocks-or" be better?


#66 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 17 April 2021 - 02:56 AM

View Postjonas, on 15 April 2021 - 09:29 PM, said:

Would "animated" also mean digital clocks in English?

Yes, that's right.

#67 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 27 April 2021 - 04:44 PM

This feature has been merged into the master branch and will therefore be available in the testing release starting from this Friday.

Please note that per OR policy, which dictates that we should avoid introducing new STF files, the clocks.dat file will not be supported in the mainline version available at openrails.org. If you are a route builder using this feature, you should use the included data converter to convert your clocks.dat file to an animated.clocks-or JSON file.

#68 User is offline   rickloader 

  • Conductor
  • Group: Status: First Class
  • Posts: 493
  • Joined: 05-February 13
  • Gender:Male
  • Location:Southampton uk
  • Simulator:Open Rails
  • Country:

Posted 28 April 2021 - 12:27 AM

I`m a routebuilder. Thank you to all who contributed to this exciting new feature. I would like to add it to my route. I use MGnewyear.
I understand that I am to use a json format animated.clocks-or. Please can such a specimen file be posted for guidance. I do not see a clear example in the many pages of discussion.
Jonas has provided some excellent guides for clocks.dat, and it would help if similar were available for the json format that is preferred.
Thanks, Rick

#69 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,868
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 28 April 2021 - 06:33 AM

View Postrickloader, on 28 April 2021 - 12:27 AM, said:

I`m a routebuilder. Thank you to all who contributed to this exciting new feature. I would like to add it to my route. I use MGnewyear.
I understand that I am to use a json format animated.clocks-or. Please can such a specimen file be posted for guidance. I do not see a clear example in the many pages of discussion.
Jonas has provided some excellent guides for clocks.dat, and it would help if similar were available for the json format that is preferred.

It's in the Manual which will be available in the Testing Version from Friday.

#70 User is offline   YoRyan 

  • Conductor
  • Group: Status: Active Member
  • Posts: 391
  • Joined: 19-February 20
  • Gender:Male
  • Location:California, United States
  • Simulator:Open Rails/unstable
  • Country:

Posted 28 April 2021 - 09:07 AM

Please also note that unfortunately, animated.clocks-or support is not yet available in NewYear-MG. To test these files you will have to switch to the official unstable channel.

  • 9 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users