u3shit / neptools

Modding tools for Neptunia games. *Note*: I'm migrating away from github, see one of the mirrors instead: https://gitgud.io/neptards/neptools or https://git.neptards.moe/neptards/neptools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mary Skelter: Nightmares cl3

imKota opened this issue · comments

commented

Hello, @u3shit !
Game Mary Skelter: Nightmares

Script.bra->
_EN
   EVENT
        DATA
            000001.gbin
        SCRIPT
            000001
                  main.CL3

Can you help me with this main.CL3 ?
I want unpack. edit and repack.
main.zip

Hello,
The file you attached doesn't have any text in it:

$ strings main.CL3 
CL3L
FILE_COLLECTION
FILE_LINK
main.DAT
STCM2L Jun  9 2015 13:14:33
GLOBAL_DATA
CODE_START_
333>
333?
EXPORT_DATA
main
COLLECTION_LINK

Based on what IF did in Neptunia games, not every CL3 has dialogue in it. Try the other CL3s.

commented

@imKota hmm
I unpacked the script archive using quickbms + Script.bms.
edit.zip

Got the following file structure:

Script.bra->
_EN
   EVENT
        DATA
            000001.gbin
        SCRIPT
            000001
                  main.CL3

Got text from 000001.gbin using stcm-editor.exe.
Changed, and packed the text back to 000001.gbin.

But after repackaging Script.bra, the script is not read, and immediately jumps to those that have not been changed (000002.gbin and beyond).
What have I done wrong?

Which version of stcm-editor do you use? The current master doesn't open that 000001.gbin file for me (it uses some kind of format that ReBirths and Neptunia VII didn't use)

commented

v0.3.7

commented

Maybe problem in repacking .bra (quickbms + Script.bms)?

Okay it looks like the bms script didn't extract the file correctly as it had 4 junk bytes at the beginning. Unfortunately I don't know how bms work, but at the moment I suspect that quickbms is messing something up. You could try the following: only replace a few characters in the text, but do not add/remove (so the gbin file size stays the same), try to open the exported gbin in stcm-again and check if it still works, reexport the modified Script.bra file and check everything is still correct.

I looked at your screencast, but it looks like a different 000001.gbin than I checked.

commented

Okay it looks like the bms script didn't extract the file correctly as it had 4 junk bytes at the beginning. Unfortunately I don't know how bms work, but at the moment I suspect that quickbms is messing something up. You could try the following: only replace a few characters in the text, but do not add/remove (so the gbin file size stays the same), try to open the exported gbin in stcm-again and check if it still works, reexport the modified Script.bra file and check everything is still correct.

I’ll check it now. And I'll write right away

commented

@u3shit
i change: Urh...
to: Uuu...
repack, and work..
image

But if you specify more characters, it does not work.
Any ideas how to repack correctly?

Does this file work? http://0x0.st/zOoV.bra (rename it to Script.bra and open the game)

commented

Does this file work? http://0x0.st/zOoV.bra (rename it to Script.bra and open the game)

@u3shit no
Which file did you edit?

I edited this:
Script\EVENT\DATA\000001.gbin

EVENT
   DATA
        000001.gbin

What do you mean by not working? Crash? Old text shows up? I edited _EN/EVENT/DATA/000001.gbin, but now I see that the file in _EN and the one outside is the same. There's a different version with EVENT/DATA/000001.gbin edited: http://0x0.st/zOoC.bra

commented

Old text shows up?

yeah

There's a different version with EVENT/DATA/000001.gbin edited: http://0x0.st/zOoC.bra

this working!

image

How did you do that?

Then the bms script didn't work correctly. I wrote this little ruby script to do it: https://gist.github.com/u3shit/9457134653f15e6439c56bfb10421718
If you have ruby (mac has it by default, I think) you can run ./bra.rb Script.bra out_dir to extract files then ./bra.rb Script.bra dir_with_modified_files output_Script.bra (make sure you output to a different .bra file, and you only need to put actually modified files into directory).

commented

@u3shit Thank you so much, you helped me a lot!

commented

@u3shit hmm, this is strange..

