WiiU Game Icons to Game Covers Script!

Discussion in 'Wii U - Hacking & Backup Loaders' started by syntax53, Jul 26, 2017.

  1. syntax53
    OP

    syntax53 Member

    Newcomer
    21
    11
    Jul 11, 2017
    United States
    Before:
    Photo Jul 12, 11 27 53 PM.jpg Photo Jul 12, 11 28 19 PM.jpg

    After:
    Photo Jul 23, 8 03 53 PM.jpg Photo Jul 23, 8 04 12 PM.jpg

    Download: https://www.dropbox.com/s/tiy59004c908j8z/wiiu_icon_updater.7z?dl=1

    How:
    • The first script I wrote can be used to convert an entire folder containing JPG's, PNG's, or other TGA's into the proper TGA icon format, including the footer text. That script is called, "wiiu_tga_convert.bat".
      • Requirements:
        • The included "tga_footer.bin" to put the footer on the end of the TGAs
        • ImageMagick (freeware). You will need to edit the wiiu_tga_convert.bat to put in the path to ImageMagick on your machine at the top of the batch.
      • Usage:
        • wiiu_tga_convert "c:\path\to\covers" "c:\path\to\place\TGAs"
    • I've included a folder in my distro titled, "TGAs" which already contains all of the US and EN "flat" covers downloaded from GameTDB.com and converted to TGAs for you. I included my conversion scripts for anyone needing other languages, wanting 3d covers, for other homebrew purposes, etc.
    • The second script is a powershell script called, "wiiu_ftp_icons.ps1". This script does many things, ultimately creating backups of the original icons on both your WiiU and locally on your PC as well as updating the icons on the WiiU with the matched game covers.
      • Requirements:
        • Powershell, obviously, along with the included PSFTP modules. Note that I had to modify these from the source as there were a number of incompatibilities with ftpiiu, namely the lack of support for the "SIZE" command.
        • Access to your WiiU's USB/NAND storage via FTP with ftpiiu_everywhere v0.4u2 (I downloaded it from the homebrew app store, make sure you get this version)
        • CBHC. I have CBHC and have no experience on the WiiU otherwise. I believe this is required for ftpiiu_everywhere anyway. Plus, I'm not sure what would happen if your WiiU booted up unpatched with replaced icons. Again, I have only had CBHC. I'll update this post if people inform me otherwise.
      • What it does:
        • The first thing the script does is to scan your chosen source's title folders (USB by default) and download all meta.xml files to your local computer. As it's doing this it (mostly) replicates the folder structure of your WiiU titles onto your local PC under a folder called, "wiiu_titles".
        • Next it reads all of those XMLs and determines the game id. As it's doing this it will check to see if a matching TGA icon is found within the "TGAs" folder. If one is found, the icon will be copied into the appropriate folder beneath "wiiu_titles".
        • Lastly, it will then scan your local "wiiu_titles" folder for any icons that have been matched. For any matched icons it will...
          1. Download the remote icon and save it (locally) within each title's folder as "iconTex.bak"
          2. Upload that "iconTex.bak" back to your WiiU for safe keeping, in case you accidentally delete the local copy.
          3. Only after a local backup and a remote backup have been verified will it upload a replacement icon.
        • I also have options in place to revert the changes. You can also choose to only update a single title or revert a single title which can be done by title name (requires the local XML files to be downloaded) or title id.
      • Usage:
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 (default execution, replacing the IP with your WiiU's IP, obviously)
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -nand (operate on the NAND instead of USB)
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -single_title_id "101c9400" (update a single title by ID [only enter the last 8 characters])
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -single_title_name "lego city undercover" (update a single title by name)
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -single_title_name "super smash" -force (force update a single title by name)
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -single_title_name "zelda" -revert (revert all titles with "zelda" in the name. note this will actually give you the matching title IDs and then prompt you execute the script again providing each title id. I could change this in the future.)
        • powershell -f wiiu_ftp_icons.ps1 -ip 192.168.1.123 -revert (REVERT ALL WIIU ICONS BACK TO DEFAULT AND DELETE THE REMOTE BACKUPS)
      • Notes:
        • If a local backup file exists, The script assumes the remote icon has been updated. This is to allow you to run the script multiple times without having to keep scanning the remote filesystem all the time, which is quite slow. This is where the "-force" command comes in the play. This will force an upload of the icons to the WiiU.
        • Local and remote icon backups will never be overwritten. This should preserve the ability to always retain the actual original icon file.
        • A revert operation will first verify a local backup exists or download it from the WiiU if one does not. It will then delete the remote icon and upload the original back. Lastly, once a new icon upload has been verified, it will delete the remote backup so no trace is left. The "RNTO" (rename to) command seems to be unsupported with ftpiiu.
        • I haven't actually tested the "-nand" switch other than verifying that it can scan my wiiu's structure, download the meta files, etc. I don't have any titles stored on my WiiU's nand. I don't see any reason it wouldn't work though as it's basically just a substitution in the path name from "/storage_usb/usr/title" to "/storage_mlc/usr/title". Everything else about it is exactly the same.
     
    Last edited by syntax53, Aug 19, 2017 at 7:35 AM
    peteruk, cucholix, Kafluke and 3 others like this.
  2. sadpandajurrin

    sadpandajurrin Newbie

    Newcomer
    5
    0
    Nov 26, 2016
    United States
    I love the idea and this is a great implementation with nice features. Great Job!
     
  3. syntax53
    OP

    syntax53 Member

    Newcomer
    21
    11
    Jul 11, 2017
    United States
    Updated to support ImageMagic v7 (v6 no longer supported). Also fixed some potential issues with paths in powershell. There could be some potential path issues with the batch file. I can convert to powershell if there is an issue and interest to do so.
     
    Last edited by syntax53, Aug 19, 2017 at 7:36 AM