exelix11 / SwitchThemeInjector

Create custom themes for the nintendo switch !
GNU General Public License v2.0
972 stars 62 forks source link

Feature request: Preview .szs theme #28

Closed Zireael closed 5 years ago

Zireael commented 5 years ago

Hi, Would it be possible to add a preview feature for .szs themes? I realize we switched to new file format and it has preview, but asking for some of the legacy files that I have.

Thanks!

suchmememanyskill commented 5 years ago

The previewing system on nxthemes doesn't quite work the same way as szs previewing would. in an nxtheme (which is an archive, kinda like a .zip), there's an image included pre-generated by the pc app. szs themes would require reading the .btnx, and checking for a specific item in said btnx, and the location of the image is different for every system version. On top of this, the extracted image would have a format of a dds. tldr, it's quite hard to create a .szs previewing system. i don't see this happening any time soon

exelix11 commented 5 years ago

^ In theory it's possible but it would require writing a decoder for the btnx texture format (currently only an encoder is implemented and "do the same thing backwards" doesn't really apply here) and i'm not interested in doing it because it would delay other features i'm working on and cause for regular themes (aka without animations) szs should be avoided cause they break with updates.

Zireael commented 5 years ago

Fair enough, thank you for thorough explanation. Is it possible to convert a .szs into .nxtheme other than extracting graphics one by one by hand and putting the dds right back. Sorry to trouble you - I guess I'll just sit soon on one weekend and convert my files to the new format.

On a side note - two things: You know how each theme file applies to a specific 'screen'. Did you consider to make your .nxtheme file a container that can hold several 'screens' as a package? I'm trying to propose some way of organising all those files. Or at least filtering them by category - currently it's a bundle of everything sorted by alphabetic name.

Secondly, let's say someone makes a theme for Settings that I like a lot (as in, nice background), but would prefer to see that background on my lock screen instead. I guess I could just make my own lock screen file with the background. But, what if instead it would be possible to decouple backgrounds and screen display schemas? Could I open (inside Switch) a Settings theme with a nice background, and say: I want to use this background with that other Lockscreen theme schema. So layout, buttons etc would come from Lockscreen, but the background from Settings.

Again, it's probably too much hassle for you, since I can just make a file for myself on PC. just a thought. I appreciate your programs as is already ^^

Ah, finally, you know some people come back and remake their original theme files, either to pit in better graphics or change layout slightly - would it be possible to include a file version flag (and maybe a freetext changelog note - people could put in their name or their website where you could check for their other work or updates) flag inside the archive and have it displayed within Switch when browsing?

Have a nice day.

exelix11 commented 5 years ago

Is it possible to convert a .szs into .nxtheme other than extracting graphics one by one by hand and putting the dds right back.

Nope for the same reason that makes it hard do have a preview, you have to extract the bntx with advanced tools of the injector and extract the image with bntx editor

You know how each theme file applies to a specific 'screen'. Did you consider to make your .nxtheme file a container that can hold several 'screens' as a package? I'm trying to propose some way of organising all those files. Or at least filtering them by category - currently it's a bundle of everything sorted by alphabetic name.

Thought about that but the point of themes is customization so people can mix and match the themes they want, making a package that contains multiple parts will lead to people asking a way to install only a particular image in the pack, so i'd have to add a screen that asks what do you want to install that would make packs pointless. As a workaround you can install multiple files at the same time by selecting them with Y and organize them in folders.

Secondly, let's say someone makes a theme for Settings that I like a lot (as in, nice background), but would prefer to see that background on my lock screen instead. I guess I could just make my own lock screen file with the background. But, what if instead it would be possible to decouple backgrounds and screen display schemas? Could I open (inside Switch) a Settings theme with a nice background, and say: I want to use this background with that other Lockscreen theme schema. So layout, buttons etc would come from Lockscreen, but the background from Settings.

This is not a bad idea but it may not be as useful as expected because theme images often are designed to match a particular layout (so some ui parts are actually in the image) and it wouldn't look good with a different layout or in a different part of the menu.

Ah, finally, you know some people come back and remake their original theme files, either to pit in better graphics or change layout slightly - would it be possible to include a file version flag (and maybe a freetext changelog note - people could put in their name or their website where you could check for their other work or updates) flag inside the archive and have it displayed within Switch when browsing?

The name and author fields of the themes can contain any text, add a version number in the name and a short url in the description. About theme distribution there's something in the works so stay tuned.