Jump to content
LaunchBox Community Forums

Recommended Posts

1 hour ago, Lahma said:

The plugin download page explains how to do this in depth:

https://forums.launchbox-app.com/files/file/972-steamlauncher/

Here is the relevant section:

 

Customize Platform Names

When roms are launched with the plugin, the title of the game, as Steam sees it, will be in the format of: "Game Title (Platform Name)"

        Example: Super Mario Bros. (Nintendo Entertainment System)

For whatever reason, you may want to keep the long "official" name of the platform in LaunchBox, but use a shortened, abbreviated, or different platform name inside of Steam. The plugin has this functionality available, and it can be enabled by following these instructions:

  • Open the SteamLauncher directory and look for a file named 'config.xml'
     
  • If you do not see the file, you need to launch at least 1 game with the plugin, and then manually close LaunchBox, and the file should then appear in the directory
     
  • Open the file with a text editor, and look for the line labeled, '<CustomPlatformNames>'
     
  • Anywhere under this line, and before the line labeled, '</CustomPlatformNames>', you can add as many new lines as desired in the format of:

                <Platform Name="Original LaunchBox Platform Name" Custom="Custom Platform Name" />

  • You may already see a couple of example lines in place with fake platform names which you can copy/paste and modify to add your own custom platform names
     
  • After making your changes, simply save the file, close it, and then reopen LaunchBox
     
  • The next time you launch a game, you should see your new custom platform name substituting the real platform name in Steam (an easy place to see the title of the game you're playing is in the Steam overlay)
     
  • Just to reiterate, here is an example of what the aforementioned lines look like in my config file:

                <CustomPlatformNames>

                    <Platform Name="Super Nintendo Entertainment System" Custom="SNES" />

                    <Platform Name="Nintendo Entertainment System" Custom="NES" />

                    <Platform Name="Nintendo Game Boy Advance" Custom="Nintendo GBA" />

                    <Platform Name="Nintendo Game Boy Color" Custom="Nintendo GBC" />

                </CustomPlatformNames>

 

 

Did this solve your problem?

  • Like 1
Link to comment
Share on other sites

I'm a total ass for taking so long to post the source code, but its finally uploaded on my GitHub. Sorry about the delay... My OCD/perfectionism gets the best of me at times (though the source code is far from perfect). I did do my best to comment/document the source code in as detailed a manner as possible. Enjoy!

https://github.com/lahma69/SteamLauncher

Link to comment
Share on other sites

On 6/8/2018 at 10:38 AM, Lahma said:

I'm a total ass for taking so long to post the source code, but its finally uploaded on my GitHub. Sorry about the delay... My OCD/perfectionism gets the best of me at times (though the source code is far from perfect). I did do my best to comment/document the source code in as detailed a manner as possible. Enjoy!

https://github.com/lahma69/SteamLauncher

@Nielk1Hey Nielk, just in case you did not already see this, I thought I would tag you to let you know I FINALLY uploaded the source onto GitHub.  Do be aware however that I have not implemented (into my custom Steam Client API) any (well, hardly any) of my WIP code to help increase resiliency against code-breaking Steam Client updates. I'm still trying to workout what method, or combination of methods (such as pattern matching or MSVC runtime type information parsing), is the best approach, especially in a use-case such as my plugin where so few classes/methods are actually needed.

The only code present in its current form that does anything to work around future updates is in SteamClient-> SteamContext -> InitClientEngineInterface(), and this is just a very simple loop that tries to work around IClientEngine's version # being updated in future beta or non-beta releases. IClientEngine is by far the most commonly updated class (or the vftable entry to retrieve an instance of the class), at least in my experience, and this simple loop has actually already prevented the entire plugin from breaking due to Steam updates at least 1 time, and perhaps 2 (I can't remember at this point).

The Steam API should be mostly self explanatory and easily duplicable once you have vtable/vftable offsets for the classes/methods you need (I can give you any of these straight from the latest Steam client dll.. just let me know). The only part that might be a bit tricky to follow is SteamInterfaceWrapper which is present mostly to allow shorter, easier-to-read delegate declarations in the main client interface implementations such IClientShortcuts. Additionally, it caches delegate instances once they've been resolved in order to speed up subsequent calls. 

Or, you might find it easier to just continue using whatever API you currently are (since it likely has all of the Steam interfaces implemented rather than only select ones such as mine) until I implement some of the WIP code designed to increase resiliency against updates. I'm not really sure mine would provide much benefit as of now... although to be honest, the IClientEngine-related vtable offsets are the only ones (out of the interfaces I use often) that I've seen change in quite awhile, so using something like the simple loop I implemented to test for increases in the version # might help you out if you're experiencing the same.

Note: I wrote this post after a few drinks while I was very sleepy and after being awake entirely too long, so I apologize if I droned on and on. ?

Link to comment
Share on other sites

  • 2 weeks later...

