ROM Hack RELEASE [Release/Tutorial] Switch theme injector : Easily make custom themes

  • Thread starter Thread starter exelix11
  • Start date Start date
  • Views Views 285,339
  • Replies Replies 467
  • Likes Likes 57
You can use http://waifu2x.udp.jp/ to upscale smaller images into a resolution higher than 720p, then crop it to be 720p. I've done this to convert a few 3DS themes to switch themes and it looks great. Attached (orig.png) is an example - The original Nintendo 3DS theme at 1007 x 480, then blown up to 4028 x 1920, then cropped (orig.png) to become a switch theme (using just the top of what you would see in the 3DS theme). This is an extreme example as most images can be found in higher resolutions on Google Images, but if not you can use this website. It's pretty amazing.
 

Attachments

  • orig.png
    orig.png
    64.1 KB · Views: 365
  • orig5.png
    orig5.png
    70.5 KB · Views: 373
  • Like
Reactions: XaneTenshi
Here is a png you can use to make it yourself I can’t share the actual theme though, I’ve also fixed the colour and make the bar behind the icons more legible View attachment 145326

Oh I am DEFINETELY grabbing that. Damn that looks good. The amount of details on the Skyward Sword themed image is dope as hell:P
 
What firmware ? Only that xci ? have you tried an nsp version ? There is a similar issue with homebrew launcher on 4.0, unforunately i have no clue about what could be the culprit, the only thing i can think of are slow sd cards but doesn't seem a very convinging explaination
My Switch info is under my signature, from what I'm seeing LayeredFS is interfering with the loading session of the game upon launch [The book icon on the bottom right doesn't turn its pages]. Basically the loading screen freezes and prompts the same crash log you would get from using a theme upon the Switch boot before the 2.0 injector was out.
UPDATE: SXOS 2.1 fixed the Valkyria Chronicles 4 crashing with LFS
 
Last edited by MasterJ360, , Reason: Update
To anyone who cares: themes in user page/album seem to be broken because of a non-obvious logic problem in ReiNX. OpenSdDirForAtmosphere appears to not work for some reason on some system applications, resulting in a false result for should_mitm.

A patch - open up fs_mitm/source/fsmitm_service.hpp and replace the should_mitm function with this:

Code:
    static bool should_mitm(u64 pid, u64 tid) {
        if (Utils::HasSdMitMFlag(tid))
            return true; // No checks, assume the user knows what they're doing.
        if (tid < 0x0100000000010000ULL)
            return false; // Don't override system titles unless the user flags it.

        FsDir tst;
        char slash = '/';
        if(!(R_SUCCEEDED(Utils::OpenSdDirForAtmosphere(tid, &slash, &tst))))
            return false; // Open failed, don't mitm.
        fsDirClose(&tst);
        return true;
    }

This changes how fs_mitm works, so be aware that fsmitm.flag will now cause fs_mitm to be injected to the process even if no files are present to replace, e.g. it's now a force to mitm flag instead of only considering whether to mitm on system stuff. This will make the system applications work with themes.
 
Last edited by chaoskagami, , Reason: settings is part of qlaunch and I didn't mean to type that
To anyone who cares: themes in settings/user page/album seem to be broken because of a non-obvious logic problem in ReiNX. OpenSdDirForAtmosphere appears to not work for some reason on some system applications, resulting in a false result for should_mitm.

A patch - open up fs_mitm/source/fsmitm_service.hpp and replace the should_mitm function with this:

Code:
    static bool should_mitm(u64 pid, u64 tid) {
        if (Utils::HasSdMitMFlag(tid))
            return true; // No checks, assume the user knows what they're doing.
        if (tid < 0x0100000000010000ULL)
            return false; // Don't override system titles unless the user flags it.

        FsDir tst;
        char slash = '/';
        if(!(R_SUCCEEDED(Utils::OpenSdDirForAtmosphere(tid, &slash, &tst))))
            return false; // Open failed, don't mitm.
        fsDirClose(&tst);
        return true;
    }

