Jump to content
LaunchBox Community Forums

VJoy automation for Steam games


Recommended Posts

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.

1.jpg

2.jpg

3.jpg

4.jpg

5.jpg

Link to comment
Share on other sites

  • 1 month later...

Hey kgold0

I'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.

Link to comment
Share on other sites

  • 4 months later...

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.

Link to comment
Share on other sites

  • 2 months later...

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!

Link to comment
Share on other sites

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 by kgold0
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...