Jump to content
LaunchBox Community Forums

Rob_G

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Rob_G

  1.  I think the 'IsCasino' boolean in the mame xml data is being used wrong, or some games have wrong metadata  Megatouch XL is one example identified as a casino game when it's just another version of a Megatouch game.  

    Rob  

  2. 3 hours ago, DerSchlachter said:

    Thank you, i will check the result in my Test-Setup 🤠

     



     

     

     I've changed my approach a bit now. Instead of deleting items, I just hide them by changing the hidden element in the platform or gamelist xml.

     I don't have anything written for launchbox (yet), but I did write something for batocera already..  Same principle though.  This keeps everything in place like bios and device files which are needed, but hides them since they aren't actually games to play.  

     

    Rob

  3.  

     Ok, one thing I had not counted on was that device roms are not included with the game roms.  So for example, Arkanoid won't launch if mame cannot find m68705p3.zip which is a processor device rom.

     The solution is going to be to not touch device (or bios) zip files now.  I have updated the script to leave these alone.

     Also, I have added a backup option to move files to another location instead of just deleting them if that is what you want.

     I updated the script in the first post.

    Rob

     

    • Like 1
  4.  

     I wrote a powershell script to cleanup a full (merged) mame romset and remove the following junk:

    Non working
    Non arcade
    No disk dump
    CHD Missing
    Casino
    Mahjong
    Playchoice 10
    Mechanical
    Non Runnabl
    Uses Software lists
    Clones

     Filtering mame xml is NOT bulletproof.  There are no explicit tags for language or genre so some filtering is tedious and/or may produce undesired results.  So it's best to err on the side of caution.  There will be casino/mahjong games that slip by for example and this even happens with Launchbox mame import.        

     Final tally is that this reduces a mame merged set from 15000+ files to less than 4000 files.

     

    
    
    function deletefile($file) {
    
        #Comment next line if you don't want backup
        #$backupfolder = "d:\backupfolder"
    
        if (($backupfolder -ne $null) -and (($backupfolder | test-path) -eq $false)) {
            md $backupfolder
        }
        
        if ((Get-ChildItem $file -ErrorAction SilentlyContinue) -eq $null) {return}
        
        if ($backupfolder -ne $null) {
            write-host "Moving $file.name to $backupfolder"
            #$file | move-item -Destination $backupfolder
        }
        else {
            write-host "Deleting $file"
            $file | Remove-Item -Force
        }
    }
    
    
    
    if ($xml -eq $null) {
    
    #Changed to wherever your mame.exe is
    [xml]$xml = D:\Launchbox\Emulators\Mame\mame.exe -listxml
    
    }
    
    #Change to wherever your roms are stored
    $dir = "Z:\roms\mame"
    
    $xml.mame.machine | ForEach-Object {
    
        $name = $_.name
    
        $romfile = $dir + "\" + $name + ".zip"
            
        #Is a bios
        if ($_.isbios -eq "yes") {return}
    
        #Is a device
        if ($_.isdevice -eq "yes") {return}
    
        # Delete rom if it has no associated input or coins is null
        if ($_.input -eq $null) {
            deletefile $romfile
            return
        }
        $checkforcoin = $null
        $checkforcoin = ($_ | select -ExpandProperty input).coins
        if ($checkforcoin -eq $null) {
            deletefile $romfile
            return
        }
    
        #Unplayable
        if ($_.driver.status -eq "preliminary") {deletefile $romfile;return}
    
        #No disk dump
        if ($_.disk.status -eq "nodump") {deletefile $romfile;return}
    
        #Missing CHD
        if ($_.disk.status -eq "good") {
            $chdname = $dir + "\" + $_.name + "\" + $_.disk.name + ".chd"
            $checkdir = $null
            $checkdir = Get-ChildItem $chdname -ErrorAction SilentlyContinue
            if ($checkdir -eq $null) {deletefile $romfile;return}
        }
        
        #Not runnbable
        if ($_.runnable -eq "no") {deletefile $romfile;return}
    
        #Mechanical
        if ($_.ismechanical -eq "yes") {deletefile $romfile;return}
    
        #Description keywords
        #Playchoice isn't necessary
        #I think most rhythm games are unplayable as well
        if ($_.description -match "playchoice|mahjong|percussion|rhythm|beatmania") {deletefile $romfile;return}
       
        #Slot machine
        if ($_.manufacturer -match "Videos A A|QPS|IGT - International Game Technology|Aristocrat|Igrosoft") {deletefile $romfile;return}
        if ($_.description -match "casino|gamble|slot|fruit|mazooma|gaminator|poker") {deletefile $romfile;return}
        if ($_.sourcefile -match "barcrest|goldstar.cpp") {deletefile $romfile;return}
    
        #A few junk stragglers
        if ($_.sourcefile -match "nes_clone.cpp|att3b2.cpp|telercas|tvgames|skeleton|aristocrat|casio|yamaha|famibox") {deletefile $romfile;return}
        
        #Uses softwarelist
        if ($_.softwarelist -ne $null) {deletefile $romfile;return}
    
        #Is a clone.  Not sure we keep or not.  Disabled next line for now
        #if ($_.cloneof -ne $null) {deletefile $romfile;return}
    
    }

     

    • Like 2
  5.  I roughed up a proof of concept for exporting launchbox style media to a batocera installation.  It's just something to play around with I guess.

     This POC copied video files, renamed them appropriately and generated a new game list xml.

     There are going to be limitations, but it certainly beats downloading gigs of data again through very slow scrapers.

    $imgsourcedir = "D:\Launchbox\Images\Sammy Atomiswave"
    $vidsourcedir = "D:\Launchbox\Videos\Sammy Atomiswave"
    
    $destdir = "Z:\roms\atomiswave"
    
    
    [xml]$xml = Get-Content $destdir\gamelist.xml
    
    $xml.gameList.game | ForEach-Object {
    
    $name = $_.name
    write-host "Game: " $name
    
    $videos = dir $vidsourcedir -Recurse
    
    $firstvid = $null
    $firstvid = $videos | Where-Object {$_.name -match $name} | select -first 1
    
    if ($firstvid -ne $null) {
    write-host "Video Found: " $firstvid.name
    
    $startchar = "/"
    $endchar = "."
    $pattern = @"
    (?<=\$StartChar).+?(?=\$EndChar)
    "@
    
    $newvidname = [regex]::Matches($_.path, $pattern).Value + "-video" + $firstvid.Extension
    $firstvid | Copy-Item -Destination ($destdir + "\videos\$newvidname")
    
    $newvideoelement = $_.AppendChild($xml.CreateElement("video"))
    $newvideoelement.AppendChild($xml.CreateTextNode('./videos/' + $newvidname)) | Out-Null
    
    }
    }
    
    
    $xml.save("$destdir\gamelist.xml")

     

  6.  Sometimes box images have too much transparency padding which just makes them display improperly.  There is an easy fix for this!

    https://imagemagick.org/script/download.php

     If you are running windows, download ImageMagick-7.1.0-58-Q16-x64-dll.exe

     I don't think this warranted creating a powershell workflow for running multiple jobs at once since it's already very quick.

     I just choose a folder of files I want to fix and run a small powershell script.  Please don't run it against ALL your images, just ones where boxes have uneven cropping.  I used it on 'Vectrex' and 'SNK Neo Geo CD' 3D boxes.


    $foldertofix = "D:\Launchbox\Images\GCE Vectrex\Box - 3D"
    $exe = "c:\Program Files\ImageMagick-7.1.0-Q16\magick.exe"

    $files = dir "$foldertofix\*.png" -Recurse

    $files | ForEach-Object {
       $file = $_.FullName
       Write-host "Fixing $file"
       & $exe $file -fuzz 1% -trim +repage $file

    }

    Results before and after below:

    image.thumb.png.b54477752a345a8d64737443bd0d379c.png

    image.thumb.png.042266e962fabae7117f0c6f309c6301.png

  7. On 1/8/2023 at 12:45 PM, darreldearth said:

    Is the new theme going to still have the original platform layout as well?

    I think the new one looks nice. Only thing I could come up with was maybe the top right box be only the description/clear logo, and then the bottom box having the recent games and the system icon somewhere. And there wouldn't be a random game 🤷‍♂️.

    Honestly I personally like simple, so just like seeing the description, system icon and the video. Anything else is just fluff to me.

    Also thanks for all the work on the theme man. I hope your personal situation works out so you don't have to stress. 

     Platform views are now updated and I think they turned out pretty good. 

     V4.4 is available now.

    Rob 

    • Like 1
  8. On 1/24/2023 at 11:11 AM, PaulyC said:

    @y2guru Hi mate,  I'm thinking of making my theme 4:3 as well as 16:9.  You've had a look at my theme and have seen how many layout conditions i have currently (46 at last count).  Would it hurt performance or break anything if i doubled them up with 4:3 conditioning?

     You shouldn't need too much to make your theme compatible across different aspect ratios.  Put your elements into grids, set CTC to 'stretch' and set images to 'fill' as necessary.  It's better to just live with the stretch/shrink as opposed to trying to account for different aspect ratios.  Videos are the one thing I don't let stretch, but I have a black canvas behind the video to fill in gaps.

         

    Rob

  9.  Not so final after all.  I got a cold so instead of going outside on my long weekend, I spent time indoors doing some some research on XAML.  I learned a few cool animation tricks which I will implement into my game wheels.  

     I also have a few other fixes, improvements and changes implemented on game views.  I noticed box wheel movement is backwards compared to my clear logo wheels and I'm not sure why.  So I'll make another wheel template for boxes I guess and fix that.

      

    Rob

     

      

    • Like 2
  10.  Could we get more control of the recent games listbox if possible?  

     - Number of days to show content
     - Activation direction

     The activation direction is backwards in my theme and I know of no way to fix that.  I asked for assistance in another thread, but did not get a reply.

     In a perfect world, it would be nice to also have a 'random game listbox' (1 item) where you can also show details with the existing random meta tags.  And also show gameplay video with a random game video tag instead of a repetitive platform video. 

    Rob

  11.  I added a random game display to my theme, but of course it's just static and doesn't do anything.  I wish Big Box had a random game listbox like it does for recent and favorite games.  Then whenever a platform or playlist is chosen, a random game can be shown and chosen if desired.  I know there's been a lot of previous discussion about a random game picker, but I guess it never gained much traction for BigBox to implement?  

     Unless anyone has some thoughts to share?  

    Rob

     

    Untitled.jpg

  12. 9 hours ago, darreldearth said:

    Is the new theme going to still have the original platform layout as well?

    I think the new one looks nice. Only thing I could come up with was maybe the top right box be only the description/clear logo, and then the bottom box having the recent games and the system icon somewhere. And there wouldn't be a random game 🤷‍♂️.

    Honestly I personally like simple, so just like seeing the description, system icon and the video. Anything else is just fluff to me.

    Also thanks for all the work on the theme man. I hope your personal situation works out so you don't have to stress. 

     The layouts are still basically the same, but a few things things have also been re-arranged.  I think I'm pretty much done except I may check out a random game plugin and see if I can integrate that as well.  

    Rob 

  13. 22 hours ago, Rincewind said:

    Some views don't warrant the game notes true but you can't just say "nobody reads that crap" because there will be users that do like to read it, so my feedback would be maybe have one vertical game wheel with the recent games.... and favourites if you can get it in there. And then a second vertical game wheel with the notes. That way you keep everyone happy 😊 

     I came up with a compromise.  I will scroll the platform notes on the status bar.

     

     

     

     

  14.  I do need feedback if you like this direction or not.

     I'm ditching the notes scroller from platforms because nobody is going to read that crap.  Maybe once, then it's useless to have.

     I moved a random game and rating in the frame as well as the device image.  In the space below, I added a recent games listview.  My focus is on what's useful and what's not (fluff).  Some fluff is ok, but too much and nobody cares.  I even thought about ditching repetitive platform videos and the random gameplay video would play instead, like a 'featured game' of sorts.  I can't do that with CTC and may have to ask the bigbox team @faeran if it's even possible?  

     It's a WIP....

    Rob

     

    Untitled.jpg

  15.  If you ever wondered about nesting elements.......  Back in the late 90's I used to program HTML in notepad and would nest tables for layout purposes...

     Reminds me of nested loops in programming in a way too.  I always enjoyed that stuff.  I do a lot of powershell and some REST API stuff these days for work.

     I don't think I would attempt it today without a WYSIWYG editor like CTC.  Thanks  @y2guru

    nest.jpg

    • Thanks 1
  16.  One more update coming soon I hope and then I'm hanging it up for a bit.  I've had A LOT of stress in my life lately and this theme stuff has been a good distraction for me.  But bad stuff is afoot, my situation is not good.  Health is ok (I think), finances are not.  I worry...

     New video borders for platform and non arcade games has been implemented.  Readability in some cases has been improved even more with additional semi opaque framing.  

     I wanted to implement 'recent games' but got no help on that and I can't get past how the controls activate the element - it's backwards from what I want.  Maybe some day...  

     Probably this weekend I'll drop 4.1 and barring any issues that will be it for now.

     

    Rob

     

    1.jpg

     

     

    4.jpg

    • Like 2
  17.  CTC 2.5 allows you to place the recent games filter list in your theme, but it's only for size and placement purposes.  

     From lots of testing, it looks like the file 'ThumbnailListView.xaml' controls the appearance.  The one that gets put in my theme by CTC 2.5 has issues with the bottom of the boxes being cropped.  When I replace it with the 'ThumbnailListView.xaml' from default theme, I don't have that cropping issue any more.  Also, the filter list title now shows where before it did not.

     So one thing solved - more or less.

     How do I change the navigation direction to the list?  Right now it's DOWN, but the recent games filter list is above my wheel.  So I want navigation to be UP, not DOWN.

    image.thumb.png.459af5658ba05c368ef947b25b9dfb3b.png

    Rob

     

  18.  I think I've made considerable improvements to the theme and hope to have something for release soon.  I'm just not completely happy with the platform views yet.  I made a lot of changes last version and they are better, but something is still missing.  

     Unfortunately, the new wheels in CTC 2.5 can't do true curves (yet).   I've also abandoned wall views for now because it's been too much work getting wheels where I want in the other views.  There has been A LOT of attention to size, spacing, angle etc.    

     I'm going to call this newer one V4 because it's been such a major update with CTC 2.5.

     

    Untitled.jpg

    test.jpg

    • Like 2
  19. On 12/27/2022 at 2:57 PM, Denys06 said:

    This will become my new permanent theme :)
    Can I hide the " status " and the " your vote " fields ?

     

      Status is there for MAME games and tells you what playable state the game is in.  For example, Good, Imperfect or Unplayable.  When viewing other types of games, that is collapsed and replaced with the version of the game rom you are playing.

     You can always directly edit the XAML files, but doing so is going to affect the layout of other items like the notes scroller below it.  At this point I would recommend just leaving it alone (for now)

    Rob

     

     

     

  20.  I think this is maybe a Big Box issue and not CTC related?  The recent games element is always cropped on the bottom.  Even if the default theme is showing, it's still cropped.

      I'm also not sure if the key activation can be changed since it's expecting the recent games below the wheel, not above it.  Therefore it reacts to down, not up control input which is backwards.

     Does anyone use 'recent games' in their theme and what is your experience?

    Rob

  21. 6 hours ago, Rob_G said:

     One thing in 2.3 that also happens in 2.5 is where platform clear logos won't show while editing a view and a playlist is selected.

    It does show once Big Box is loaded

     

    Rob

     I found the work around for using platform clear logo metadata images not showing is to make sure the platform clear logo filename matches the name of the platform.  

    Rob  

    • Game On 1
×
×
  • Create New...