Jump to content

Script Extraction Thread


Recommended Posts

Now, having hacked all Silky/Elf line archives (AI5WIN's, AI6WIN's and Silky Engine's) and totally upgraded tool for Silky Engine's scripts, I turn my eyes to AI6WIN's scripts.

Yes, they were also hacked. Disassembler and assembler tool was written for them: AI6WINScriptTool. I admit, this is quite "lazy tool", but it is enough for fantranslations.

Alas, they were rather dissapointing. They are somewhat close to Silky Engine's, but have only 1 header section instead of 2. There are also some commands differences. But... that is all. They were, actually, even easier than Silky Engine's scripts.

Edited by Tester
Link to comment
Share on other sites

I am truly surprised that I could deal with AI5WIN scripts withing so little time. I though it'd take about a week. Scripts of AI5WIN, as archives, are more complicated then AI6WIN's and Silky Engine's, definitely so. I understand now why no proper decompilers&compilers or at least disassemblers&assemblers were done by now. You cannot just properly disassemble "complex structures" (as I call it) as plain opcodes here (or it's just me who could not). Still it is not as problematic as in SLG System scripts.

Also it is not only the scripts themselves that are hard, there is also a big version difference. I managed to get quite a few games, 6 of them (3 different releases), so I think I supported not all versions. But by now that three would be enough.

Here is the tool: AI5WINScriptTool.

=== These screenshots proof that it works (from Shangrlia)...

147509098-7ef5b175-a673-4405-99b3-187c94

 

147509113-2f76a30f-e05c-4cd6-a47a-8ca371

 

Edited by Tester
Link to comment
Share on other sites

Hello, I'm having trouble with the scripts for the Shingakkou series (the original game and the two fan discs) by Pil/Slash.

The games seem to run on their own custom engine instead of a commercial one like NScripter or kirikiri. All files are contained in .dat archives that I can easily extract by using arc_conv. The visual assets and audio files aren't encrypted, so just running arc_conv is enough to obtain those files. The problem lies with the scripts.

The scripts are encrypted as .scn files. Now, I must once again stress that the Shingakkou series does not run on kirikiri. Those scripts are .scn,.. NOT .ks.scn or .txt.scn. After testing three different tools meant to work on .scn kirikiri files (just in case), none of them worked. It's very likely that Shingakkou's .scn and kirikiri's .scn are different types of file whose extensions happen to share the same name.

When I say the scripts are encrypted, I mean this: when opening those .scn on Notepad++, they only show gibberish even when changing the locale to Shift-JIS. Now, even though the scripts show gibberish, the filenames for backgrounds and voiced lines are clearly readable. To showcase this:

Here's a raw .scn script open in Notepad++:

OYcl6KO.png

Now, for the sake of making things more readable, let's temporarily remove the control characters:

kGlHsjE.png

This is what we get. "bg_019a" is the filename of a background, and "augu_august_ed_bad1_00001" is the filename of a voice file.

"00000D_0000qN0_m@W,g_0}00_k0c0S003___" is supposed to be the filename of a character sprite, but those are all written in Japanese characters which can't be properly displayed. It becomes obvious when you compare it to the way the character sprite filenames are structured:

ZC0sF5m.png

So yes, there must be a readable script in there, I simply don't know how to decrypt it. Of course, I can't rule out the possibility of arc_conv messing up the scripts when it extracted them from the sin_text.dat archive.

Any help would be very appreciated. Here's a folder containing all the extracted .scn files and here's the original archive.

Also, to clarify: I have tried using GARbro. It was in fact my first choice, however GARbro can only open some of the .dat archives and even those that it can open won't extract properly. I'm also using Japanese locale, that's how arc_conv managed to extract the character sprites without messing up their filenames.

Link to comment
Share on other sites

On 12/31/2021 at 1:16 AM, Gabriulio said:

So yes, there must be a readable script in there, I simply don't know how to decrypt it. Of course, I can't rule out the possibility of arc_conv messing up the scripts when it extracted them from the sin_text.dat archive.

