Elvas Tower: ORTS command line switches? - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

ORTS command line switches? Rate Topic: -----

#11 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,580
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 21 February 2013 - 07:09 PM

Is there a trick to getting save files to work?...



Error: System.IO.InvalidDataException: Open Rails save file is not compatible with VX.1427 (0.0.4791.35700 Fri 08/02/2013  12:33).Save files must be created by the same version of Open Rails.
   at ORTS.Program.ValidateSave(BinaryReader inf)
   at ORTS.Program.Resume(UserSettings settings, String[] args)
   at ORTS.Program.<>c__DisplayClass6.<Main>b__3()
   at ORTS.Program.Main(String[] args)


#12 User is offline   cjakeman 

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

Posted 21 February 2013 - 11:59 PM

 eolesen, on 21 February 2013 - 07:09 PM, said:

Is there a trick to getting save files to work? . . .

Yes - Don't update to a newer release.

That sounds harsh, but anything smarter is a major piece of work. I'm afraid.

The F2 Save saves the state of every object in the sim in sequence without any formatting or structure. Resume reads it back in again. If the next release adds a new property, or changes/corrects a property then the new Resume will misread the state saved by the older release. If we allowed this, OR might crash or do unexpected things, so we check and disable it.

You can override this check when debugging, as Resuming is a valuable tool for testing.

Hope that makes sense,

#13 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,580
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 22 February 2013 - 09:35 AM

 cjakeman, on 21 February 2013 - 11:59 PM, said:

Yes - Don't update to a newer release.

That sounds harsh, but anything smarter is a major piece of work. I'm afraid.

The F2 Save saves the state of every object in the sim in sequence without any formatting or structure. Resume reads it back in again. If the next release adds a new property, or changes/corrects a property then the new Resume will misread the state saved by the older release. If we allowed this, OR might crash or do unexpected things, so we check and disable it.

You can override this check when debugging, as Resuming is a valuable tool for testing.

Hope that makes sense,


Yes, I get that, but the save was done on the X release, and I'm trying to open with the X release. During the same run session that I saved in, I can see a save listed, but it's always invalid.

Is there a switch to force debug mode?... I didn't see one in the menu.

#14 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,359
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 22 February 2013 - 09:52 AM

 cjakeman, on 21 February 2013 - 11:59 PM, said:

 eolesen, on 21 February 2013 - 07:09 PM, said:

Is there a trick to getting save files to work? . . .

Yes - Don't update to a newer release.

That sounds harsh, but anything smarter is a major piece of work. I'm afraid.


What I do is set up folders named after the version number and each has only that version in them. Then a different folder used as the target of a desktop shortcut (think of it as a Run Time folder). Whichever version I want to use is simply copied from its version folder into the run time folder (after clearing it out) and run by clicking on the one shortcut. The sum of all of this is I can run any version I want, so long as I have it on hand, a trick that's rather useful when testing and I don't have my desktop cluttered with a whole lot of shortcuts that see little use.

#15 User is offline   Eldorado.Railroad 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 983
  • Joined: 31-May 10
  • Gender:Male
  • Country:

Posted 22 February 2013 - 10:31 AM

 James Ross, on 21 February 2013 - 10:42 AM, said:

1. Macros I'm afraid I cannot name any macro software known to work with Open Rails, as I have never used any myself. That said, any macro software that sends distinct key-down and key-up commands though the standard key-simulating Windows API call keybd_event will work if there is a pause between down and up events of more than one frame. I admit this isn't obviously useful information but I know this works because I've done it with my own code and I expect other variants of simulating input will not work because Open Rails samples the keyboard state (like most games, I believe), rather than listening for change messages.


I found this AutoHotKey, and if you scroll down to the "Repeating or Holding Down a Key" section you will find a reference to the "To hold down or release a key" which is the method required for Open Rails. I do not have this application installed, but it is Open Source GNU General Public License. If it is painless to install and uninstall I will try it out with Open Rails to see if it works.

Thanks for letting us know what the "secret" is! I wondered why sending keystrokes was a hit and miss affair, which most of the time would not work. I should have asked and I would have seen what the impediment was.

Thanks,

Eldorado

#16 User is offline   Eldorado.Railroad 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 983
  • Joined: 31-May 10
  • Gender:Male
  • Country:

Posted 22 February 2013 - 10:37 AM

 PM1225, on 20 February 2013 - 03:56 PM, said:

I wonder if there is anything here that is useful. These are the raildriver people.

http://www.piengineering.com/xkeys.php



Fred,

I would try this first. It is free and programmable.

I like the X-Keys idea because it cuts back on the number of keys the user has to deal with and avoids trouble of a less careful user trying to sabotage your setup!

Eldorado

#17 User is offline   cjakeman 

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

Posted 22 February 2013 - 10:40 AM

 eolesen, on 22 February 2013 - 09:35 AM, said:

Yes, I get that, but the save was done on the X release, and I'm trying to open with the X release. During the same run session that I saved in, I can see a save listed, but it's always invalid.

Is there a switch to force debug mode?... I didn't see one in the menu.

I just tried Save and Resume for one of the MSTS routes - Hisatsu:Short Passenger Run - without problem. I used v1427, which is the version in your error message. It looks as though OR is tripping up over something in your route. Would you be able to find any common factors between routes and activities that resume properly and those that don't?

Regarding debug mode, I meant running the RunActivity.exe from within the Visual Studio IDE. Not sure if you have that available, but it is free.

Hope that helps,

#18 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,580
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 22 February 2013 - 10:56 AM

 cjakeman, on 22 February 2013 - 10:40 AM, said:

I just tried Save and Resume for one of the MSTS routes - Hisatsu:Short Passenger Run - without problem. I used v1427, which is the version in your error message. It looks as though OR is tripping up over something in your route. Would you be able to find any common factors between routes and activities that resume properly and those that don't?

Regarding debug mode, I meant running the RunActivity.exe from within the Visual Studio IDE. Not sure if you have that available, but it is free.

Hope that helps,


I have yet to get resume to work on any route, and the only version I have been using is 1427.

Even in earlier X versions, saves have always came up as invalid. I'll try the stable release to see if it's doing the same.

#19 User is offline   Csantucci 

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

Posted 22 February 2013 - 11:48 AM

I never had problems with Resumes. Save must have the "Valid" checkbox checked, and it is checked if I resume with the same ORTS release I saved.
What would be desirable is a "Release" column in the Saves list, indicating the release used to create the save.

#20 User is offline   cjakeman 

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

Posted 23 February 2013 - 01:54 AM

 eolesen, on 22 February 2013 - 09:35 AM, said:

Yes, I get that, but the save was done on the X release, and I'm trying to open with the X release. During the same run session that I saved in, I can see a save listed, but it's always invalid.

Thinking some more about it - What does your file Revision.txt contain, please?

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