Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
LawsonThompson

Registered:
Posts: 625
Reply with quote  #1 
I think spawn_external_program is going to become my all-time favorite feature! Here are some ideas I'm kicking around for LAN based games via psexec and AutoHotKey...

Basically I want to make the server PC trigger events on other PCs on the bridge!

  • Force Main Screen: Have a "must see" event on the forward screen? Server calls out to psexec or AutohotKey to click on the Front view button on Helm, then locks out display switch buttons on Helm and Weapons temporarily with an invisible "always on top" overlay while the action plays out.
  • Chorus of voices: Trigger an audio or video to play on every station at the same time. "We are Borg..." will have reverb just due to slight timing differences in the trigger of course.
  • Observer action view: Make a copy of Artemis.exe named Artemis-observer.exe, run it full screen windowed on the server main screen, with Observer selected, and have game-opening or game-ending events swap which .exe is in the foreground on the fly.
  • Best. Training. Video. Ever. : Create a self-running training mission which can literally demonstrate the entire bridge by clicking various things, thanks to timed Autohotkey scripts and psexec.
  • Second displays as set dressing: Designate a "set dressing" PC with multiple displays and an Autohotkey listener, which displays various images or graphics based on game events, sort of an "LCD as DMX" idea.
I've got some coding to do!   [comp]

Ref: 

https://autohotkey.com/board/topic/54408-remoteahk-execute-ahk-scripts-on-remote-computers-tcpip/

https://autohotkey.com/board/topic/33167-using-a-portion-of-a-touchscreen-as-a-button/#entry210491


__________________
----
Visit us at http://www.ltebridge.com
ryleyra

Registered:
Posts: 3,007
Reply with quote  #2 
I can see some big ideas with the spawn_external_program command. You can overcome the limitation of playing video or sound only to the mainscreen by triggering an executable that sends a command to a listener on another PC to switch a Mainscreen client to VLC. You could spawn a video that shows a "warping" effect as you travel to another sector. (Or the trip through a Jump Gate) Or start a script that copies an Artemis scripted mission and edits a few variables here and there.

Remember, you can specify arguments to the program. You can change what video is played or action is taken based on events in the script.

And never mind the way this could be used with my Away Team app! [biggrin]
k9lego

Registered:
Posts: 88
Reply with quote  #3 
Quote:
Originally Posted by ryleyra
I can see some big ideas with the spawn_external_program command. You can overcome the limitation of playing video or sound only to the mainscreen by triggering an executable that sends a command to a listener on another PC to switch a Mainscreen client to VLC. You could spawn a video that shows a "warping" effect as you travel to another sector. (Or the trip through a Jump Gate) Or start a script that copies an Artemis scripted mission and edits a few variables here and there.

Remember, you can specify arguments to the program. You can change what video is played or action is taken based on events in the script.

And never mind the way this could be used with my Away Team app! [biggrin]

Soo excited for your game!! [smile]
CattailNu

Registered:
Posts: 77
Reply with quote  #4 
Custom score tracking/summation engine.
Mail/twitter/facebook server:  (hey, come play, we are playing, we need you...)
Show map (http://cattail.nu/artemis/rpg/artemis_spaceship_bridge_simulator_deep_space_station_map.png)
Run super-customized dmx/hydraulics controllers.
Fire usb rocket launcher.
Xavier Wise

Registered:
Posts: 1,141
Reply with quote  #5 
Could you use this to start up a webcam link? I am thinking live hailing. Coupled with a new comms button, it could give different crews he chance to have a video conversation. You could also do it with a GM where players hail a ship and the GM answers with a live video feed.
__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,955
Reply with quote  #6 
The only trick is that Artemis doesn't have any way of taking the main screen focus back - the videos were easy because we knew exactly how long they would run before they would close again. Any arbitrary program has no way to tell Artemis that it's done and Artemis has no way to know when it's done. Something like a webcam would be pretty cool, but I'm not quite sure how to end the hail.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
ryleyra

Registered:
Posts: 3,007
Reply with quote  #7 
Well, as long as the video ends and Artemis is in fullscreen mode, there should be no problem with focus since the video/webcam can terminate and Artemis reappears behind it. The bigger issue is that there is no way to tell the script it's safe to start running again.

Probably the best way to handle that is with a second Comms button. You have a Comms button to trigger the webcam and then a second one that Comms has to hit when the "hail" ends. It might be possible to send a command through the interface to terminate the webcam (thus giving up the focus) but I'm not sure.

It's also possible that the server screen will get out of sync and someone will have to manually force Artemis to take back focus. And that will have to be done manually if Artemis is in windowed mode. It would be a whole lot nicer if there was a script command that told Artemis to grab focus.

Depending on the secondary application and the command line options available, it might be possible to make IT give up focus. As long as no other apps are running on the server that should work. And don't forget that this works only with the server computer by default, so for multiship games to use this to communicate with each other, you'd have to write an app that intercepts the command and send it to another computer across the network, like LawsonThompson suggested in his first post. I thought of writing my own, he seems to have some programs that will already do that.


xscape

Registered:
Posts: 5
Reply with quote  #8 
I'm trying to find out the best way to display a Video on the main screen from a mission script, preferable with a Comms button. I see that there used to be a incoming_message but it was removed and now it only plays audio files (from what I can find) Any help is greatly appreciated. 
ryleyra

Registered:
Posts: 3,007
Reply with quote  #9 
The incoming_message command only ever played audio files, it never played video. This command used to create a button on the Comms display that played the audio file, but it was removed when the new interface with Comms buttons was introduced. In order to achieve the same effect, you have to use the play_sound_now command (which plays a sound file immediately) in conjunction with a Comms button.

For example, the following event is from my re-write of "The Waning Dark", and displays a button that will play the sound file for Dr. Bernard's introduction into the game: 

  <!-- respond to Doctor Barnard's button press -->
  <event>
    <if_comms_button text="Doctor Barnard" />
    <set_object_property property="musicObjectMasterVolume" value="0.25" />
    <set_object_property property="commsObjectMasterVolume" value="1.00" />
    <play_sound_now filename="./dat/Missions/MISS_TheWaningDark/Barnard1.wav" />

    <clear_comms_button text="Admiral Grankov" sideValue="2" />
    <clear_comms_button text="Doctor Barnard" sideValue="2" />
    <clear_comms_button text="Borland Cargo" sideValue="2" />
    <set_comms_button text="Back" sideValue="2" />
    <set_comms_button text="Delete" sideValue="2" />
    <set_variable name="whichBackDelete" value="2"/>
  </event>

In addition to playing the sound file, the event also deletes the buttons associated with the other characters in the game, and displays a "Back" and "Delete" button, similar to how the original incoming_message command worked. I am still hoping that Thom will reintroduce incoming_message as a sort of shortcut for all of the above.

At any rate, to play a video, you will need to use the spawn_external_program command, as described in this thread. You will ALSO need an app that will play videos, such as VLC or Media Player. To play a video using Media Player the command would look something like this:

<spawn_external_command id="Command1" name="dat/VLCPortable/VLCPortable.exe" arguments="VLCPortable --no-video-title-show --play-and-exit --fullscreen dat/Missions/MISS_Example/MyExampleFile.avi" />

Since VLC doesn't come with Artemis, this example assumes you have downloaded VLCPortable and installed it in the dat directory in the Artemis installation. You can also specify the entire path to Media Player or the like, if you want. For the example, there is also a video file MyExampleFile.avi in the folder dat/Mission/MISS_Example. You would also used the specified arguments to play the video and close it, without a title, and display it fullscreen. (On top of the Artemis game)

Media Player would use different arguments, assuming Media Player even has the equivalent command line functions. (I think Windows Media Player doesn't have a close on exit option)

I'll note that incoming_message used the .ogg format, while play_sound_now only allows .wav format. Since .wav files are much larger than .ogg or even .mp3, I tried to use Media Player to play the original .ogg files in my re-write. The fact that Media Player wouldn't close after the sound played is one reason I gave up on that plan.

Again, I'm hoping eventually incoming_message is reintroduced, and both that and play_sound_now are made to play .wav, .ogg and .mp3 files.
xscape

Registered:
Posts: 5
Reply with quote  #10 
Thanks ryleyra, 
I'll look for another way to do this then. Hopefully in future versions he'll add a feature for this. 
I already had Audio triggers from the Comms buttons, but I really wanted to be able to display a video image
 
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,404
Reply with quote  #11 
Quote:
Originally Posted by xscape
Thanks ryleyra, 
I'll look for another way to do this then. Hopefully in future versions he'll add a feature for this. 
I already had Audio triggers from the Comms buttons, but I really wanted to be able to display a video image
 


You can use the Comms buttons to play video messages on command. Your server must have VLC installed. Your script must launch VLC pointed to the location where the video is stored. This works fine, but Thom really only intended for the server to spawn external programs, so the video can only play on the server Main Screen.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.