Jump to content
LaunchBox Community Forums

Recommended Posts

5 hours ago, Tsik said:

@JoeViking245 or
@C-Beats or
@y2guru or
@jayjay or anyone who can help...

I am try to create a custom badge for games that do not support Gamepad so using this plugin i create an icon GamepadNotSupport.png.fd9bc76bce6c4ea85b129faad3b3428f.png and a .dll from the plugin so that when the Controller support category Gamepad is 'equal to' 'not supported' ( game.GetControllerSupport().Where(x => x.Key.Category.Equals("Gamepad") && x.Value.HasValue && x.Value.Equals(0)).Select(x => new { Key = x.Key, Value = x.Value }).FirstOrDefault() != null ) LaunchBox shows the badge and everything worked perfect till here!

 

On a second attempt i would like to create a ReatroArch RetroarchBadge.png.f1fec2cc30295729294c299b55792d30.png and a MAME MAMEBadge.png.b686847b154da034e91faf516e3bf290.png (separate) badges when its respective emulator is in use by using the plugin 'Emulator' tab and 'Title' 'Contains' the word "RetroArch" or eg. "MAME" ( Unbroken.LaunchBox.Plugins.PluginHelper.DataManager.GetEmulatorById(game.EmulatorId).Title.Contains("MAME") ) so the respective badge will show.

The Problem is that as i enable the new emulator plugin budges  from the menu, though the Emulator badges worked as expected every other badge (even the stock ones) relative to 'Controller Support' is Vanished !!!

 

I think thart it has something to do with the Emulator path being other than Retroarch or MAME related or even empty (launching eg. batch files).

Thanks a lot for your hard work trying to make LaunchBox the best and most versatile Frontend out there. 😄

 

I'd check your log files and make sure there isn't any exceptions in there related to the badge. It sounds like the process may be throwing an exception and killing the thread that loads all the badges (which is why you see none)

Link to comment
Share on other sites

5 hours ago, Tsik said:

though the Emulator badges worked as expected every other badge (even the stock ones) relative to 'Controller Support' is Vanished !!!

...after checking the logs, double check that all the other 'enable badge' are still checked/enabled.

Each of the IGameBadge plugin dll's should be independent of one another and are a go-no_go type of thing.  That is, LaunchBox reads the particular "show this specific badge image if 'this' criterion is met" for each one independently.  So one shouldn't affect the other.  Unless, as C-Beats said, something along the way is killing the thread.

Link to comment
Share on other sites

First off all thanks for the immediate reaction... 🙂 

As @C-Beats said after checking the log i find some errors for IGameBadge starting at line '194' after enabling and disabling the 'ΜΑΜΕ Emulator Budge' (the one in question) but since i lack any developing knowledge here is the log file it self: Debug (Badges Not Working).log.

As @JoeViking245 pointed i double checked that all the badges were enabled from the top menu.

I would like to like to point out that not all the badges are disappearing but only those that have no emulator path specified eg. batch files or web links (see screenshot below). Thanks again. 🙂

BadgesWorking.thumb.png.e674fcb8ffa5b32059a5ddaf9c40fbc3.png BadgesNotWorking.thumb.png.816729198cc0b4a552ac2a3f37bec96e.png

Edited by Tsik
Link to comment
Share on other sites

Perhaps a code portion in the creation of the .dll (plugin) that ignores the empty emulator path or something similar might work (assuming that it is not somesort of a bug).

Edited by Tsik
Link to comment
Share on other sites

On 4/3/2024 at 3:49 AM, Tsik said:

Unbroken.LaunchBox.Plugins.PluginHelper.DataManager.GetEmulatorById(game.EmulatorId).Title.Contains("MAME")

Well if this is what you're using as criteria then that's your issue. Should be the following:
game.EmulatorId != null && Unbroken.LaunchBox.Plugins.PluginHelper.DataManager.GetEmulatorById(game.EmulatorId)?.Title?.Contains("MAME") == true

