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

How to get key to extract info.psb.m (and body.bin) for ripping Koihime Enbu Steam? #124

Closed
CG33144 opened this issue Feb 24, 2024 · 10 comments
Assignees
Labels
help wanted psb.m about xxx_info.psb.m and xxx_body.bin question https://github.com/betaseeker/How-To-Ask-Questions resource format
Milestone

Comments

@CG33144
Copy link

CG33144 commented Feb 24, 2024

A beginner at this and searched the dlls and cdxes but to no avail, desperately need some help
Game is Koihime Enbu RyoRaiRai Version 3 on Steam PC
Here're some files that I predicted might have the MDF/MFL key alongside the one of info.psb.m examples below
files.zip

@UlyssesWu
Copy link
Owner

UlyssesWu commented Feb 24, 2024

Thanks for providing all required files at once.
It locates in the .exe file. The key is gYk,1H.6x and the length is 97.
.\PsbDecompile.exe info-psb -k gYk,1H.6x -l 97 windata_eng_info.psb.m
To be honest it's the first time I saw punctuations in a key. The M2 was making some useless try to make it harder.

@UlyssesWu UlyssesWu added question https://github.com/betaseeker/How-To-Ask-Questions psb.m about xxx_info.psb.m and xxx_body.bin labels Feb 24, 2024
@CG33144
Copy link
Author

CG33144 commented Feb 24, 2024

It worked flawlessly, thank you very much!
It's definitely strange to see punctuations on a seed/key and also not in 11 (131) length, no wonder why I missed it despite being in the open.
some of the graphics files are blurry and also in psb.m tho, how do I extract them completely as well?

@UlyssesWu
Copy link
Owner

some of the graphics files are blurry and also in psb.m tho, how do I extract them completely as well?

Blurry doesn't sound like a FreeMote bug but you can upload a PSB sample for that if you think so.
To extract all data in .psb.m and body.bin, append -a (extract all):
.\PsbDecompile.exe info-psb -k gYk,1H.6x -l 97 windata_eng_info.psb.m -a

@CG33144
Copy link
Author

CG33144 commented Feb 24, 2024

Hmm yeah, tried again and it apparently can't extract files like these even with -a append
ED01.psb.zip
SFF.zip
SFF

KANU SFF.zip

Feels like some of these were made from different engine, like Nekopara's KirikiriZ

@UlyssesWu
Copy link
Owner

Okay, it's not "blurry" actually, it's a new image type which is not yet supported. I guess it may take a while.

@UlyssesWu
Copy link
Owner

UlyssesWu commented Feb 25, 2024

@CG33144 Unfortunately your uploaded files are not decryptable directly. Is it using another key?
You may have to upload the whole psb.m + body.bin (via google drive or something).

It's weird if you did get these files via PsbDecompile info-psb because this command will try it's best to output PSB instead of MDF or MFL.
But you still got MDF/MFL. If they come from psb.m + body.bin, the key is undetermined (the relative path is a part of key, but this info is lost if you only upload such file).

Or, you can use PsbDecompile info-psb -a and upload all .psb.m.resx.json files related to all your previously uploaded files. These resx.json files recorded the actual key used.

@CG33144
Copy link
Author

CG33144 commented Feb 26, 2024

There's no .psb.m.resx.json in my files before, so I'll just give you the raw .body.bin in drive instead.
Can only upload one of em currently tho, sorry bout that. Tho all the graphics files I need are encrypted inside it anyway.
https://drive.google.com/file/d/1mxBdPJ8i3Jy4IbTyCiakJy896bpsfvXQ/view?usp=sharing
https://drive.google.com/file/d/1OKTmGRyFRf7ZE6DMPOGbxy38AcIgBdkQ/view?usp=sharing

@UlyssesWu
Copy link
Owner

As the inventor of PSB format, the M2 is using such heavily modified things in their own games...
It's a waste of time to support them - there is almost no chance for these modifications being applied to any other company's games.
I will take a try till run out of patience.

@CG33144
Copy link
Author

CG33144 commented Feb 26, 2024

If it helps, I recall someone apparently managed to rip em by brute force and said that the engine is really similiar to M.U.G.E.N engine. Specifically, the modified Ikemen fighting game engine.
Other than that, I dunno. Nevertheless, thanks a lot for your help in finding the key.

UlyssesWu added a commit that referenced this issue Feb 27, 2024
UlyssesWu added a commit that referenced this issue Feb 27, 2024
UlyssesWu added a commit that referenced this issue Feb 28, 2024
UlyssesWu added a commit that referenced this issue Feb 28, 2024
UlyssesWu added a commit that referenced this issue Sep 16, 2024
UlyssesWu added a commit that referenced this issue Sep 25, 2024
@UlyssesWu
Copy link
Owner

UlyssesWu commented Oct 9, 2024

I'm going to release the next version soon. Now I'd summarize what have been done:

SELECT/KANU/SFF/1P000.png

Unfortunately, the image files here will not be converted (decoded). Although looks incorrect, they are stored as standard PNG files without need of any conversion by FreeMote. I don't know M2's tricks on these files, but I guess I shouldn't touch PNG files for other games' compatibility. If anyone knows how to process these special PNGs, please let me know.

CHR/BATYOU/SFF/1Ppalette.psb.m, CHR/BATYOU/SFF/1P000.psb.m

SprBlock PSBs are now supported (extractable). They contain images with 8bit (palette) or 32bit depth.

CHR/BATYOU/SFF/1PBATYOU.spr.psb.m

SprData PSBs are now supported. They do not contain images, but describe how to form all other PSBs in the same folder to a sprite sheet.

Currently, a basic feature SprPainter is implemented to render each sprite in such sheet. To get them, you have to:

  1. PsbDecompile info-psb -k gYk,1H.6x -l 97 windata_info.psb.m -a (you must re-extract it with FreeMote v3.9+; and -a is required)
  2. EmtConvert print CHR\BATYOU\SFF\1PBATYOU.spr.psb.m.json

The result will be generated in 1PBATYOU folder, looks like this:

image

It would be better to implement this extraction in info-psb steps but I don't have motivation left.

BG/stage_chouhan/image.psb.m

ClutImg PSBs are now supported (extractable). They contain images, each image has a palette image (Color Look-Up Table).
Images (correctly colored with their CLUT) will be extracted.

BG/stage_chouhan/bginfo.psb.m

Chip PSBs are now identified, but not fully supported. It seems that they're kind of like .spr.psb.m, describing how to form images in stage_chouhan/image.psb.m into a 3D stage scene. FreeMote won't go that far to build 3D stuffs.

module/motion/gauge.psb.m

These Motion PSBs are already supported.

@UlyssesWu UlyssesWu added this to the v4.0 milestone Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted psb.m about xxx_info.psb.m and xxx_body.bin question https://github.com/betaseeker/How-To-Ask-Questions resource format
Projects
None yet
Development

No branches or pull requests

2 participants