pmrowla / pylivemaker

Python package for manipulating LiveMaker game resources
https://pylivemaker.readthedocs.io/en/latest/
GNU General Public License v3.0
63 stars 16 forks source link

translated lsb file not working #107

Closed jrhu1997 closed 1 year ago

jrhu1997 commented 1 year ago

Description

I was trying to translate an old livemaker game, and I already Extract game files, and extracted the text lines LBS file into a CSV file. After I translated these texts, and Patch the translated CSV back into the lsb file. Things should already done, so I did the last step Patch the exe, and these is no error shows in my CMD, however, when I run the new EXE file, the game still shows JP texts.

What I Did

so I tried to reExtract the new EXE file again, but the LBS files show they are already be translated. so I reallly confuse what I did wrong? thank you.

pmrowla commented 1 year ago

It sounds like there are maybe other LSB files in the game exe that were not translated, and those are the ones that are being loaded when you launch the game.

jrhu1997 commented 1 year ago

It sounds like there are maybe other LSB files in the game exe that were not translated, and those are the ones that are being loaded when you launch the game.

yeah, I also thought this possibility,so I had checked all of those files one by one,and this is the file I Extracted. https://ibb.co/nCWpSK4

and there are only three of them can be turn into the CSV files, but I only translated 00000018, because I want to try if this the tool actually can work out, and I also only Imput the 00000018. https://ibb.co/jrj7mWw https://ibb.co/2S3cQwG

THis is my CMD screenshot and patch note sreenshot, It shows the process already done, so I think at least the part that 000000018 work on should be already translated, however it didn't. I tried the whole afternoon, feel so annoying LOL

pmrowla commented 1 year ago

Are you sure the 0018.lsb is the one that's actually getting executed? I don't have a copy of your game but it sounds like there are probably similar or duplicated lines to the file you translated in another lsb (and the other lsb is the one the game is actually using when you test it)

You can use lmgraph to make a call graph that will show you what order your game is actually running files (and where it branches based on menu choices or flags)

If you run

lmgraph game ゲームメイン.lsb

it will generate a file called ゲームメイン.dot. You can then use graphviz to view the .dot file or you can copy/paste the text contents of the .dot file into https://viz-js.com/

When you use lmgraph game with the gamemain/ゲームメイン LSB, it will make a graph showing what order it runs all of the LSB files in your game archive.

docs for lmgraph: https://pylivemaker.readthedocs.io/en/latest/cli.html#lmgraph


You can also use lmgraph lsb to check what order groups of commands are run in a specific lsb file (so you can tell where exactly the game branches on menu choices and flags), there's an example of what this looks like here: https://github.com/pmrowla/pylivemaker/issues/47#issuecomment-629766202

jrhu1997 commented 1 year ago

Are you sure the 0018.lsb is the one that's actually getting executed? I don't have a copy of your game but it sounds like there are probably similar or duplicated lines to the file you translated in another lsb (and the other lsb is the one the game is actually using when you test it)

You can use lmgraph to make a call graph that will show you what order your game is actually running files (and where it branches based on menu choices or flags)

If you run

lmgraph game ゲームメイン.lsb

it will generate a file called ゲームメイン.dot. You can then use graphviz to view the .dot file or you can copy/paste the text contents of the .dot file into https://viz-js.com/

When you use lmgraph game with the gamemain/ゲームメイン LSB, it will make a graph showing what order it runs all of the LSB files in your game archive.

docs for lmgraph: https://pylivemaker.readthedocs.io/en/latest/cli.html#lmgraph

You can also use lmgraph lsb to check what order groups of commands are run in a specific lsb file (so you can tell where exactly the game branches on menu choices and flags), there's an example of what this looks like here: #47 (comment)

yes, you are right, 0000018 lsb is just a backup file, the real one is 000001, I translated and it works very well lol.