This makes sure that a null value doesn't throw any null reference exceptions

  • Like 2
Link to comment
Share on other sites

3 hours ago, C-Beats said:

Well if this is what you're using as criteria then that's your issue. Should be the following:
game.EmulatorId != null && Unbroken.LaunchBox.Plugins.PluginHelper.DataManager.GetEmulatorById(game.EmulatorId)?.Title?.Contains("MAME") == true

This makes sure that a null value doesn't throw any null reference exceptions

That sir did the trick!

I put the code in the advance tab, compile and "kaboom" everything works as expected!

Massive thanks! 😀😀😀

  • Game On 1
Link to comment
Share on other sites

On 8/4/2023 at 10:22 PM, The Papaw said:

@JoeViking245 @C-Beats @y2guru @jayjayI love this app, but need a little help. I have created a badge for "partial gamepad support". I works in LB, but it shows both the regular gamepad badge along with my partial badge I created. I can't figure out how to get LB to show only the partial one. Having simliar issues in Bigbox themes I create, I have found a work around in BB using a custom field, but not the best solution. Any pointers guys?

 

On 8/5/2023 at 6:21 AM, C-Beats said:

You'd just turn off the built in badge and only use the partial. If going that route with badges I'd make a "fully gamepad support" badge along side the one you made and then just turn those both on and a game should only have one or the other and display the way you are wanting.

I had some success implementing custom badges inside LB, but I can't get a grasp on the BigBox integration.  The custom gamepad options aren't showing up in the theme creator, not sure where to go from here or what kind of workaround to try. Thanks in advance! 

Link to comment
Share on other sites

2 hours ago, C-Beats said:

If a badge is built and working in LB it also works in BB. What are you having issues with? Are you just struggling to determine how to get the new badge to display in the theme?

Exactly that, yeah. If I add the badge asset in a custom theme the option to show my custom controller isn't in the dropdown menu.

Link to comment
Share on other sites

6 hours ago, arcademode said:

Exactly that, yeah. If I add the badge asset in a custom theme the option to show my custom controller isn't in the dropdown menu.

so you must be referring to CTC

it doesn't have what I would call full support for badges. for ex, installed (for if game is installed or not) is not available in the drop down. I must instead make it use some existing binding it does understand like "favorite" and then further edit the code after publishing. it will then work as I intended it to in Big Box. in this specific example, changing those "Favorite" binds to "Installed" and using true / false accordingly within CTC. I thought I could get around this by editing the CTC view file manually, but CTC will immediately crash when you load the theme since it doesn't know what to do with that option that isn't natively in the drop down...whomp whomp me talking out my rear because I apparently learned stuff the hard way. please see comments from the papaw and myself below

if customized badge data is not available in CTC then you will need to do some similar shenanigans. "lie" in CTC and then edit with the intended code after publishing. assuming you know what the intended code is of course.

if you're still stuck, this is certainly another workaround (maybe someone else knows a more straight forward approach!?) In LB you can assign a custom field to all the games that need the custom badge. For example. create a custom field called "Custom Badge" and then give it it an appropriate value. For sake of discussion, maybe you want a badge for what emulator is used. Lets use "Emulator MAME" for the value. In CTC create an image that is only visible when custom field Custom Badge value is Emulator MAME. Now that image only displays when a game has that custom field and said custom field has that exact value. this works because custom fields are available in CTC, so you can then use them to control other elements, like images of badges. For other badges those games get different custom field values. For ex "Emulator Retroarch" or you have a special badge for games that have no in game save option and only use password systems, "No onboard save" could be the value. Whatever your imagination can think up really.

Edited by skizzosjt
  • Like 1
Link to comment
Share on other sites

4 hours ago, arcademode said:

Exactly that, yeah. If I add the badge asset in a custom theme the option to show my custom controller isn't in the dropdown menu.