This changes how fs_mitm works, so be aware that fsmitm.flag will now cause fs_mitm to be injected to the process even if no files are present to replace, e.g. it's now a force to mitm flag instead of only considering whether to mitm on system stuff. This will make the system applications work with themes.
Are you sure ? I don't see the any issue here
Settings is part of qlaunch, on 6.0 custom themes don't work on it because they changed the layout structure, i'm looking into that. Album and user page are standalone titles and are not supported by this tool yet
(unless safe_path is wrong, but it shouldn't be cause layered fs works normally. You could try logging that )
 
Last edited by exelix11,
Are you sure ? I don't see the any issue here
Settings is part of qlaunch, on 6.0 custom themes don't work on it because they changed the layout structure, i'm looking into that. Album and user page are standalone titles and are not supported by this tool yet
(unless safe_path is wrong, but it shouldn't be cause layered fs works normally. You could try logging that )

I didn't mean to write "Settings" there, whoops.

The point is that even if you hack up a theme for Album and User Page manually, they don't use anything present in layeredfs even with fsmitm.flag present. The user-friendly tools obviously don't handle non-qlaunch applets at the moment. For an example of a theme that has a custom User Page/Album, go fetch PurpleBlackAddon off the discord.

I'm still not 100% sure why, but should_mitm doesn't recieve a valid handle back and thus doesn't apply layeredfs to the User Page and Album.
 
Last edited by chaoskagami,
so what do i need to do for sx 2 and fw 6?
i saw some talks about residentmenu.szs for the main menu.
and some talks about common.szs for the rest of the menus.
is this true?
i know i need to put it in sxos/titles/010000000001000/lyt/.
i just need to know what file or both?
 
I didn't mean to write "Settings" there, whoops.

The point is that even if you hack up a theme for Album and User Page manually, they don't use anything present in layeredfs even with fsmitm.flag present. The user-friendly tools obviously don't handle non-qlaunch applets at the moment. For an example of a theme that has a custom User Page/Album, go fetch PurpleBlackAddon off the discord.

I'm still not 100% sure why, but should_mitm doesn't recieve a valid handle back and thus doesn't apply layeredfs to the User Page and Album.
Still not getting that, fsFsOpenDirectory is unlikely to fail just for system titles tids, and if it failed it would mean that layered fs can't load the files from sd so it would break in further stages.
Anyway i don't use reinx so can't confirm this issue, if you're sure about this open an issue on github.
I can confirm that on atmosphere user page modding works.

so what do i need to do for sx 2 and fw 6?
i saw some talks about residentmenu.szs for the main menu.
and some talks about common.szs for the rest of the menus.
is this true?
i know i need to put it in sxos/titles/010000000001000/lyt/.
i just need to know what file or both?
just residentmenu , idk about sxos but on atmosphere/reinx you need also the fsmitm.flag file
 
@exelix11

Are there any plans for an eventual HomeBrew App that will allow us to change themes and maybe even convert images to custom themes?

I would love for this to become reality because I have so many awesome Themes I'd like to try:)
 
@exelix11

Are there any plans for an eventual HomeBrew App that will allow us to change themes and maybe even convert images to custom themes?

I would love for this to become reality because I have so many awesome Themes I'd like to try:)
Making themes directly on the switch instead is going to be harder, not impossible, but all the needed libs should be ported to c++ (yaz0, sarc, bntx) and the actual patching code so definitely pretty challenging and i'm not doing it.
Changing themes on the switch should just require moving around some files and rebooting, you can use an ftp server and a phone, i guess if nobody is doing an app for it i could but don't expect anything fancy neither expect it soon cause i'm working on something cool that will come most likely with the next release.
 
Making themes directly on the switch instead is going to be harder, not impossible, but all the needed libs should be ported to c++ (yaz0, sarc, bntx) and the actual patching code so definitely pretty challenging and i'm not doing it.
Changing themes on the switch should just require moving around some files and rebooting, you can use an ftp server and a phone, i guess if nobody is doing an app for it i could but don't expect anything fancy neither expect it soon cause i'm working on something cool that will come most likely with the next release.

It's fine, I can wait. I was under the impression that you were not doing these things alone anyway, so if you are, of course that makes things harder. And the ability to convert Themes on the Switch itself would just be a really cool bonus feature, but I would REALLY like the ability to switch around my themes just using the Switch itself.

I was kinda hoping for a HomeBrew that would allow changing the currently used common.szs file for another common.szs file which would of course contain a different theme. The idea was that all these files would be on the SD Card, so that you could select from range of Themes and only connect the SD Card to a pc/use ftp when you wanted to expand the number of themes.

Is this asking too much though?
 
I was under the impression that you were not doing these things alone anyway
We're a team but basically i'm the only one wokring on this tool, the others are making a website and other stuff.

I was kinda hoping for a HomeBrew that would allow changing the currently used common.szs file for another common.szs file which would of course contain a different theme. The idea was that all these files would be on the SD Card, so that you could select from range of Themes and only connect the SD Card to a pc/use ftp when you wanted to expand the number of themes.

Is this asking too much though?
Totally not, a theme switcher should have been there from the start but nobody actually made it ¯\_(ツ)_/¯ .
 
  • Like
Reactions: XaneTenshi
We're a team but basically i'm the only one wokring on this tool, the others are making a website and other stuff.


Totally not, a theme switcher should have been there from the start but nobody actually made it ¯\_(ツ)_/¯ .

Well at least I am not asking for something impossible then XD
 
Y'all my Switch keeps freezing on the Nintendo splash screen at boot. All I did was make the fsmitm.flag file and put the theme I made (or someone else made) with the newest version of the tools in the OP and enabled fsmitm in Reinx. If I disable fsmitm it boots just fine (without reading the theme obv). I tried with multiple themes and I get the same result. Any ideas?
 
Y'all my Switch keeps freezing on the Nintendo splash screen at boot. All I did was make the fsmitm.flag file and put the theme I made (or someone else made) with the newest version of the tools in the OP and enabled fsmitm in Reinx. If I disable fsmitm it boots just fine (without reading the theme obv). I tried with multiple themes and I get the same result. Any ideas?
Never encountered freezing, only crashes. Make sure that you're on latest version of reinx or try using atmosphere, double check the paths and the firmware version cause themes are not compatible with different versions of the menu
 
Isn't possible to use theme in settings on 6.0 ?
How do you dump the file "ResidentMenu.szs" ?
 
Isn't possible to use theme in settings on 6.0 ?
How do you dump the file "ResidentMenu.szs" ?
If everything goes as planned themes in settings on 6.0 and more will come with the next version.
To dump the theme files from your console basically you need to mount the system partition with hacdiskmount, find the qlaunch nca in titles and unpack it with hactool, i'll write a more detiled guide for this but it's not hard at all and you don't really need it cause you can use another custom theme as a base.
 
Last edited by exelix11,
  • Like
Reactions: Asia81

Site & Scene News

Popular threads in this forum