ZQF-ReVN / RxCMVS

Purple Software's CMVS Engine Tools. | .ps2 .ps3 .pb3 .cpz
20 stars 5 forks source link

PS3TextEditor doesn't work #4

Closed linakima closed 9 months ago

linakima commented 10 months ago

Game (eng version): https://vndb.org/v18852 I'm trying to create a json file from a .ps3 script. But the json file is not created.

1

files.zip

Dir-A commented 9 months ago

The English version doesn't package the files, its ps3 files are encrypted,. if you use garbro to extract ps3 files from cpz, it will automatically decrypt them. for now you need to decrypt ps3 files via PS3_Cryptor.exe, then you can edit ps3 files via PS3_TextEditor.exe

If you want to compile the project, you should use x86 first, but the latest commit already allows you to compile via x64, but virtual filesystem related projects will not compile under x64

release.zip

linakima commented 9 months ago

Awesome, thanks! I only need to change the string with the "tra" key to translate, right? PS3_TextEditor and PS3_Cryptor don't support working with folders that store scripts?

12 33

Cosetto commented 9 months ago

ps3_decoder.zip Drag the folder contains ps3 to that. Use command move code\*.dec ./dec to move decoded files to other folder Use command ren *.dec *. to batch rename to .ps3

You need to make a batch file like this: image The tool doesn't work with "for %%i in (code\*.ps3) do" batch command somehow.

linakima commented 9 months ago

@Dir-A And I have a question about the codepage for PS3TextEditor. I'm trying to insert Cyrillic characters

            "raw": "\\\"...Egg...\\\"",
            "tra": "\\\"test test\\n тест тест\\n...Egg...\\\""

I used KOI8-R, CP866, CP1251, 65001. But I always got the same result:

123

I tried inserting katakana characters into the text

            "raw": "\\\"...Egg...\\\"",
            "tra": "\\\"test test\\n ユヌヤユ ユヌヤユ\\n...Egg...\\\""

Code pages 936, 932 caused: runtime_error:RxCvt::ToMBCS Error! Inserting using Codepage 65001 produced the following result:

11

The game uses the MS Gothic font.

@Cosetto Thanks!

Cosetto commented 9 months ago

It's because his hook set the charset to GBK (936). Try this cmvshook.zip version.dll is the hook and also a proxy, so you don't need loader.exe to run it. Just place in same directory as the exe and place all edited .ps3 and .pb3 in "patch" folder.

Cosetto commented 9 months ago

version.zip Nevermind about the previous version.dll. Use this instead.

linakima commented 9 months ago

@Cosetto All .ps3 files are already in the Amatsutsumi\data\code folder by default. I didn't have to unpack the archives or use hooks and create a patch folder. The Japanese version probably needed all this. But I use English version. I just take those files, decrypt them, change the text, encrypt them, and put them back in the original folder. The font can be easily changed in the cmvsConfigNet.exe. The version.dll hasn't changed anything. I think the problem is in the code page for converting the json to the ps3.

I can give you the game, try changing a text in the file sn1001.ps3

        {
            "raw": "\\\"...Egg...\\\\\\\""
            "tra": "Test cyr: гшукащтву Test kata: ゴデビピ"
        },
linakima commented 9 months ago

utf8, shift-jis doesn't work for me either. Maybe it's always set to 936

linakima commented 9 months ago

I tried to insert Chinese characters

{
"raw": "\\\"...Egg...\\\"",
"tra": "春天女士男友"
},

codepage 936: Font - MS Gothic

123

Something is broken in PS3_TextEditor or PS3_Cryptor Only English characters are displayed correctly. Looks like I'll have to make a custom font and change all English characters to other ones.

linakima commented 9 months ago

@Cosetto I put your version.dll in the English version of Hapymaher. The game does not run in the x32 version. I unpacked the script.cpz. Converted the files to json, replaced the text, converted back to .ps3, encrypted and put them in the "patch" folder. Nothing has changed, the game does not run.

Cosetto commented 9 months ago

Sorry, I compile version.dll with the wrong xor and decompress addresses for Amatsutsumi. It should be this one. version.zip image

Cosetto commented 9 months ago

I put your version.dll in the English version of Hapymaher. The game does not run in the x32 version.

Hapymaher.zip Run Juego.bat image

linakima commented 9 months ago

@Cosetto Thank you! All .dll files work fine. There are problems with large spaces between characters. But I already made a custom font and it displays fine. All problems are solved.