C-Beats Posted April 3 Share Posted April 3 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 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 and a MAME (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) Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 3 Share Posted April 3 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. Quote Link to comment Share on other sites More sharing options...
Tsik Posted April 4 Share Posted April 4 (edited) 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. 🙂 Edited April 4 by Tsik Quote Link to comment Share on other sites More sharing options...
Tsik Posted April 4 Share Posted April 4 (edited) 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 April 4 by Tsik Quote Link to comment Share on other sites More sharing options...
C-Beats Posted April 4 Share Posted April 4 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 2 Quote Link to comment Share on other sites More sharing options...
Tsik Posted April 4 Share Posted April 4 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! 😀😀😀 1 Quote Link to comment Share on other sites More sharing options...
arcademode Posted April 8 Share Posted April 8 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! Quote Link to comment Share on other sites More sharing options...
C-Beats Posted April 8 Share Posted April 8 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? Quote Link to comment Share on other sites More sharing options...
arcademode Posted April 8 Share Posted April 8 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. Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted April 8 Share Posted April 8 (edited) 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 April 8 by skizzosjt 1 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted April 8 Share Posted April 8 (edited) 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 or if I am using one of my custom badges like PartialGamepadSupport and I made my own image for that. 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 Edited April 8 by The Papaw 1 Quote Link to comment Share on other sites More sharing options...
skizzosjt Posted April 8 Share Posted April 8 @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 @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 Then for visibility of the image refer to the UI ELEMENT you used to contain the custom field metadata 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 😂 Quote Link to comment Share on other sites More sharing options...
The Papaw Posted April 9 Share Posted April 9 10 hours ago, skizzosjt said: If the custom badge doesn't automatically come up here I think this might be the issue 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. Quote Link to comment Share on other sites More sharing options...
5thWolf Posted August 8 Share Posted August 8 (edited) 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 I also tried Custom Field (adding the custom field in the game profile Name=Map Value=Map) Moved the dll into plugins, activated in LB but nothing shows. Edited August 8 by 5thWolf Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 8 Share Posted August 8 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"). 1 Quote Link to comment Share on other sites More sharing options...
5thWolf Posted August 8 Share Posted August 8 (edited) 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 August 9 by 5thWolf Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 9 Share Posted August 9 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. 1 Quote Link to comment Share on other sites More sharing options...
5thWolf Posted August 9 Share Posted August 9 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. Quote Link to comment Share on other sites More sharing options...
5thWolf Posted August 9 Share Posted August 9 (edited) I Just noticed the tutorial videos they are all nice and bigger on the side Mine are all tiny and on the bottom 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 August 9 by 5thWolf Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 9 Share Posted August 9 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. 1 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.