Elvas Tower: Making a command-line-tool to load supported files - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Making a command-line-tool to load supported files Rate Topic: -----

#11 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 26 February 2018 - 12:39 PM

View PostJeroenP, on 20 February 2018 - 06:05 AM, said:

I have a first version, attached as a patch. Obviously this is not yet complete. However, I want to share this so that we have something to discuss more concretely. I added it is a ContentChecker project (the name is open for change) with as command line for now ORfileXcheck.exe, even though at the moment there is no real cross-checking going on.
Some .dat files are not supported yet. And I guess some openrails sub-directories are also not yet supported. Feedback is appreciated.

Thanks! The executable name should match the project name, so it should make ContentChecker.exe. All the files are inside the Open Rails directory and will be set up with the appropriate metadata so it's clear they're part of OR, so that's not necessary in the filename. If there's any part of the metadata you're not sure about please ask - and I can easily fix anything that hasn't been filled in afterwards. :)

View PostJeroenP, on 20 February 2018 - 06:05 AM, said:

For instance on how and where this needs to go into the Source directory. And of course whether it does what was intended.

I've been incredibly busy recently so haven't had a chance to look at the changes yet, but I would say that all the code goes in Source\ContentChecker and references the necessary other projects.

View PostJeroenP, on 20 February 2018 - 06:05 AM, said:

I also added some initial documentation.

Brilliant!

View PostJeroenP, on 24 February 2018 - 11:37 PM, said:

I had a look at the loading of various .dat files. And I am getting slowly convinced that files like speedpost.dat, spotter.dat, ssource.dat, and telepole.dat are not in fact used by ORTS. I could not find any code loading them. And I ran some routes through the debugger triggering on loading of .dat files and they did not pop up. So it seems to me that perhaps these files are needed in MSTS perhaps to do some initial loading or maybe even only for editing. But that they are not really needed in ORTS because ORTS can find the same information in for instance the world files.

I suspect most of these are only for the editor - although MSTS may still load them in-game.

View PostJeroenP, on 20 February 2018 - 06:05 AM, said:

Currently in the command line tool I am flagging them as 'Not used by ORTS''.

This is perfect.

View PostJeroenP, on 20 February 2018 - 06:05 AM, said:

So, does anyone know for a fact that these files are loaded? Otherwise we should perhaps correct the manual.

I've unfortunately not got time to double-check any of these specifically, but I would say that:

  • If there's no mention of the file name in the OR source code
  • And there's no mention of any variables pointing to the file name in other data files (for example, the way the level crossing sound file is loaded from DefaultCrossingSMS)

Then you can safely assume for now that we don't use it.

If anything does turn out to be used, we can correct the tool/manual/etc. at that time. Don't worry about being perfect right now!

#12 User is offline   JeroenP 

  • Fireman
  • Group: Status: Active Member
  • Posts: 179
  • Joined: 28-December 13
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 27 February 2018 - 02:39 AM

I did a first SVN commit. Note the documentation is in Source/Documentation.

  • 2 Pages +
  • 1
  • 2
  • 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