[suggestion] - Execute after / Execute before

it would be useful an advanced option in the game profile in which you can insert a script path to run before the game starts and one to run after the game exits

The first can be useful to run auxiliary tools (simulators often require them), the second can terminate these tools and also can close SteamVR, returning to PE

Even if PE is closed when the game exits, it may create a temporary hidden .bat to start the game, ie:

temp.bat 

mystartupscript.cmd
thegame.exe
myendscript.cmd
4 Likes

This is really super nice idea and I remember @mirage335 suggested this a while ago.
Its actually not that difficult to implement either.
Ive noted it down and will make sure to add it during next week!

Thanks

4 Likes

maybe you could allow running an alternate program instead of through steam, modded skyrim as an example needs to be started with the skse script extender which will then fire up the game and steamvr as needed.

2 Likes

Sure, having before-during-after scripts gives all kinds of possibilities.

Although, the selection to add scripts will for now be made by editing the fields by using my own virtual keyboard and simply typing the full paths to scripts you want to get added. Having a browse to file-feature in VR (like watching movie apps has such as Playa VR) would be cool but it will need much more time to implement…

3 Likes

some of those more advanced features does not have to be in vr, even if it is nice that it could be done. but there are good desktop tools for copy pasta editing which will be easier to use with references and script editors etc.

3 Likes

Indeed.

By the way, thanks a lot again for the Newtonsoft JSON recommendation and the example code. I imported the free Newtonsoft from the Github (and not from Asset store which is licensed), so I assume its free and ok to use?

It made it so easy to create Classes and read/parse multi-layer JSON collection files. You won’t imagine how much I struggled with this already months ago using the built in JSON handler, and kinda gave up :slight_smile: It really saved me tons of time and opened up for possibilities! Big thanks :grinning:

3 Likes

You’re welcome.

The github version is under an MIT license so in my understanding it is safe to use for commercial projects, I’m not a lawyer though and you have a company legal staff that can help you with that.

The MIT License (MIT)

Copyright (c) 2007 James Newton-King

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

4 Likes

Yeah thats how it sounds at least. Im not editing the script files at all, so it should be fine I guess.

3 Likes

Such a ‘hook’ mechanism is extremely useful for more than just running pre/post VR app support applications - I can’t think of the most important use cases off the top of my head right now, but there are workarounds that can’t be implemented efficiently any other way.

Some lesser example that come to mind are forcing SteamVR not to complain about ‘offline mode’, creating/cleaning randomly named temporary directories, and setting environment variables to point to such temporary locations.

I suggest keeping these in a dedicated directory, somewhere obvious, like %LOCALAPPDATA% or the Pimax ‘Program FIles’ directory.

However, hooks do not, unfortunately, negate the need for some kind of VirtualDesktop available from Pimax Experience which is independent of runtimes like SteamVR.