ORTS command line switches?
#1 Inactive_PM1225_*
Posted 20 February 2013 - 05:12 AM
Any suggestions or words of wisdom?
Thanks
PM1225
#2
Posted 20 February 2013 - 10:55 AM
PM1225, on 20 February 2013 - 05:12 AM, said:
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
Posted 20 February 2013 - 11:26 AM
#4
Posted 20 February 2013 - 12:05 PM
PM1225, on 20 February 2013 - 05:12 AM, 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
#5
Posted 20 February 2013 - 12:55 PM
Genma Saotome, on 20 February 2013 - 11:26 AM, said:
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
Posted 20 February 2013 - 12:56 PM
I can grab the active window handle on OR, but sending keystrokes doesn't work. Odd...
#7 Inactive_PM1225_*
Posted 20 February 2013 - 03:56 PM
Eldorado.Railroad, on 20 February 2013 - 12:05 PM, said:
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_*
Posted 20 February 2013 - 04:11 PM
cjakeman, on 20 February 2013 - 10:55 AM, said:
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
Posted 21 February 2013 - 10:42 AM
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_*
Posted 21 February 2013 - 11:14 AM
James Ross, on 21 February 2013 - 10:42 AM, said:
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