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: -----

#1 Inactive_PM1225_*

  • Group: Status: Passengers (Obsolete)

Posted 20 February 2013 - 05:12 AM

Here's what I'm trying to accomplish - set up a train sim for use in a museum for use by visitors. In the interest of simplicity, we'd like for it just to run one or two "canned" activities with the emphasis on easy use. We'd like to see the track monitor window, the display switch window and the display train operations window (that's F4, F8 and F9) open upon starting. We're aware that some sort of macro editor such as macroworks 3.1 or jitbit may work for us, but don't really know if there are any options in ORTS for how it starts up.

Any suggestions or words of wisdom?
Thanks
PM1225

#2 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 20 February 2013 - 10:55 AM

Hi PM1225,

View PostPM1225, on 20 February 2013 - 05:12 AM, said:

Here's what I'm trying to accomplish - set up a train sim for use in a museum for use by visitors.

You don't say what you want your visitors to do and, perhaps, to not do.

The existing Replay facility will repeat a saved activity and the user can switch the camera views and steer the cameras. There is currently nothing to stop the user from also adjusting the cab controls so the train will no longer follow its recorded trajectory. It might then fail to stop in the next station.

You would probably want a batch file to kill off the Replay once it has had time to complete the activity and then restart from scratch.

I have a small extension to OR, tested but not yet committed, which adds a narrator's sound track to the Replay.

Hope that helps,

#3 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 20 February 2013 - 11:26 AM

We have had some team discussions about what kind of new features might be added to activity events but we've been too busy trying to complete the MSTS emulation to turn any attention to completely new things like that. I mention this as one discussion was about what circumstances were there that would be suitable to trigger playing a sound file of a voice message... we "talked" about routine radio chatter that occurred at random times, the dispatcher informing the player he is going to be stuck in the hole until some hotshot train passes, stuff like that. WHEN we get to the point of adding such things your museum "demo" could be enhanced with the playing of explanation messages, anything from "Now Press the D key" to "Railroad signaling blah blah blah...". But we're just not there yet.

#4 User is offline   Eldorado.Railroad 

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

Posted 20 February 2013 - 12:05 PM

View PostPM1225, on 20 February 2013 - 05:12 AM, said:

We'd like to see the track monitor window, the display switch window and the display train operations window (that's F4, F8 and F9) open upon starting. We're aware that some sort of macro editor such as macroworks 3.1 or jitbit may work for us, but don't really know if there are any options in ORTS for how it starts up.


If you have any success with sending keys via software to the render window (yeah, the one where the trains are!) please let us know. I have tried a scripting program with Open Rails to automate certain things like keypresses and that has not been very successful at all. The only thing that might work is a programmable keyboard (hardware) that can send sequences to the computer and thus any program. I have not found a programmable keyboard that will resend a timed sequence of keys without user intervention (this means the user needs to be pressing the trigger key).

I would clearly support/prefer some kind of scripting language for Open Rails if it were native to the program.

Thanks,

Eldorado

#5 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 20 February 2013 - 12:55 PM

View PostGenma Saotome, on 20 February 2013 - 11:26 AM, said:

We have had some team discussions about what kind of new features might be added to activity events but we've been too busy trying to complete the MSTS emulation to turn any attention to completely new things like that.

I remember that thread and made some notes to help in developing activities.

However we were talking then about sound files triggered by events in the simulator.

As I said above, I have a small extension to OR, tested but not yet committed, which adds a sound track to OR. The sound track isn't synchronised to the sim. It's just a wma file (one for each replay) played through the default player (usually Windows Media Player) that starts playing when the Replay starts.

Sounds (!) just right for a museum installation :-)

#6 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 20 February 2013 - 12:56 PM

I've managed to use Delphi5 to grab the active window handle of the RE, and send keystrokes using the SendKeys function.

I can grab the active window handle on OR, but sending keystrokes doesn't work. Odd...

#7 Inactive_PM1225_*

  • Group: Status: Passengers (Obsolete)

Posted 20 February 2013 - 03:56 PM

