Kaplas80 / TranslationFramework2

Aplicación para facilitar la traducción de diferentes juegos
37 stars 15 forks source link

Export images doesn't work #23

Closed linkmadao closed 3 years ago

linkmadao commented 3 years ago

When i use the exported images in newer version of this software, this is the result: image

Using older version: image

This is how this images are exibed:

Left -> image exported in the older version of software Right -> image exported in the newer version of software image

Kaplas80 commented 3 years ago

Hi!

The image management in the app have not changed in months (probably more than a year). I've just tried to export the same file with the latest app and it works for me:

image

Are you exporting from the original game files or modified ones?

linkmadao commented 3 years ago

I'm exporting from the original game files with automatic and manual method.

Kaplas80 commented 3 years ago

Hi!

Did you manage to export the textures correctly?

linkmadao commented 3 years ago

No, you still have the same problem. I tested it on other computers and the same result happens.

PS: I always use the most current version of your code.

Kaplas80 commented 3 years ago

I still think that the problem is that your game files are corrupted.

I'd try to verify them with steam and then create a new translation project with the app, just to check if the export in that case is ok.

Anyway, if you upload any of the wrong images to mega (or wetransfer or other upload service), I can take a look and check if I can find the problem.

linkmadao commented 3 years ago

So, the problem doesn't just happen with my game, I already uninstalled and downloaded it several times and it keeps happening, and I always tested it by creating new projects.

I have already asked other members of my team to take the test and the same thing happens.

This happened on Yakuza 0 and Yakuza Kiwami, so I think it is something related to the code itself.

Kaplas80 commented 3 years ago

Well, then please upload any of the wrong image files, so I can check it.

linkmadao commented 3 years ago

ifc_jimaku_majima.zip

Kaplas80 commented 3 years ago

But that's a translated image, not an original one:

image

I think that you're saving it with a wrong compression. The original is DXT5 and yours is ARGB, I don't know if the game can read that format.

Original: image

Yours: image

linkmadao commented 3 years ago

I send the wrong file, sorry.

ifc_jimaku_majima.zip

Both this and the previous file were exported by your software. If I import them, the error happens.

Kaplas80 commented 3 years ago

You are right: my app is exporting the images as ARGB. It is very rare, because the last change in Yakuza's DDS manager is from 2019, and we haven't noticed this behaviour until now.

I'm thinking in 2 possible solutions:

  1. You can try to convert the dds files to DXT1 or DXT5 and import them with the app. I'm 99% sure that it will work.
  2. You can change every typeof(DDSFile) with typeof(DDS2File) in Game.cs. It will use my latest DDS manager. It exports the images as PNG and converts them to the right format when importing. The problem is that it is incompatible with previous projects, so I'm not sure with merging those changes in the main branch.
Kaplas80 commented 3 years ago

I've changed the type from DDSFile to DDS2File. It's a breaking change and it won't work with existing projects.

To update a existing project, you have to:

  1. Export all texts to Po format before updating the app
  2. Update the app
  3. Create a new translation project
  4. Import previous exported texts.