How Can We Help?
Command Calls – Create/Execute Custom Scripts & Commands
Required version: 3.9.6
As LBVR progress through the years, we sees a good number of new VR related hardware coming to the market. Often, to ensure fast and flawless operation, the new hardware have to be integrated in Synthesis. As long as we are working toward native support for as much hardware as possible (KATVR + KAT I/O as an example), we feel there is so much more you could achieve if you have the right tools to unleash your creativity. This is what the “Command Calls” are purposed for. Working with hardware in LBVR normally comes down to 4 simple events:
- Session is started
- Game is started
- Game is closed
- Session is ended
An extra 5th event is -> manual actions
What if you could write a simple code in ANY programming language and attach it to any of the 4+1 events?
Idea 1) You can turn the Graphic Card color to RED when the station is occupied and back to GREEN when its free
Idea 2) In a conversation with the studio behind an upcoming game title utilizing the “fear of height” (like Richie’s Plank Experience), we came up to the idea it will be great if they could send a simple UDP START message when a person is falling down and STOP when the person “reach the destination” 🙂 If the develop do this (which is pretty easy for them), we’ll develop a very tiny open source app that will let you catch the START/STOP states and convert that to turning the power on/off for one the PC USB ports. On that port, you could attach a USB powered fan and that will have a great impact to the customer immersion with a very tiny investment on your end.
Idea 3) If you are running hydraulic racing simulators, you have to use SimTools. What if SimTools can be taken care of by a script or by a direct call to the SimTools executable?
Idea 4) Start the Vive Wireless Adapter software along with the session and stop it once the session is over.
The “Command Calls” event system makes it all possible.
- Go to “Administration >> Advances Settings >> Extrass (tab) >> Customizations >> Command calls”
- Add Command: Click the Three Dots on the top right corner and click Add Command
- Full Path To the Command Executable – please ensure this file exists under the very same location across all the stations where it matter. You can specify anything that can be executed, but what mostly makes sense are exe files and bat scripts.
- Arguments to be passed to the command – if you attach the same executable to multiple command calls, you can use arguments to tell the executable what is the reason for calling it. Every gets a default, non-adjustable argument:
- Enabled – must be on, unless you need it off (yup – priceless description)
- Allow As Interface Option – you’ll be able to execute the command at any time:
- Most of the settings under the “Conditions” tab are very self explanatory and aligns with the described “event” based logic. One to specifically note is “Upon game start – wait for the command to complete“. Normally, Synthesis will start your commands and ignore any response. However, if the event is fired automatically upon starting a game, it could be important to wait for your executable to end before Synthesis continue with its normal job. The maximum time Synthesis could stay on hold here is 60 seconds. Unless you hit a case where you need this wait behavior, it is better to keep the option disabled.
In our example, the content of the startcmd.bat file is:
- START %windir%\notepad.exe
- START %windir%\system32\calc.exe
For test purposes, you can attach it to a session start. Then, the opposite endcmd.bat will be:
- taskkill /f /im notepad.exe
- taskkill /f /im Calculator*
As result, Notepad and the Windows Calculator will open upon start of the session and close along with the session end.