Not sure if I can help out here or not. What I do is create a folder in my CTC theme and call it "Badges" (..\My Theme Projects\Jarvis\Media\Badges\)

Then I drop in the badges I want to use in the theme, all the images I used to make my custom badges and even if I want to over ride a default LB badge. Like in the screenshot of one of my themes (mouse in top right corner), I used an image of a mouse to replace the default MouseSupport.png controller

Untitled1.thumb.jpg.526340c8bbb5c11c6752378b366b1d70.jpg

or if I am using one of my custom badges like PartialGamepadSupport and I made my own image for that.

PartialGamepadSupport.png.05aa30fa4fc8c06acd551499a12074b2.png

The names have to be correct and I also point to my badge image in CTC, see Screenshot #2. Maybe this will be of some help

Untitled2.thumb.jpg.41ff29808c78ff930d818fdc3b6c4d2e.jpg

Edited by The Papaw
  • Like 1
Link to comment
Share on other sites

@The Papaw that helps me, I forgot that the badge element even exists! I only realized it existed until after I was done making customization with badges lol. I never bothered fixing this after the fact because I got everything working, albeit with some manual tweaking after publishing. I know I tried them, but I must have never gave them their due diligence. They would display 24/7 in CTC. Now I see if I save/publish they work as intended. 🤦‍♂️ Which leads me to the benefit of not needing to mess with installed/uninstalled badge code if I just used the intended element from the get go. 🤦‍♂️ 🤦‍♂️ My issue is I used image elements to display the badges. I'll have to update at least the installed/uninstalled one because that is the only badge I use that doesn't have it's metadata available via other metadata drop downs which led me to my funny roundabout way of doing this. you help me no longer need to edit a handful of lines on a few views every time I publish now!

however, I think the bigger issue for arcademode is the custom badge might not be available in a CTC drop down. If it's not in a metadata drop down (the UI Element/Metadata drop downs) and is not in the Badge drop down of a badge element then they might need a workaround. that is where the custom field recommendation comes into play. I'd be happy to be wrong here too, I always prefer the easier way if one exists! So if anyone has one, by all means please do correct me!

If the custom badge doesn't automatically come up here I think this might be the issue

image.thumb.png.128df6cd6ab83503c691b6573b045d2f.png

 

@arcademode I took a sec to look closer at my setup and I forgot a step that would be required here if you do use custom fields. There's a catch....custom fields are readily available in CTC, but not for visibility conditions UI Element/Metadata drop down. They ARE available in other elements like a text box. You might think.....who cares? well, you can make a text box use this custom field metadata and then make its opacity 0% (or hide in one way or another to your preference). Then in your visibility condition for the custom badge image, call to the text in this text box, using its contents as the trigger/condition. 

For ex....

Setup a text box using the custom field metadata

image.thumb.png.67d0916da8bea50466098b561ec2582b.png

 

Then for visibility of the image refer to the UI ELEMENT you used to contain the custom field metadata

image.thumb.png.c22a7d648c16a0371cd362177f76cc7a.png

 

 

if all this is bogus ass backwards way of doing things with a custom badge made with this tool, instead consider it a tutorial to use custom fields for other stuff besides just displaying text 😂 

Link to comment
Share on other sites

10 hours ago, skizzosjt said:

 

If the custom badge doesn't automatically come up here I think this might be the issue

image.thumb.png.128df6cd6ab83503c691b6573b045d2f.png

It's been a while but If I remember correctly, when I ran into this, my discussion with @y2guru, the way to accomplish this was using custom fields. You might want to get with him on that portion. 

Link to comment
Share on other sites

  • 3 months later...

I am having issues making a badge show. Basically I want a map badge to show if a Map is available for the game.

I tried one for Additional Apps (game profile has additional app as map.pdf) which shows properly under Media>Addition Documents 

image.thumb.png.a24370efbad0e552cb12ab102705fea9.png