I got a message from @cammelspit saying that there is a problem with the plugin. I've been gone all weekend and just got home, so I will look into the problem immediately. I just tried using the plugin on non-beta Steam and it appears to still be working fine, so I'm guessing the problem might be with the latest Steam beta release. I am going to boot up my VM that has Steam beta installed and look into it right now.

Link to comment
Share on other sites

Ok, so I've tried every both the beta and non-beta Steam clients as well as beta and non-beta LaunchBox, and I've encountered zero issues so far. When cammelspit gets back online I will talk with him directly and see if I can figure out what is going on, but in the meantime, if anyone else is having any problems with the plugin, please let me know so I can look into the issue further. Thanks!

Link to comment
Share on other sites

I wish there was a quick and easy answer I could give to you, but it just isn't a simple task. I can give you a quick overview of the process, but the difficult part involves calling undocumented native functions over IPC in the steamclient.dll/steamclient64.dll libraries. If you're really serious about tackling the problem and are committed to spending the time required to reversing the Steam client DLL in a disassembler (I would suggest IDA Pro) and gaining a good understanding of how it works, then it is definitely doable. However, even for the relatively simple tasks that I wrote my custom API to accomplish, I spent weeks, if not months, learning the in's and out's of the Steam client. 

You can try to use one of the available open source Steam client API wrappers that are available, such as Steam4Net, but that route is unfortunately not simple or free of heartache either. They don't seem to be actively updated by the authors (although there are some forks that seem to be updated at least several times a year), so when a Steam update changes the API and subsequently breaks the API wrapper (which happens pretty damn frequently), your application will cease to function until someone fixes it. 

My project is open source, so you are free to look at the API I wrote and use it as you see fit. Since I don't know what it is that you are trying to accomplish, I can't say whether it will work for your purposes, but if it does, you can count on me keeping it functioning and fixed usually within a day or so after a Steam update. 

The general process looks like this:

  • User clicks on "Launch via Steam" in the LaunchBox context menu
  • Plugin gathers all the information about the specific game
  • Plugin API sets up an IPC connection with the Steam Client
  • Calls native Steam client functions to create/recycle a hidden Steam shortcut
  • Launches the newly created/modified Steam shortcut

That is a overly-simplified explanation of the process, but if you look at the source code, you can get a better idea of the specifics. 

There are of course other ways that you can go about managing "non-Steam" shortcuts in Steam, such as modifying the file where Steam stores all of that data (shortcuts.vdf), but that unfortunately requires you to shutdown/close Steam and then restart it after making those modifications. The only way to do it while Steam is open and running is to interface with the Steam client dll.

If there is any additional information I can help you out with, just let me know. Good luck!

Link to comment
Share on other sites

I'm essentially trying to do what you described above with PCSX2 specifically, My goal is to take what game PCSX2 says it's playing and hand it to steam so you get per game configs from one exe. Also I love this plugin use it all the time and I guess it's partially my inspiration for tackling my project so thanks :D  

Link to comment
Share on other sites

7 minutes ago, Musungo said:

I'm essentially trying to do what you described above with PCSX2 specifically, My goal is to take what game PCSX2 says it's playing and hand it to steam so you get per game configs from one exe. Also I love this plugin use it all the time and I guess it's partially my inspiration for tackling my project so thanks :D  

Oh, and I really appreciate the compliment on my plugin! I put a lot of time and effort into it, so its always great to hear from others that they get as much use out of it as me!

Link to comment
Share on other sites

7 minutes ago, Musungo said:

Yeah basically thought it'd be a fun coding project 

While I'm not sure exactly what the final app would look like in such a project (like, do you want to make like you're own little mini game launcher for PCSX2 that would allow you to add all your roms into it, or simply have just like a command line proxy exe that you could use to launch a specific rom in PCSX2 which would then show the Steam overlay and such?), it sounds like it would be fun project, and I suspect you could use the Steam API I wrote for my plugin as almost a drop-in solution since you would need essentially the exact same functionality that my plugin uses.

Edited by Lahma
Link to comment
Share on other sites

1 minute ago, Lahma said:

While I'm not sure exactly what the final app would look like in such a project (like, do you want to make like you're own little mini game launcher for PCSX2 that would allow you to add all your roms into it, or simply have just like a command line proxy exe that you could use to launch a specific rom in PCSX2 which would then show the Steam overlay and such?), it sounds like it would be fun project, and I suspect you could use the Steam API I wrote for my plugin as almost a drop-in solution since you would need essentially the exact same functionality that my plugin uses.

I might just take inspiration from your solution, PCSX2 has a built in game list that loads when I load a game if you take a look at the title bar of the pcsx2 console it'll show the name of the game it's currently playing. my little project would be to go to that list and like your plugin does with launchbox read off the current game to steam. thanks for all the help :) 

Link to comment
Share on other sites

  • 1 month 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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...