First, there is a great number of visual novels not on KiriKiri or NScripter engines. Thou cannot hope that every game will be on them. Also, NScripter may be somewhat painy (if you want to translate on original NScripter without making any ports on some ONScripter). Your engine is, actually, DDSystem. Seems to be PIL-used engine.
Second, these scripts are not encrypted. (Well, some strings may be obfusificated, but not message ones). It's just byte-code script file SCN. True name of format is DDW, by the way. Basically, you tried with the wrong encoding. Try using UTF-16LE. Proof is below the points.
Third, thou probably cannot edit them with simple text editor. Why, thou ask? Because they are bytecode scripts. Therefore editing them with simple text editor likely break them (not in 100%, but in many, depending on the script format). Try some HEX editor instead, like MadEdit.
Forth, I do know some tools for DDSystem, like these or that, but none of them can deal with scripts properly, if I am not mistaken. Thou may try to hack them yourself, though.

 

image.png

Edited by Tester
Link to comment
Share on other sites

First of all, thank you very much for your help.

The script might be encoded in UTF-16, but it appears to be a mix of LE and BE. Some parts are readable in one encoding, but not in the other. And some characters aren't readable in either of the two.

For example, the following line:

Rl8w50U.png

This is the very first line of dialogue in the game. Character name "ミニー" and the dialogue is "「きゃはははははは」".

Now this is the line when using UTF-16LE:

aXrVOya.png

Total gibberish. But when we changed it to BE:

6qacGw4.png

It becomes partially readable. For example, "ミニー" becomes "胟ニー". I checked the other lines who only become readable when using BE, and they also have issues where some kanji or kana are displayed wrong.

Link to comment
Share on other sites

6 hours ago, Gabriulio said:

It becomes partially readable. For example, "ミニー" becomes "胟ニー". I checked the other lines who only become readable when using BE, and they also have issues where some kanji or kana are displayed wrong.

Oh, actually, I just remembered an obscure tool for both archives and scripts of DDSystem engine -- DDWSystemTool. Well, it is written that for DDWSystem, but it seems to be pretty close to DDSystem (it can even be another name of DDSystem or such). Also your "scn" scripts are actually "hxb" scripts (see header), so the tool should support them (and at least export/import strings properly). If thou have some problems with it, write in the issues, since it does not seem like an abandonware.

Edited by Tester
Link to comment
Share on other sites

  • 2 months later...
On 11/1/2020 at 12:43 AM, Dim said:

Please help,anyone know how to read or extract script .rld ? its from Exhibit engine i think, and i dont know how to use RLDManager because when i open it, there is just some empty GUI @marcus-beta

Hi, I'm new too,

It's been a year since your comment, but I wanted to share my 2 cents :)

I've a similar problem with Poison's 姉姉W催眠, apparently it uses ExHibit, .res for the images and .rld for the scripts. The images are actually very simple to extract I used Crass/CrageGUI_Eng. However, the text is much more difficult because it seems to be encrypted.

Anyhow, if you're lucky you can extract it using the empty GUI you commented just:

Right click >> Press Open >> and select the .rld file you want to use.

If you aren't lucky, the file is encrypted, then you would need to get the decryption key first, in a similar way:

Right click >> Find Key >> and select the .rld file you want to use. Once it has finished (it might take a while), it will create a txt file named "RLDKeys" in the same folder, open it and you'll be able to see your new key.

However, this is where things get ugly (complicated), becasue now you need to compile the source code after adding the new decryption key. If you aren't familiar with this process (like me), it may be difficult to do this, becasue you need to install a few programs like "Visual Studio Code" to see/edit the source code, and "MINgw" to compile it. Unfortunately the installation and the usage of these aren't as simple as installing a regular game, as you need to know, at least, some basic CMD commands.

So, you might need to read/watch a few tutorials and keep trying, like I'm currently doing.

Alternatively, if you don't want to use RLD Manager, you can try using "StringsReloads v7.5", I'm about to try to do this as it seems a way simpler solution to translate a game. Nevertheless, you'll still need some assembly knowledge 😢.

StringReloads
 

Regards.
 

Link to comment
Share on other sites

