Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.g4tx/.nxtch Import/Export Error #306

Open
light8227 opened this issue Aug 31, 2023 · 8 comments
Open

.g4tx/.nxtch Import/Export Error #306

light8227 opened this issue Aug 31, 2023 · 8 comments

Comments

@light8227
Copy link

light8227 commented Aug 31, 2023

Yo-kai Watch 4++
Nintendo Switch
.g4tx/.nxtch
Filetypes: .g4tx - Archive, .nxtch - Image

The plugin can open the .g4tx and .nxtch files, but cannot export or import a file out of them. Attempting to do so results in "An unhandled exception occured. Refer to the log for more information. The application will be closed."
I've provided the plugin in question and files it doesn't work on.

Sample files: https://drive.google.com/file/d/1P4hyH1q9k4qvz33NXdIXgCQsXc_1Qegj/view?usp=sharing

@RealDarkCraft
Copy link

Hi,
the modified version only contain Level5 and Criware plugins
https://cdn.discordapp.com/attachments/799400810093871155/1038170089494679612/Kuriimu2_modified.zip (created by vidpic)

@light8227
Copy link
Author

These are the same plugins that I linked in my initial Issue.
Even downloading that zip specifically has the Format 68 errors on the specific files that have them like before.

@RealDarkCraft
Copy link

in the hex data of the subgames03_41.nxtch the encoding definition are 44
image

but in the code of the nxtch (in kuriimu) :
public static IDictionary<int, IColorEncoding> Formats = new Dictionary<int, IColorEncoding>
{
[0x25] = ImageFormats.Rgba8888(),
[0x42] = ImageFormats.Dxt1(),
[0x4D] = ImageFormats.Bc7()
};
there is no encoding specified for byte the "44"

@RealDarkCraft
Copy link

I don't know what is the encoding for byte 44 but you will have to try some encoding formats

@light8227
Copy link
Author

Don't know if it's the best method for this, but I kind of made some progress, in a bit of a hacky sort of way.
By importing the old code for extracting and importing into a different plugin where the Format 68 error was solved, I can now view and extract or import the textures from before.
Unfortunately, it now causes an error when trying to save an edited texture (Even one where I reimported the same texture) and I'm not really sure where to start since there's thousands of changed lines between the two different plugins.
So I'm not sure if this is the best path to try, but it is something...?

Edited plugin: https://drive.google.com/file/d/1qpDYMF8G0i6rvqG6B0homBweemWoFHi6/view?usp=sharing

@RealDarkCraft
Copy link

do you know how to compile kuriimu 2 plugins ? (because with visual studio code (dotnet build) i have pacakge nuget problems)

@Salads
Copy link

Salads commented Sep 6, 2023

I had the same issues, using Visual Studio Community 2022. (Windows) @RealDarkCraft

It seems to put old nuget files in in the Global Packages Folder, which are missing some functions and definitions. (I have no idea where these older versions came from)

However, the nuget files in the repo that get built seem to be up to date. (They are created when you build the Kumiiru2 solution, and are automatically placed in the nuget folder in your repo)

I deleted them in that global cache folder, and cleaned and rebuilt the plugin solution, and that seems to get it to use the up to date versions.

@RealDarkCraft
Copy link

@light8227 the kurrimu crash when saving the file (the one which had error 68) is still present, I modified the dev version of kuriimu by adding the dxt5 format (for format 68) but when saving, its crash.
so the problem of Kuriimu crashing when saving is still present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants