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

[Request]Add support to Castlevania The Adventure ReBirth - Wiiware #139

Closed
evil-trainer opened this issue Nov 22, 2024 · 6 comments
Closed

Comments

@evil-trainer
Copy link

evil-trainer commented Nov 22, 2024

Hello! First of all I'd like to thank you for the amazing tool freemote is!

I tried Freemote on Castlevania the Adventure on the Wii and it somewhat extracted the pictures of some of the .psb files, but it errored out in several of them. Also, the ones it managed to extract were a bit pixelated or with completely scrambled results (maybe a swizzle issue?). The ones that produced errors didn't output any images at all.

Here's the comparison of results from Freemote and Dolphin (by dumping the textures with the emulator feature):
Castlevania

The .psb that couldn't be extracted, produced this error:
Erro

Finally, I'm attaching the .psb samples so they can be looked at. Thanks in advance!
Castlevania the Adventure ReBirth .PSB files.zip

UlyssesWu added a commit that referenced this issue Nov 23, 2024
@evil-trainer
Copy link
Author

I'm so happy right now, Mr. Wu! 😭😭😭😭
It's been months since I started trying to find a way to extract these textures so I could translate the game to my language! And now, thanks to your amazing tool, I'll finally be able to do it! Thank you very much!!

logo_us-texture
logo-texture
rebirth-texture
key-texture
system-texture
font-texture

@evil-trainer
Copy link
Author

I'll close this since it has been fixed =)

@UlyssesWu
Copy link
Owner

I think I haven't fixed the font unclear issue... But I haven't found any problem on that actually. My code looks correct.
If someone knows why the font color (CI4 format) looks strange, please let me know.

@evil-trainer
Copy link
Author

evil-trainer commented Nov 23, 2024

I think I haven't fixed the font unclear issue... But I haven't found any problem on that actually. My code looks correct. If someone knows why the font color (CI4 format) looks strange, please let me know.

Yeah, I noticed that too. But honestly, like you said, it doesn't seem to be a problem. I wonder if I just replace the extracted image with the one from Dolphin (after I edit it to insert my characters, of course) I'll make it work as it should...

I'll give it a try!

P.S.: this is how some of the images are supposed to be extracted, right? I'm assuming they're assembled by the game during runtime, right?

1 -bg6
3 -moon
4 -sky6

@UlyssesWu
Copy link
Owner

UlyssesWu commented Nov 24, 2024

@evil-trainer

I wonder if I just replace the extracted image with the one from Dolphin (after I edit it to insert my characters, of course) I'll make it work as it should...

You have to do more than that. If you checked the font's json file you'd know the image is using CI4 format.
That's a image with palette. You cannot just replace it with a common 32bpp image or you will see a warning when PsBuild.
There're 2 choices:

  1. Make a 4BppIndexed image (with palette). That's kind of hard because I even don't know which tool can do this (without writing code by myself to generate such images). In Photoshop you can use "Save for Web (Legacy)" to export a PNG-8 (8BppIndexed, CI8) but not a PNG-4.
  2. Edit the json file "type": "CI4" to "type": "RGBA8" (or RGB5A3) and remove "pal": "#resource#*". Then you can replace the image with a common PNG. Or use CI8 with image exported from PS: Save for Web, PNG-8, 256 colors) and don't remove "pal".

The latter is eaiser but will take more memory, but for most games it should be ok.

You should check all images' formats you're going to edit, If they're CI series, you have to be careful.
You can also check by right click on exported image - Properties - Detail - Bit Depth.
A common RGBA format will be 32, CI8 (PNG-8) will be 8, CI4 (PNG-4) will be 4.

this is how some of the images are supposed to be extracted, right?

I have no idea, either. It can be, because it's map tiles, can be devided to 10x10 tiles. But I'm not sure.
If you won't ever edit them and you want to avoid any problem, the best choice is do not decompile and recompile them.
If you are using PsbDecompile info-psb, you can extract PSBs without adding -a.
Then, you just choose the PSBs you must edit, decompile and recompile and then replace them.
Finally you repack with PsBuild info-psb. By this way you kept those map tile PSBs untouched.

@evil-trainer
Copy link
Author

Oh, I see!

Then I guess the best approach is indeed the .json editing method. I guess I'll just edit the .extracted png and rebuild it with freemote then.

About the 10x10 tiles images, thankfully I won't have to mess with that since my project is about translation, so I'll mainly focus on UI textures and such.

I'm currently trying to figure out all the .json flags and stuff so I can manipulate font glyphs and other UI text. I'll try to start with the "NOW LOADING" text and replace it with "CARREGANDO". It seems to be a straightforward process: the image is a 32x32 png with the 8 unique letters that form the "NOW LOADING" text.

I'll have to learn to do that first, though 😅

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

No branches or pull requests

2 participants