Been trying to port the PC version of KamiYaba over to the Vita. I've been able to unpack all the files for the vita version and change the text for the game but the only problem is that if I try to add or remove any text, the game doesn't work. The script text is encoded in Shift-JIS and doesn't have a file extension and I couldn't find anything when I searched up the header for the file. Would someone mind taking a look at it?

Prologue Script

Thanks

Link to comment
Share on other sites

1 hour ago, kralc said:

Been trying to port the PC version of KamiYaba over to the Vita. I've been able to unpack all the files for the vita version and change the text for the game but the only problem is that if I try to add or remove any text, the game doesn't work. The script text is encoded in Shift-JIS and doesn't have a file extension and I couldn't find anything when I searched up the header for the file. Would someone mind taking a look at it?

Prologue Script

Thanks

First, just to make sure that I correctly understood what you want to do: You want to copy the official translation of the game (English I guess) over to the PSVita version of the game to play it in English on the PSV, right?

So, by just looking at the file you provided: every String in there is prefixed by its length in bytes. If you are lucky, it is enough to adjust this length to the new length after you did your edits. I tried this with the first sentence of the first scene (at least in the PC version) but I do neither own a PSV nor the PSV version of the game. I uploaded the modified file here so you can try it out. If this works, it is probably not that hard to write a simple program that does the length modification automatically.

Edit: I uploaded the wrong version first, so in case you already downloaded it: I replaced it by the correct one now.

Edited by Anonym271
Link to comment
Share on other sites

4 hours ago, Anonym271 said:

First, just to make sure that I correctly understood what you want to do: You want to copy the official translation of the game (English I guess) over to the PSVita version of the game to play it in English on the PSV, right?

So, by just looking at the file you provided: every String in there is prefixed by its length in bytes. If you are lucky, it is enough to adjust this length to the new length after you did your edits. I tried this with the first sentence of the first scene (at least in the PC version) but I do neither own a PSV nor the PSV version of the game. I uploaded the modified file here so you can try it out. If this works, it is probably not that hard to write a simple program that does the length modification automatically.

Edit: I uploaded the wrong version first, so in case you already downloaded it: I replaced it by the correct one now.

Yeah, I'm trying to copy the offical translation of the game over to the PS Vita version.
The issue I'm facing right now is that I can edit the text but only if I keep the amount of total characters in the script the same. If I add or subtract an extra character, the game stops working. I tried your file but it doesn't seem to work either (there is a chance that I didn't test it correctly because the Vita version of the game doesn't support english characters so I just switched out all of the 65 english characters for 65 random jp characters. If I do find a way to be able add more text, I have access to the font so I can just change some of the pngs for some of the jp characters to english characters so that if I type that jp character, it will show up as a english character and just do it that way instead.)

Link to comment
Share on other sites

Hello, does anyone have some experience unpacking and repacking for the advwin32 engine (the VN title is Konata Yori Kanata Made).

This is what the game folder looks like: https://i.imgur.com/7w8NG6X.png

