Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[PLUGIN] PlugInLaunch v1.0


headkaze

Recommended Posts

Just knocked up this little plugin for people who want to launch things before and after a game. You don't have to even use the ini file to have the extra variables listed below as it modifies the command line that GameEx uses by replacing the variables. You can also use the ini file to launch 8 different apps before and after a game for each emulator.

PlugInLaunch v1.0 for GameEx By HeadKaze

========================================

-: Description :-

This plugin allows you to launch apps before and after games in GameEx. It also allows you to launch games with extra variables from GameEx's standard launch method (see below).

-: Ini File :-

The PlugInLaunch.ini file located in C:\Program Files\GameEx\PLUGINS can be edited to add specific command line's for each emulator. You can have up to 8 different command lines to launch. To create a custom section for an emulator use the "TitleText" property from an emulator config.

Here is an example:

[MAME]
LaunchBefore1="C:\Program Files\PPJoy\PPJoyKey.exe" C:\Config\[ROMNAME].ini
LaunchAfter1=taskkill /f /IM PPJoyKey.exe

-: Command Line Variables :-

Launching using this plugin allows you to replace variables with values sent from GameEx. Here are a list of accepted variables.

Data from databases:

[CATEGORY], [YEAR], [DEVELOPER], [DESCRIPTION]

Data from MAME:

[PLAYERS], [CONTROL], [CLONEOF], [ORIENTATION], [videoWIDTH], [videoHEIGHT], [COCKTAIL]

General Data:

[EMUNUM], [EMUNAME], [GAMENAME], [ROMPATH], [ROMNAME], [ROMFILTER], [sNAPPATH], [TITLEPATH], [CMDLINE]

Download

  • Like 4
Link to comment
Share on other sites

  • 1 year later...

I hate to bump this thread, but is there a way around the [ROMFILE] variable so I can get this to launch DaemonsTools? [ROMPATH]/[ROMFILE] doesn't seem to be working.

Link to comment
Share on other sites

I hate to bump this thread, but is there a way around the [ROMFILE] variable so I can get this to launch DaemonsTools? [ROMPATH]/[ROMFILE] doesn't seem to be working.

I'm gonna probably go with the reason that [ROMFILE] is not a valid parameter. So I wouldn't expect "[ROMPATH]\[ROMFILE]" to work. See below:

General Data:

[EMUNUM], [EMUNAME], [GAMENAME], [ROMPATH], [ROMNAME], [ROMFILTER], [sNAPPATH], [TITLEPATH], [CMDLINE]

Link to comment
Share on other sites

I know. ;)

I was hoping it could be added. I'm trying some things to see if I can eliminate DT from my rig and use Tom's VirtualDrive instead. [ROMNAME].cue doesn't work either.

Link to comment
Share on other sites

I know. ;)

I was hoping it could be added. I'm trying some things to see if I can eliminate DT from my rig and use Tom's VirtualDrive instead. [ROMNAME].cue doesn't work either.

Hmmmm. That should work if in fact [ROMNAME].cue does exist. I haven't tried this plugin but am familiar with the plugin system and this is a wall I've hit as well. I haven't gotten a straight answer for it myself lately but the plugin system doesn't export the rom with extension in a variable. If it does then I hope we both can receive an answer about it. VirtualDrive is ok for basic function but IMO I would still stick with DT.

Link to comment
Share on other sites

Yeah. I also learned that the virtualdrive doesn't load cue sheets. Ahh crap! I guess I can live without xpadder for now... Would be nice to get my combo keys working for state saves though.

I don't know if it matters but I think the [ROMNAME] variable isn't working because remove brackets is set to yes, so it's not really passing the full file name.

Link to comment
Share on other sites

Happy to add support for it but the problem is GameEx only passes certain info to the plugin.

Namely

[StructLayout(LayoutKind.Sequential)]
public struct Game_Info
{
public int EmulatorNumber;
public string EmulatorName;
public string GameName;
public string ROMPath;
public string ROMName;
public Database GameData;
public Mame_Info MameInfo;
public string ROMFilter;
public string SnapPath;
public string TitlePath;
public string CMDLine;
};

So I guess we really need a new plugin version with this field added? It might be time for a new plugin format with all the new screens and extra data added in recent versions of GX.

Link to comment
Share on other sites

Happy to add support for it but the problem is GameEx only passes certain info to the plugin.

Namely

[StructLayout(LayoutKind.Sequential)]
public struct Game_Info
{
public int EmulatorNumber;
public string EmulatorName;
public string GameName;
public string ROMPath;
public string ROMName;
public Database GameData;
public Mame_Info MameInfo;
public string ROMFilter;
public string SnapPath;
public string TitlePath;
public string CMDLine;
};

So I guess we really need a new plugin version with this field added? It might be time for a new plugin format with all the new screens and extra data added in recent versions of GX.

That would be great! The rom name with the extension is really needed. I hope this can be added.

Link to comment
Share on other sites

I was so excited about the news I had to bump this! Prayers answered? Only in GameEx land! :D

PS: Headkaze, you're the best evar!!1!11!B!

Link to comment
Share on other sites

OK, here's my findings.

I can now get xpadder to launch in this plugin. However when I try to run Daemon Tools, the image will not mount to the drive. If I put the "Launch Before" and "Launch After" in GameEx, and I put the xpadder command line in the plugin, it works just fine. I have tried copying and pasting the cmd line that works in GameEx into the plugin INI, and I have tried tweaking things as I thought of things to try.

No matter, everything works now, and my SSF 0.12 Beta is functioning like a dream now. :)

Thanks a million HK! :D

Link to comment
Share on other sites

  • 1 year later...

This has been updated by the way.

2.0 adds a GUI and a couple minor changes (moved the log and ini to it's own folder instead of the root directory), but at it's core,code inside is still Headkaze's. :)

It might be inside GameEx already, but if not here's the rar:

Link to comment
Share on other sites

  • 2 weeks later...

I got caught slipping! LOL!

Had to change something (I was using the ComboBox.SelectedText property when I should have been using ComboBox.SelectedItem). This is gonna need an update. After I know it works I'll post a new version.

Sorry guys. :*(

Link to comment
Share on other sites

Updated to 2.2: Thanks a million Bigby for the rigorous testing! The plugin now works 100% with DTLite, and case is irrelevant in variable names. :)

Link to comment
Share on other sites

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.

×
×
  • Create New...