NX-Editor / NxEditor.TotkPlugin

NX-Editor plugin for exclusive Tears of the Kingdom support
GNU Affero General Public License v3.0
1 stars 1 forks source link

Add ZsDic path as a separate setting #3

Closed evil-trainer closed 6 months ago

evil-trainer commented 7 months ago

Hi!

So, I've been trying to create a fan translation for the upcoming Mario game "Mario vs Donkey Kong" and I'm using the demo to start training this skill (I'm a total noob in Switch fan translations). I succesfully extracted all the files with the game's texts and I was told Nx Editor could edit the filetype is used for text rendering in the game. Well, turns out I tried Nx Editor and I got a "IHandle filetype not supported" error. So, I'd like to request support for this filetype (.zs) so we all can work with it on Nx Editor, if possible!

MasterBubbles commented 7 months ago

.zs is not the extension of the file, it just means that it is a ZSTD compressed file Usually Nintendo places the extension just before, so for example like *.sarc.zs

evil-trainer commented 7 months ago

.zs is not the extension of the file, it just means that it is a ZSTD compressed file Usually Nintendo places the extension just before, so for example like *.sarc.zs

Oh, I see. So, is it possible to implement a way to support this format?

MasterBubbles commented 7 months ago

It depends the actual format of the file, .zs isn't the actual file's extension. It's like if you took a .png file, compressed it in a .zip archive and named it .png.zip You'd need to know what is the actual file's extension What is the full name of the file?

evil-trainer commented 7 months ago

USen.Product.dmo.sarc.zs

It depends the actual format of the file, .zs isn't the actual file's extension. It's like if you took a .png file, compressed it in a .zip archive and named it .png.zip You'd need to know what is the actual file's extension What is the full name of the file?

USen.Product.dmo.sarc.zs

MasterBubbles commented 7 months ago

USen.Product.dmo.sarc.zs

Interesting, does the game dump for Mario vs Donkey Kong include a file called Pack/ZsDic.pack.zs or something similar that contain "zsdic" in the name (or in the file extension)?

If so, then it can be ZSTD decompressed using those as dictionaries, if not then it can probably be decompressed without dictionaries.

SARC files, once you've done the ZSTD decompressing, are editable either with Switch Toolbox or with NX Editor

evil-trainer commented 7 months ago

USen.Product.dmo.sarc.zs

Interesting, does the game dump for Mario vs Donkey Kong include a file called Pack/ZsDic.pack.zs or something similar that contain "zsdic" in the name (or in the file extension)?

If so, then it can be ZSTD decompressed using those as dictionaries, if not then it can probably be decompressed without dictionaries.

SARC files, once you've done the ZSTD decompressing, are editable either with Switch Toolbox or with NX Editor

It does contain the Pack/ folder, but not the ZsDic.pack.zs file nor any file with "zsdic" in its name 😢 Captura de tela 2024-02-07 155959 Captura de tela 2024-02-07 160016 Captura de tela 2024-02-07 160039

MasterBubbles commented 7 months ago

In that case I recommend using Switch Toolbox, that tool is better suited, it supports both ZSTD compressed files and SARC archives. You should be able to directly open the file without needing to do the ZSTD decompressing https://github.com/KillzXGaming/Switch-Toolbox

evil-trainer commented 7 months ago

In that case I recommend using Switch Toolbox, that tool is better suited, it supports both ZSTD compressed files and SARC archives. You should be able to directly open the file without needing to do the ZSTD decompressing https://github.com/KillzXGaming/Switch-Toolbox

Ok, then! Thank you for your time anyway! 😁👍🏻

MasterBubbles commented 7 months ago

If needed, because .sarc archives contain multiple other files, you can extract them with Switch Toolbox and open those with other tools depending on the types of files you find inside those

MasterBubbles commented 7 months ago

Oh, by the way, is it a Mals file? By that I mean files contained in a "Mals" folder. If so, then it means the SARC archive contains MSBT files, which you can directly edit with MSBT-Editor (basically the same as NX Editor but not dependent on the TOTK ZSTD dictionaries to function I think)

ArchLeaders commented 7 months ago

@evil-trainer NX-Editor supports SARC, ZS, and MSBT, you need to install the TotK and the EPD plugin.

evil-trainer commented 7 months ago

Oh, by the way, is it a Mals file? By that I mean files contained in a "Mals" folder. If so, then it means the SARC archive contains MSBT files, which you can directly edit with MSBT-Editor (basically the same as NX Editor but not dependent on the TOTK ZSTD dictionaries to function I think)

Oh, that might just do it for me then! Gotta try it now! Thanks!

evil-trainer commented 7 months ago

@evil-trainer NX-Editor supports SARC, ZS, and MSBT, you need to install the TotK and the EPD plugin.

Wait, I thought I did that? When 1st running the installer there's a prompt for installing them, right? I'm pretty sure I did install that but it seems I didn't 😅

MasterBubbles commented 7 months ago

Well while Arch was answering, since the demo is free on the eshop I installed and dumped it to test. I can confirm that it works well with NX Editor when the TotK and EPD plugins are installed correctly

EDIT: it only works if the TotK plugin is setup with a path to a TotK dump with Pack/ZsDic.pack.zs. Creating a dummy one doesn't work. So if you wait until next update, it'll support all games and won't be dependent on a TotK dump to function :)

ArchLeaders commented 7 months ago

It might require a dummy ZsDic.pack.zs file to function, I didn't implement that part very gracefully.

evil-trainer commented 7 months ago

It might require a dummy ZsDic.pack.zs file to function, I didn't implement that part very gracefully.

Well, guess my dumb request may be used to implement that :P Hopefully I could be of some help somehow then lol

ArchLeaders commented 6 months ago

Fixed in https://github.com/NX-Editor/NxEditor.TotkPlugin/commit/bfa56a93f937d79b33d5508716ef3ed1af8ff30e