kgold0 Posted March 7, 2017 Share Posted March 7, 2017 Lately I've been playing with VJoy to get all my Steam fighter games working with my Xtension arcade cabinet (the controls output keyboard button presses). I came up with this janky solution to start VJoy up when you run a specific game and then kill it when you're done playing. I hope this helps someone. Just be sure to leave one of your controller buttons (for me the EXIT button, which is ESC on the keyboard) unassigned to Vjoy so you can push that to unpause the batch file (the rest of your buttons won't be able to interact with the pause press any key if you select the block key function on Vjoy). This assumes you've already installed and set up vjoy to play with certain games and it's annoying to leave on because you have it blocking keypresses. You want to automate things from BigBox. Create a folder c:\vjoybatch Create a batch file in there called vjoybatch.bat and put the following in it (may need to change the VJoy path name depending on where you installed it and the steam path name depending on where you installed that): @echo off echo Starting VJoy to emulate virtual joysticks... cd "c:\program files (x86)\VJoy" Start /MIN VJoy echo Running Steam game... d:\steam\steam steam://rungameid/%1 echo After the game is done, please press EXIT pause taskkill /im vjoy.exe /f Now in Launchbox, go to the Steam game you want to run with VJoy. Edit it and in the Emulation tab Add a new Emulator called VJoyBatch. Emulator name: VJoyBatch. In Emulator Application path browse for c:\vjoybatch\vjoybatch.bat. Click Don't use quotes, use file name only. Under associated platforms put in Windows. In the Launcher tab under ROM file, erase "steam://rungameid/" and leave the trailing number there; that's your steam game ID. Now the last thing you have to do is go to your c:\users\(username)\launchbox\ folder and create an empty file named your game ID. For instance, say the game ID is 35321. The ROM file in the Launcher tab should simply say 35321 and in the Launchbox folder create a blank file named 35321 (make sure you don't make it 35321.txt; it should just be plain old 35321). If you don't do this step bigbox/launchbox will complain that it can't find the ROM file. After you do all this stuff, when you run this specific game from BigBox, the batch file with run VJoy, run the steam game, then pause for input. After you've finished playing the game, push any key (that isn't bound to your vjoystick) to unpause and the batch file will kill VJoy and you will return to BigBox. The little joystick icon may still show briefly in the bottom right toolbox but it will disappear. Quote Link to comment Share on other sites More sharing options...
neohusky Posted May 3, 2017 Share Posted May 3, 2017 Hey kgold0I've got a Cabinet and running a few steam fighting games. I've got a keyboard encoder and a pair of u360 sticks. I've mapped all my controls using x360ce which emulates an xbox360 controller and this tends to work rather well most steam games. Quote Link to comment Share on other sites More sharing options...
kkooly Posted October 1, 2017 Share Posted October 1, 2017 kgold0, Thank you so much for this. Between your instructions and screenshots I was able to get this to work. Its not pretty but its a solution since I havent found any other solutions for automating the vjoy app opening and closing when opening games from launchbox with my ipac device. Quote Link to comment Share on other sites More sharing options...
thajo Posted December 9, 2017 Share Posted December 9, 2017 Hello Kgold0, when I select the game I get the following dos screen message: Starting VJoy to emulate virtual joysticks... Running Steam game... 'C:\Program' is not recognized as an internal or external command, operable program or batch file. After the game is done, please press EXIT Press any key to continue . . . The only key I am able to press is the designated EXIT key to exit out. It is launching vjoy but not the game. Any thoughts? here is my vjoybatch.bat: @echo off echo Starting VJoy to emulate virtual joysticks... cd "c:\Program Files (x86) \VJoy" Start /MIN VJoy echo Running Steam game... C:\Program Files (x86)\Steam\steam steam://rungameid/%1 echo After the game is done, please press EXIT pause taskkill /I'm vjoy.exe /f any help would be great. Thanks! Quote Link to comment Share on other sites More sharing options...
kgold0 Posted December 9, 2017 Author Share Posted December 9, 2017 (edited) I think it's this line: C:\Program Files (x86)\Steam\steam steam://rungameid/%1 I haven't played with this in awhile but maybe you could replace "program files (x86)" with "progra~2" which is how dos handles long directories especially with spaces and weird characters which it doesn't particularly like. I believe progra~1 refers to program files while progra~2 refers to program files (x86). If that doesn't work maybe use quotes. Edited December 9, 2017 by kgold0 Quote Link to comment Share on other sites More sharing options...
thajo Posted December 9, 2017 Share Posted December 9, 2017 Thanks for your response. I took the steam folder out of program files (x86) because I thought that might be the issue. my batch file now looks like this: @echo off echo Starting VJoy to emulate virtual joysticks... cd "c:\Program Files (x86)\VJoy" Start /MIN VJoy echo Running Steam game... c:\Users\username\Documents\Steam\steam steam://rungameid/%1 echo After the game is done, please press EXIT pause taskkill /im vjoy.exe /f I still get the message: 'C:\Users\username' is not recognized as an internal or external command, operable program or batch file. I think the issue is with "steam://rungameid/%1" but I don't know anything about programing.... so any insight is great. thanks again for you help Quote Link to comment Share on other sites More sharing options...
thajo Posted December 9, 2017 Share Posted December 9, 2017 kgold0, Thanks again for all your help. I'm loving my xtension arcade. I figured it out with this batch: @echo off echo Starting VJoy to emulate virtual joysticks... cd "c:\Program Files (x86)\VJoy" Start /MIN VJoy echo Running Steam game... Start steam://rungameid/%1 echo After the game is done, please press EXIT pause taskkill /im vjoy.exe /f Hope this helps anyone else with the same issue. Quote Link to comment Share on other sites More sharing options...
kgold0 Posted December 9, 2017 Author Share Posted December 9, 2017 The issue previously was that username is 9 characters and Ms dos only likes 8. So it should have been userna~1. I know, it's stupid. But those were its limitations when it was made. Quote Link to comment Share on other sites More sharing options...
wmcmahon Posted December 30, 2019 Share Posted December 30, 2019 This seems to be working for most of my games (Soul Calibur 6 & Mortal Kombat 11), but for Ultra Street Fighter 4 it launches the game, then brings the batch window back ontop instead of leaving it behind the main game window. Any idea how to fix this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.