Massivebasset Posted November 30, 2016 Share Posted November 30, 2016 I have an IPAC on arcade sticks and am trying to load Headsoft Vjoy profiles at the start of Castle Crashers, then exit out at the end. The start vjoy works fine, and the end vjoy works fine when I run them separately, but if I tag the "End Vjoy" application to run after, it seems to run both additional apps immediately once I run the game. In the attached picture, I have End Vjoy not automatically running, because its the only way I could get it to work. Ive tried running Castle Crashers both as the runsteamid string and pointing it to the executable, but it seems to do the same thing. Its like its not pausing in between the before and after runs. Is there any other way to try and automatically run the vjoy string? My only other thought is to do it outside of Launchbox through Closemul or something like that, but Id really like to just do it in Launchbox as it seems like it has the capability, its just not working for me. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
ckp Posted November 30, 2016 Share Posted November 30, 2016 (edited) Hi @Massivebasset, how are you exiting the game exactly? Edit: Oh, I just noticed you said your problem is that it runs both BEFORE. That's odd. Maybe remove both and try adding them again making sure to set before and after for each? Edited November 30, 2016 by ckp Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted November 30, 2016 Author Share Posted November 30, 2016 I'm exiting with the exit game option inside the game, nothing fancy. I can try redoing the additional apps, may get a chance tomorrow, but there's not like there's a lot of options that I could have chosen incorrectly. Quote Link to comment Share on other sites More sharing options...
ckp Posted November 30, 2016 Share Posted November 30, 2016 Yeah, I'm just wondering if perhaps somehow the xml file that stores this is messed up and starting over may "clean" it. I don't have this problem at all with my before and after apps. Quote Link to comment Share on other sites More sharing options...
ckp Posted November 30, 2016 Share Posted November 30, 2016 Also, if you are exiting the game inside the game with its own exit option, I'm not so sure the LB "after" setting will fire. Can you also try exiting the game with the escape key or controller automation exit? Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 I removed both and readded, same behavior. Next ill try adding a whole new game entry for Castle Crashers, and see if that does it. Getting the after to fire "after" is obviously what I would want eventually, but if I cant get it to stop firing before the game launches, then it doesnt really matter. Any other thoughts on how to prevent it from going off immediately? Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 Can you try running a batch file before and after instead, as a test? Open notepad and put this in it: echo %time% >> c:\temp\log.txt Make sure you create a folder named temp in your C drive so the batch file can write the time in it. Save the notepad file in c:\temp as test.bat Add the batch file test.bat to a before and after on the game you re trying. Launch your game, wait a couple minutes, exit your game. Open the file log.txt and see if it wrote two different times or the same time twice. I just want to see if the before and after is really running both at the same time for you. Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 Good idea. I'll try that next chance I get. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 also, i see in your screenshot that you are launching a Windows game. so i assume no emulator is set in the emulator tab. so what is the launcher tab actually launching? Is it launching some exe program that only runs briefly to launch some other process? maybe the process that you have set only runs briefly and then exits? Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 Right, its a steam import. Originally it was launching the steamid link, Itried changing it to the actual exe of the game, thinking along those same lines that the before/after may be tied to the item in the launcher path. Castle.exe is whats it pointing to, and what the process is called if I check it out while its running. I made the logging batch file, and saw cmd prompt windows pop one after another when launching the game. Heres some more screens to help. Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 Hmm, so my guess is that castle.exe runs for about 1-2 seconds, exits, and then maybe runs again. That's a problem. This seems like Steam games could be a problem for LB additional apps feature. I've not tried additional apps with my Steam games, but I did plan to for some of them and now I'm concerned that I'm going to run into this issue The bottom line here is that I "think" LB is doing what it's told. I think castle.exe runs, exits, and runs again. You could confirm this by adding the process id column to task manager and watching closely to see if castle.exe has one id very briefly for a second or two and then changes to a different pid. That would prove it runs, exits, runs. I have to assume that this is what is going on here. I wonder if @Jason Carr has any thoughts on this? Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 (edited) seems like you need an option in the startup app to delay the startup so you can have it start x seconds after the app starts. edit: or maybe the option would be to delay the After part. or both Edited December 1, 2016 by ckp Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 Yeah, a delay may be all it needs, like dont check for exit app until at least 5s past startup or the like... I thought the start and relaunch was the issue with it trying to run from the steam url, and had hoped pointing it directly to the castle.exe would have fixed that possibility. But maybe it is reopening itself for some reason. Im at work and remoting into my arcade machine, so doing watching the process ID would be tricky, I can check that out when I get home and report back. Thanks again for the help. Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 (edited) do you already have Steam running before you try launching this game from LB? if you don't maybe try that to see if it prevent the double castle.exe launch? Edited December 1, 2016 by ckp Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 Im like 95% certain steam was already up, will play with that as well and report back. Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 i would file a bitbucket ticket on this. seems like LB may need a way to deal with this for Steam or other games with Steam like launchers. at this point though, i guess we don't know if this a rare instance or if it will happen for all steam games. i'm gonna have to try this with my steam games when i get a chance on friday or the weekend. Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 just for fun, if you are able to, can try try the batch file on a different steam game to see if the same thing happens? Quote Link to comment Share on other sites More sharing options...
ckp Posted December 1, 2016 Share Posted December 1, 2016 only way i can think of as a workaround to this problem for now is to add a before app which is a script (like an ahk script) and in that script you create, you would have to have it do something like sleep a few seconds, then run a LOOP that checks for existence of castle.exe and if castle exe doesn't exist then run your after program and exit the script. if i have the same problem as you this weekend, i may write such a script. Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 Seems to work correctly for Pac-Man CE DX, which is being run off its steamid. So yeah, maybe just a particular problem with Castle Crashers... Quote Link to comment Share on other sites More sharing options...
Massivebasset Posted December 1, 2016 Author Share Posted December 1, 2016 I dont know if you are familiar with the program Closemul.exe, but it came around like I dunno, 5 years ago as a inbetween to try and do stuff like this. Basically from your front end you would launch closemul with arguments, and it had its own ini to launch the emulator, along with features like killing emulator processes with esc key, running additional apps, mounting virtual drives before emu launch, and demounting after, etc. You would basically put a copy of closemul.exe and its ini in every emulator directory to customize how its launched independent of front end. Then the front end calls closemul and passes the rom name. At any rate, that may work for this, cause closemul may stay open while it launches castle crashers, then LB checks for Closemul.exe instead of castle.exe.... I dunno ill try it. It is good to know its not all steam games though. Again thanks for the help. 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.