Inori / FuckGalEngine

My tools to crack galgame
822 stars 146 forks source link

minori - reverse engineering #29

Closed imKota closed 5 years ago

imKota commented 5 years ago

Hello!

Inori commented 5 years ago

I haven't tried that. When I translate it into Chinese, I kept line limitations as it is. It's more beautiful, isn't it?

Inori commented 5 years ago

Even if you can increase the limit, there will always be some words broken off. In your example, the word positive may be complete after increasing the limit, but the word result will be broken off at the same time. You can not determine which word will be at the end of line. And the text will not be at the center of the game window, which makes it looking ugly.

My tools includes paz package extractor (fuckpaz) and game exe hooks (MinoriPatch), fuckpaz works no matter what language you are working on, and MinoriPatch support chinese which means it supports engligh theoretically. The only thing is that MinoriPatch has many hard code address which only aims to the newest game of Minori (currently Trinoline). Besides if you want to translate a game completely, you may also have to modify the exe file.

0xh3LL0 commented 5 years ago

@imKota or... you can browse through commit and revert the changes by yourself https://github.com/Inori/FuckGalEngine/commit/666323e1c8283750477c729d8165cd2718cda552

Inori commented 5 years ago
  1. You use SetDll.exe to modify the game exe file, then the game can load MinoriPatch.dll. Command like: setdll /d:MinoriPatch.exe 12eve.exe

  2. For scripts, unpack scr.paz using fuckpaz.exe, you get a lot of *.sc files, then you use sc_text_out.py to extract the text into txt files. After translated, you use sc_text_in.py to import the text back into sc files. Finally, you use fuckpaz.exe again to pack the sc file into paz package.

  3. For images, there are two types of images.

  1. I changed the repacked package name, plus cn prefix just for making the old Japanese game can work at the same time. If you do not care about it, just comment the code about hooking CreateFileA

  2. There are some features in MinoriPatch which you may not want, like showing original Japanese once press Tab. Just comment the code.

Inori commented 5 years ago

Reusing my patch is a clever way, surprisingly you can find it!

You should have found that the file name format is different between yours and mine. Do not append folder name before filename. Just place modified bmp file in a folder named cnbg, then run PackCnBg.py outside of the folder.

Inori commented 5 years ago

@Inori Another question, sorry. In the committee that indicated @0xh3LL0 there are no addresses for the latest version of the patch.

FuckGalEngine/Minori/Minori/MinoriPatch/MinoriPatch.cpp

Line 546 in b76ba86

void pSavePngName = (void)0x0046AC1C;

FuckGalEngine/Minori/Minori/MinoriPatch/MinoriPatch.cpp

Line 668 in b76ba86

void p_old_png_read_info = (void)0x004C1650; How to deal with this?

Well in old version of MinoriPatch, I use bmp format for images in bg.paz. Recently I changed it to original png format. If you use the compiled version of my old Chinese Patch, you just use bmp format as I described above. If you want to compile the dll yourself, maybe you have to find the address yourself, since there's no history commit about this.

Inori commented 5 years ago

Your old compiled patch (which uses bmp) does not load cngb.paz. I downloaded the release, and it all works (translated into Chinese scripts, menus, etc.). But the modified CGs don't work.

Well I don't think so. Do you mean that my original cnbg.paz do not work?

You will not believe it, I do: D

It's the fault of your MSYS environment, use Windows cmdline instead.

Inori commented 5 years ago

@Inori can you write me in telegram or another real time chats? To not flood here xD

I'm on my holiday of Chinese New Year, and I only have a MBP on my hand, which can not run windows programs. Maybe I can provide you the address when I return.

Inori commented 5 years ago

I'm on my holiday of Chinese New Yea

Happy New Year ! And sorry to bother you.

Maybe I can provide you the address when I return. Thanks in advance, I will wait!

Tell me please, do you plan to do what I wrote above? Adapt the latest developments for other novels, and create branches for them.

Thank you very much! You really helped me out.

If you have worked out all the problems, you don't need the addresses anymore. The file name can be changed by modifying the binary content of MinoriPatch.dll, you can search cnscr.paz and change to ruscr.paz for example.

I do not have a plan to create branches for other games, I will only support the newest game I'm working on :) . Many addresses can be found in history commits, although it's a little complicated. :(

Inori commented 5 years ago

@Inori Well, I got it. Thanks for the work you've done!

You're welcome.