View PostEldorado.Railroad, on 20 February 2013 - 12:05 PM, said:

If you have any success with sending keys via software to the render window (yeah, the one where the trains are!) please let us know. I have tried a scripting program with Open Rails to automate certain things like keypresses and that has not been very successful at all. The only thing that might work is a programmable keyboard (hardware) that can send sequences to the computer and thus any program. I have not found a programmable keyboard that will resend a timed sequence of keys without user intervention (this means the user needs to be pressing the trigger key).

I would clearly support/prefer some kind of scripting language for Open Rails if it were native to the program.

Thanks,

Eldorado


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

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

Also have a look at this video: http://www.jitbit.co...video-tutorial/

Fred

#8 Inactive_PM1225_*

  • Group: Status: Passengers (Obsolete)

Posted 20 February 2013 - 04:11 PM

View Postcjakeman, on 20 February 2013 - 10:55 AM, said:

Hi PM1225,


You don't say what you want your visitors to do and, perhaps, to not do.

The existing Replay facility will repeat a saved activity and the user can switch the camera views and steer the cameras. There is currently nothing to stop the user from also adjusting the cab controls so the train will no longer follow its recorded trajectory. It might then fail to stop in the next station.

You would probably want a batch file to kill off the Replay once it has had time to complete the activity and then restart from scratch.

I have a small extension to OR, tested but not yet committed, which adds a narrator's sound track to the Replay.

Hope that helps,


let me ponder some of the information you kind folks have posted here. What we are trying to come up with is a simplified activity that your average joe-blow museum visitor can sit down with and not be intimidated by when he/she sits down to play. I've got a REALLY simple activity I'm working on, GE 25 tonner, one boxcar and a caboose on about 2 miles of track with one stub siding. Thinking about written directions on how to run down to the switch, throw it behind the caboose, back into the siding and cut the cars off. Congratulations - you're done -good job, etc. Next person, please. Maybe add a second activity that is more difficult once you've built up their confidence.

I don't know how I got stuck with this job. . . . . . .

Fred

#9 User is offline   James Ross 

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

Posted 21 February 2013 - 10:42 AM

Okay, firstly let me thank you for using Open Rails!

There are a couple of candidates for setting up the environment you want:

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.

2. Saved games Although there exist no options to control the initial visibility of the aid windows yet, their position and visibility is saved in saved games. Thus, you can start the activity you've created, set up the UI exactly how you'd like, and hit Save (F2). Then, resume the same saved game each time.

In either case, you'll need to launch Open Rails with some command-line options that you might not be familiar with, so I'll describe the relevant ones here:

RunActivity "C:\Path\To\The\Activity.act" This starts the game with the given activity.

RunActivity -resume "C:\Path\To\The\SavedGame.save" This starts the game with the saved game.

You can view these paths by starting an activity or resuming a saved game and looking at the start of the log/text window.

And finally, we're quite willing to add options that will make things easier for you - like setting the initial window visibility - if you have problems with other suggestions.

#10 Inactive_PM1225_*

  • Group: Status: Passengers (Obsolete)

Posted 21 February 2013 - 11:14 AM

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

Okay, firstly let me thank you for using Open Rails!

There are a couple of candidates for setting up the environment you want:

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.

2. Saved games Although there exist no options to control the initial visibility of the aid windows yet, their position and visibility is saved in saved games. Thus, you can start the activity you've created, set up the UI exactly how you'd like, and hit Save (F2). Then, resume the same saved game each time.

In either case, you'll need to launch Open Rails with some command-line options that you might not be familiar with, so I'll describe the relevant ones here:

RunActivity "C:\Path\To\The\Activity.act" This starts the game with the given activity.

RunActivity -resume "C:\Path\To\The\SavedGame.save" This starts the game with the saved game.

You can view these paths by starting an activity or resuming a saved game and looking at the start of the log/text window.

And finally, we're quite willing to add options that will make things easier for you - like setting the initial window visibility - if you have problems with other suggestions.


Solid gold. Thank you, James

  • 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