I have had some luck getting the script in readable format extracting with garbro MES.MRG into the different scripts (which are encrypted or something since you can't open them directly with a text editor) and then loading them with the Multiline Editor from the first post. But I don't have any idea how to repack it into MES.MRG to test how it looks ingame, and I can't properly navigate this editor program since it's only in chinese but I doubt it does any repacking since it seems to be just an editor to help translating scripts easier.

I was wondering if there's anything already available to help extracting and inserting back the scripts more easily, and keeping the actual scripting would be nice too in case minor adjustments are needed. Although I imagine the engine prolly doesn't support alphabetical characters so maybe some tweaking would be needed too?

I was pondering the idea of translating this into Spanish since I quite liked it and it's kinda short but I want to get at least some good chunk of the translation done before I drag anyone else into this and lose their time in case I actually give up on the translation that's the most likely thing to happen. So if some sort of working tools exist would be the ideal situation.

Edited by nocturn
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
  • 2 weeks later...

(Complet's C4 MPX)

Found a working python script. Complets_tools_and_asm_patches.7z. Thanks tlwiki.org and web.archive.org.

Altered a bit. Now he automatically picks up the files in the folder and decodes.

And he wrote a script that pulls out the text and creates a database for subsequent translation.

mpxtool_modified.zip

Edited by Maks1m
Link to comment
Share on other sites

  • 2 weeks later...

Hi all, I'm a newbie here so please forgive me. I'm trying to extract resources from Princess Maker 4. I am able to extract the "script" file in the base dir using GARbro. However among the files extracted are prime4.g2, prime4.g2m, and room.g2. These look like they would be encoded via glib2, but when I try to extract those with GARbro, I just get the error that "file could not be opened as resource archive". Any ideas on how else I could try to extract that? All advice appreciated!

Link to comment
Share on other sites

  • 2 months later...
On 5/30/2022 at 7:16 AM, Maks1m said:

(Complet's C4 MPX)

Found a working python script. Complets_tools_and_asm_patches.7z. Thanks tlwiki.org and web.archive.org.

Altered a bit. Now he automatically picks up the files in the folder and decodes.

And he wrote a script that pulls out the text and creates a database for subsequent translation.

mpxtool_modified.zip

Yo, was using the mpxtool_modified and got an error when trying to repack .txt files that were machine translated (I edited only the japanese, kept the formatting the same). 

OneDrive\Documents\MEGAsync Downloads\vn\mpxtool_modified\mpxtool_modified.py", line 255, in pack
    dat2=dat2.encode("shift-jis-2004")
UnicodeEncodeError: 'shift_jis_2004' codec can't encode character u'\u200b' in position 3881: illegal multibyte sequence

lemme know if anyone might happen to know if there is something wrong with the tool (or if u need the text files to check or something).

Link to comment
Share on other sites

  • 1 month later...

I'm rather new at script extracting so I would like some assistance.

I'm trying to extract scripts in the Kirikiri/KAGE X engine.

KrkrExtract didn't work when I tried. As error message came up saying it only supports krkrz engine.

I extracted the data.xp3 using Garbro, but the scenario files were in .ks format. I looked some stuff up and figured I needed to use a hex editor and according to the guide at the start of the topic:

script format: encrypted ks
tools needed: hex editor
status: tested
info: open the *.ks script into hex editor, and insert "FF FE" at the very beginning, usually only applied for akabeisoft and its imprint.

But I'm not familiar with hex files so I don't know what this means. I'm just trying to get the script into a readable format for potential translation. Could someone help a guy out?

 

DEA1XzA.png

Edited by Hiashi
Link to comment
Share on other sites

On 10/3/2022 at 3:04 AM, Hiashi said:

I'm rather new at script extracting so I would like some assistance.

I'm trying to extract scripts in the Kirikiri/KAGE X engine.

KrkrExtract didn't work when I tried. As error message came up saying it only supports krkrz engine.

I extracted the data.xp3 using Garbro, but the scenario files were in .ks format. I looked some stuff up and figured I needed to use a hex editor and according to the guide at the start of the topic:

script format: encrypted ks
tools needed: hex editor
status: tested
info: open the *.ks script into hex editor, and insert "FF FE" at the very beginning, usually only applied for akabeisoft and its imprint.

But I'm not familiar with hex files so I don't know what this means. I'm just trying to get the script into a readable format for potential translation. Could someone help a guy out?

 

DEA1XzA.png

What game is it?

Link to comment
Share on other sites

22 hours ago, Sisulizer said:

I simply used GARbro to extract/creating patch, choose no encryption when it shows the encryption schemeImage

And it works. Silly me for overthinking.

One more question. How should I go about repacking them into a patch?

Edit: I figured it out. Fun stuff

Edited by Hiashi
Link to comment
Share on other sites

  • 3 weeks later...

Can anyone help me extracting scripts from Dogenzaka Lab's otome VN, specifically the Men of Yoshiwara series?

While I can extract the CGs and BGMs from them with GARbro easily, I don't know what to do with the scripts themselves to make them readable.

They're all in .a format, by the way.

Destiny Princess sample

Men of Yoshiwara Kikuya sample

Men of Yoshiwara Ohgiya sample

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...