➜  ./bra.rb System.bra System                                                  
./bra.rb:33:in `block in <main>': unhandled exception
	from ./bra.rb:24:in `each'
	from ./bra.rb:24:in `<main>'

Are you using the same System.bra that you sent me? It's sha256sum is d1a3cfe94b86de8c1dca8f0684546633bc5e9061c8b50a1f746765cbd2f7b02f Also could you write a p unp3 before line 33 to see the actual value?

commented

Are you using the same System.bra that you sent me? It's sha256sum is d1a3cfe94b86de8c1dca8f0684546633bc5e9061c8b50a1f746765cbd2f7b02f Also could you write a p unp3 before line 33 to see the actual value?

Not. I sent you Script.bra and it decompresses and decompresses normally.

But other archives *.bra (System.bra,TTM1.bra) are not unpacked

image

Oh sorry, that's a different name, I didn't notice. I don't have this game, so I couldn't check the other files, so it's possible that they don't work. You can try to comment out that line, unpacking will still likely work, but I can't guarantee anything about repacking.

commented

Can you try unpack/repack this file?
System.zip

commented

@u3shit And one more question for you. Do not tell me how you can change the game locale? Since it is translated into Russian. There are Russian characters in the font, but there are problems with displaying Russian text in the game itself.

Maybe an encoding issue? Neptunia Re;Births used Shift-JIS encoding, while with VII they switched to UTF-8. Try to find a dialogue with non-ASCII characters to figure out the actual encoding used.

commented

The game itself is in English. And Japanese is definitely not there, but the encoding of the unpacked file is "Shift-JIS".
Only Russian text is not displayed. English is displayed correctly.

image

I updated the gist, it should unpack system.bra at least. If it still doesn't work, that will probably have to wait until tomorrow.
IIRC someone made a russian translation for Neptunia Re;Birth, and he had to edit the font. It looks like there's an msgfont.ffu and sysfont.ffu in the system.bra, maybe they use the same format and you could use that?

The text must be in "UTF 8 without BOM" (from Notepad+). As far as I can see, I'm not sure, but I think the Mary Skelter font includes Russian letters. In my case, the Latin letters.

There is a tool for *.FFU, although it doesn't work well with Mary Skelter fonts.

https://yadi.sk/d/2oAP9mwTyLzBQ

TV_CAM_Dispositivo_20190801_175715 331

commented

@u3shit i tried unpack and repack system.bra
image

but after repacking the file size has changed. Although I did not touch the files
image

If you leave the files in the directory, it will recompress the files with zlib level 9, and depending on how they were compressed originally, this recompressed version can be smaller or larger. Remove the files you did not change to prevent recompression.

commented

@Akatsukidarkx

The text must be in "UTF 8 without BOM" (from Notepad+).

Thanks!!

This is a weird game... Anyway, I updated the the script, fixing a few bugs (it might have corrupted the files in some cases, so recreate .bra files from the originals), it should now properly extract and recompress every file in the game (the size of the bra files will still change a bit, apparently they used something else than zlib to compress the files).

About the UTF-8 issue: there's a random workaround in neptools that detects VII and outputs UTF-8 separators instead of the Shift-JIS one, but it looks like it doesn't detect Mary Skelter. Maybe I should add a command-line option?

commented

Maybe I should add a command-line option?

Yeah :3

commented

@u3shit do you have discord or any real time chat? There are a couple of questions that I would like to ask personally.

I have discord but I'm rarely online, I hate that malware crap. Does IRC/matrix count?

commented

@u3shit

Does IRC/matrix count

IRC)))

irc.rizon.net, same username

commented

@u3shit hello! Can you write me at Matrix? same username :3

Hello.
I'm use this ruby script to unpack Script.bra but unpacked .gbin don't work with stcm-editor.
So how you unpack text and edit it?

Error message? Which neptools version? Also try a nightly build from here: https://jenkins.neptards.moe/job/neptools_build_test/

Neptool 0.3.7. I just drag and drop gbin fail, program starts but nothing happen.

Oh, one more thing. It's strange but gbin unpack well if use bms script for unpacking Script.bra. But problem is that bms scripts corrupt files during re-import if its size bigger than original.

Try to use the ruby script to repack, I think that worked. Also try a newer neptools from the link I've sent (I should really make a release, huh?). If not, run neptools manually from a cmd to see the error message or attach the problematic file here.

Try to use the ruby script to repack, I think that worked.

It's was first thing that i try. It's pack incorrectly by some reason.

Also try a newer neptools from the link I've sent.

Okay, if i can understand how to use Jenkins. Hope i can.
Thank you. Sorry for bothering.

UPD. 0.3.7 version don't do anything with file. Last version at least open file but...
ERROR[ stcm-editor]: Fatal error, aborting
ERROR[ stcm-editor]: Gbnl: invalid type
ERROR[ stcm-editor]: Type: struct Libshit::DecodeError
ERROR[ stcm-editor]: Exception
ERROR[ stcm-editor]: File name: 000001.gbin
ERROR[ stcm-editor]: Processed option: --open
ERROR[ stcm-editor]: Used source: neptools.source.from_memory("000001.gbin",

Also it display text that file content.
There files unpacked with ruby script. https://mega.nz/file/05wSFZRQ#WARLL9P5VA4Xn3LCT_WIysv9cC67tcMCRE_et1MZqv8
Original script.bra https://mega.nz/file/Fs5i3D6b#tfi4qhuMoa6PzDR2cw8ek6rlSYKoRIHBQOVgorqJu3E
At least it strange as i understand u already unpack text from its few year ago.