I also tried Custom Field (adding the custom field in the game profile Name=Map Value=Map)

image.thumb.png.4debf597ab314c04927b873aa80c8e0b.png

Moved the dll into plugins, activated in LB but nothing shows.

Edited by 5thWolf
Link to comment
Share on other sites

15 minutes ago, 5thWolf said:

I am having issues making a badge show. Basically I want a map badge to show if a Map is available for the game.

Make sure the image file (Map.png) you use is good to use as a badge.  Not sure what the criteria is, but to test you could take one of the existing (known good) badge images, copy and rename to 'Map.png'. (Re-)Start LB.  Now see if 'that' image appears on a game that has a map.  

You may need to regenerate the dll using the new test image as I believe the image gets embedded into the dll, then extracted to the images folder when the plugin is ran.

 

The Additional App one looks like it should work.  The Custom Field one, as you describe and show above, won't.  You say the Name and Value are "Map", but the plugin (screenshot) is looking for "Maps" (with an "s").

  • Thanks 1
Link to comment
Share on other sites

40 minutes ago, JoeViking245 said:

Make sure the image file (Map.png) you use is good to use as a badge.  Not sure what the criteria is, but to test you could take one of the existing (known good) badge images, copy and rename to 'Map.png'. (Re-)Start LB.  Now see if 'that' image appears on a game that has a map.  

You may need to regenerate the dll using the new test image as I believe the image gets embedded into the dll, then extracted to the images folder when the plugin is ran.

 

The Additional App one looks like it should work.  The Custom Field one, as you describe and show above, won't.  You say the Name and Value are "Map", but the plugin (screenshot) is looking for "Maps" (with an "s").

@JoeViking245 Your the best! The image I had was 512x512 and I tried a different badge like you said and it worked perfectly. I will just resize it to meet the criteria. I see Steam badge is 468x468 so I am assuming that may be the max.

There any way to make the badges show a bit bigger?

Edited by 5thWolf
Link to comment
Share on other sites

13 minutes ago, 5thWolf said:

@JoeViking245 Your the best! The image I had was 512x512 and I tried a different badge like you said and it worked perfectly. I will just resize it to meet the criteria. I see Steam badge is 468x468 so I am assuming that may be the max.

There any way to make the badges show a bit bigger?

Glad it was an easy fix. :) 

I don't know if you can edit the theme to have them show bigger. That'd be the only way (if even possible).  Would probably be easier to use a different image.  Generally, the less 'detailed' the image is, the better it appears.  Less colors etc.  And honestly, probably don't waste time attempting to make the one you have 'less detailed'.  Just look for a different one.

  • Like 1
Link to comment
Share on other sites

8 minutes ago, JoeViking245 said:

Glad it was an easy fix. :) 

I don't know if you can edit the theme to have them show bigger. That'd be the only way (if even possible).  Would probably be easier to use a different image.  Generally, the less 'detailed' the image is, the better it appears.  Less colors etc.  And honestly, probably don't waste time attempting to make the one you have 'less detailed'.  Just look for a different one.

It looks good even at small size. It was based of a low detail clipart. Would just be nicer seeing them all bigger.

Link to comment
Share on other sites

I Just noticed the tutorial videos they are all nice and bigger on the side

image.thumb.png.8424923dc54f852d5078d1900ec35d90.png

Mine are all tiny and on the bottom

image.thumb.png.f6604a8e1bb513a2ae02973bbab3c265.png

I am using the default LB Theme. Did it change to what mine is now or is there an option somewhere that I am not seeing?

Edited by 5thWolf
Link to comment
Share on other sites

42 minutes ago, 5thWolf said:

I am using the default LB Theme. Did it change to what mine is now or is there an option somewhere that I am not seeing?

That video was made many LaunchBox versions ago.  You might be able to see that in "Old Default".  Not sure if there's a Tools - Options menu item where that can be changed. You'd have to look.

  • Like 1
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
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...