Jump to content

Script Extraction Thread


Recommended Posts

I am looking for help in extracting the script for two games.

The first is sisters ~Natsu no Saigo no Hi. According to VNDB this is using a game engine called ISM. I used GARbro to look at the .isa data files. Within the data file there are .ism files which I am assuming contain the script. These are binary files from what I can find, but I am not sure how to decrypt/open them to begin translating.

The second game is Kanojo x Kanojo x Kanojo. This game uses the AST engine according to VNDB. The data files for this are named dat01, dat02, etc... with no extension. Viewing dat01 with GARbro shows all of the script files. These are in .adv and when I extract them they are easily edited as straight text files. The problem I am having is being able to repack the dat01 file without an extension.

So I guess what I am looking for is any tools anyone has that can be used to unpack and repack AST and/or ISM game files. Anything helps.

Link to comment
Share on other sites

On 11/23/2022 at 3:50 AM, bigtpsychoboy said:

The first is sisters ~Natsu no Saigo no Hi. According to VNDB this is using a game engine called ISM. I used GARbro to look at the .isa data files. Within the data file there are .ism files which I am assuming contain the script. These are binary files from what I can find, but I am not sure how to decrypt/open them to begin translating.

I did some research about this ISM engine. I found this very interesting GitHub repository about all kinds of VN engines and it contains a link to this download page. There you can download all kinds of stuff needed to create a VN with the ISM engine (the .lzh archives can be opened with 7zip, WinRAR or other archivers). Especially interesting is the ISM development environment. Sadly, as far as I could see, none of the packages contains tools to decompose an existing game. But what I could find out so far is that the scripts are written in an own scripting language (.iss) and then compiled into .ism files. So you would probably need to write some kind of disassembler for these compiled scripts in order to edit them for translation. This seems like a hard but not impossible project, especially because we have access to the script compiler (it is contained in the dev environment).

I already looked into the ISM scripts and found some stuff, in case it helps:

  • Header
    • 12 byte magic number ("ISM SCRIPT")
    • 4 byte file size
    • 4 byte offset, some offset in the file. Probably beginning of the code segment or something
    • 4 byte uint, probably some kind of count (maybe local variables?)
    • 4 byte count1
    • 4 byte count2 --> count1 & count2 seem to be always the same
  • Some list, directly after the header
    • count is header.count1 (or count2)
    • each entry is a struct { uint1, uint2, uint3 }
      • uint1 is increasing with each entry, starting at 0
      • uint2, uint3 are relatively small numbers
  • After that follow some readable strings (usually 2) like CHAP1_A and CountParagraph%0
    • each one prefixed by its length (1 byte) and followed by a 0 terminator
  • Then more readable strings (same format), maybe function definitions or something
  • Then follows the segment that header.offset (the third entry) points to

By compiling one of the ISS examples from the mentioned download page I also found out that strings are stored with a simple XOR encryption. The key seems to change for each string though and I could not yet find where or how it is defined.

Link to comment
Share on other sites

On 11/28/2022 at 6:53 AM, Anonym271 said:

I did some research about this ISM engine. I found this very interesting GitHub repository about all kinds of VN engines and it contains a link to this download page. There you can download all kinds of stuff needed to create a VN with the ISM engine (the .lzh archives can be opened with 7zip, WinRAR or other archivers). Especially interesting is the ISM development environment. Sadly, as far as I could see, none of the packages contains tools to decompose an existing game. But what I could find out so far is that the scripts are written in an own scripting language (.iss) and then compiled into .ism files. So you would probably need to write some kind of disassembler for these compiled scripts in order to edit them for translation. This seems like a hard but not impossible project, especially because we have access to the script compiler (it is contained in the dev environment).

I already looked into the ISM scripts and found some stuff, in case it helps:

  • Header
    • 12 byte magic number ("ISM SCRIPT")
    • 4 byte file size
    • 4 byte offset, some offset in the file. Probably beginning of the code segment or something
    • 4 byte uint, probably some kind of count (maybe local variables?)
    • 4 byte count1
    • 4 byte count2 --> count1 & count2 seem to be always the same
  • Some list, directly after the header
    • count is header.count1 (or count2)
    • each entry is a struct { uint1, uint2, uint3 }
      • uint1 is increasing with each entry, starting at 0
      • uint2, uint3 are relatively small numbers
  • After that follow some readable strings (usually 2) like CHAP1_A and CountParagraph%0
    • each one prefixed by its length (1 byte) and followed by a 0 terminator
  • Then more readable strings (same format), maybe function definitions or something
  • Then follows the segment that header.offset (the third entry) points to

By compiling one of the ISS examples from the mentioned download page I also found out that strings are stored with a simple XOR encryption. The key seems to change for each string though and I could not yet find where or how it is defined.

Wow! Thanks so much for taking the time to respond. I am not much of a coder so a lot of what you said went over my head (sysadmin here lol). Very interesting stuff here though. It doesn't sound easy at all unfortunately. I will look into it more later, but right now I am probably better off shelving this, or commissioning someone to research and create me a disassembler of some kind.

Link to comment
Share on other sites

On 11/23/2022 at 9:50 AM, bigtpsychoboy said:

I am looking for help in extracting the script for two games.

The first is sisters ~Natsu no Saigo no Hi. According to VNDB this is using a game engine called ISM. I used GARbro to look at the .isa data files. Within the data file there are .ism files which I am assuming contain the script. These are binary files from what I can find, but I am not sure how to decrypt/open them to begin translating.

The second game is Kanojo x Kanojo x Kanojo. This game uses the AST engine according to VNDB. The data files for this are named dat01, dat02, etc... with no extension. Viewing dat01 with GARbro shows all of the script files. These are in .adv and when I extract them they are easily edited as straight text files. The problem I am having is being able to repack the dat01 file without an extension.

So I guess what I am looking for is any tools anyone has that can be used to unpack and repack AST and/or ISM game files. Anything helps.

I have tool for both of them, but the question is are you doing mtl or real transaltion :))

Link to comment
Share on other sites

  • 5 weeks later...

Hello,

Can anyone, please, tell me how to decompile or simply open .sdat and .tex files? I'm currently trying to find english dialogs in the scripts of Utawarerumono Prelude to the Fallen 2021, but I don't even understand which engine it uses. I found that Leaf made some games on xlvns, but it seems like XlvnsScriptTool can't decompile .sdat, only .sdt. Maybe Utawarerumono doesn't even use xlvns, I don't know. Couldn't find the actual info about it's engine, as well.

Link to comment
Share on other sites

I  need help extracting the script from the Konosuba VN(Judgement on this greedy game!) the script_body is a .bin file but everything I've tried so far hasn't worked.
if you know of any thing that could work please lmk.

so far i have tried: StscTextractor and EscudeEditor to no avail. 

Link to comment
Share on other sites

On 1/29/2023 at 7:05 AM, bigtpsychoboy said:

Hey there! It would be a manual translation. Might take me a long time though since it would be my first time translating a game, but I am not willing to back down!

For Sisters Natsu you can contact this guy: [email protected] game since he's porting the game to renpy link
For Kanojox3, do you have discord?

Edited by Sisulizer
Link to comment
Share on other sites

  • 1 month later...
  • Sinned unpinned this topic
  • 2 weeks later...
  • 3 weeks later...

I've made a modification on https://github.com/Doddler/PrismArkTools

To work on the newer version of engine  "Pajama Adventure System", named "2RM - Adventure Engine".

This engine is used on quite a few games of the brand PRODUCTION PENCIL https://vndb.org/p557
Which has several known sub-brands and imprints such as Pajama Soft, BOOT UP, Eroit.

Here is the resulting tools and the source code that I've changed.
I've made some simple tests on an Eroit game is it seems to be working. 

The biggest problem was that the tool couldn't process the new engine files and after solving that it was not recognizing the 'show image' command in the newer engine.
I fixed that and it all should work. In case someone wants to give a go at translating one of this games, here are the resulting tools and tests I've made.

Here are the source files

https://anonfiles.com/Y4Va60x6z3/Eroit_translation_tool_source_2RM_Adventure_Engine_rar

And here are the compiled binaries together with the files I was testing with:

https://anonfiles.com/1aU769x1z4/Eroit_translation_tool_binaries_rar

Edited by darksshades
broken link
Link to comment
Share on other sites

20 hours ago, darksshades said:

I've made a modification on https://github.com/Doddler/PrismArkTools

To work on the newer version of engine  "Pajama Adventure System", named "2RM - Adventure Engine".

This engine is used on quite a few games of the brand PRODUCTION PENCIL https://vndb.org/p557
Which has several known sub-brands and imprints such as Pajama Soft, BOOT UP, Eroit.

Here is the resulting tools and the source code that I've changed.
I've made some simple tests on an Eroit game is it seems to be working. 

The biggest problem was that the tool couldn't process the new engine files and after solving that it was not recognizing the 'show image' command in the newer engine.
I fixed that and it all should work. In case someone wants to give a go at translating one of this games, here are the resulting tools and tests I've made.

Here are the source files

https://anonfiles.com/Y4Va60x6z3/Eroit_translation_tool_source_2RM_Adventure_Engine_rar

And here are the compiled binaries together with the files I was testing with:

https://anonfiles.com/1aU769x1z4/Eroit_translation_tool_binaries_rar

There're some tools available for the engine on github. Like:
https://github.com/jpnoob/vn-packunpack/tree/main/Pajamas/nanaextr
https://github.com/Inori/FuckGalEngine/tree/master/PJADV
But the hardest of the engine is not the script, it's how to bypass the characters limit and 3 lines limit

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I need some help dumping the game script for translation from Jinguuji Saburou: Ashes and Diamonds: https://vndb.org/v19010

Inspecting the game contents, there are directories like:

  • psp_game
    • usrdir
      • script
      • script_outline
      • script_pass

Within these directories, there are .DAT files that have names like 03_32_02.dat. Inspecting these files shows a 4-byte header specifying the size of the decompressed file, and then a gzip header (1F 8B). Thinking I'd figured it out, I stripped out the headers and gunzipped, but I can't make sense of the resulting files. The script directory also contains .AT3 and .PMF files for the BGM and movies. It's possible some of these decompressed .DAT files are images, I'm not even sure. I'm just trying to decode them as Shift-JIS, EUC-JP or UTF-8/16 and not having much luck. There are some other directories with other extensions like .ZPK that I've unpacked since they contain GZipped data also, but they're generally pretty small and I'm not sure they're the scripts. In any case, their contents have the same problem.

I know people here are generally pretty experienced with script dumping, can anyone give me some pointers on how to find the encoding? Or am I going about this entirely wrong, and there's a better way to unpack these .DAT files? I've been looking through as many threads as I can. This game is by WorkJam, and seems different than many other ".DAT" format files that other people have successfully dumped.

Thanks in advance! 

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

The tools for malie engine are listed here so it's not that I need help finding something for my specific game engine, but I was wondering if anybody would be able to help me actually understand how to use it?

I apologise for being incompetent, I have never done this before and this seems like the best place to ask. 

I couldn't find any script data within my game's directory, (only data I could open using garbro was obviously just cg, sprites, audio, menu buttons and the like) so I assume the code listed is used to unpack that, I don't know how to download or use the GitHub link with so many folders of things I don't understand.

If anybody could help, I would be very grateful thank you!

Link to comment
Share on other sites

On 6/20/2023 at 8:37 AM, Sisulizer said:

There're some tools available for the engine on github. Like:
https://github.com/jpnoob/vn-packunpack/tree/main/Pajamas/nanaextr
https://github.com/Inori/FuckGalEngine/tree/master/PJADV
But the hardest of the engine is not the script, it's how to bypass the characters limit and 3 lines limit

Any idea how you'd get around those character limits for this engine?

Link to comment
Share on other sites

21 hours ago, NEL1391 said:

Any idea how you'd get around those character limits for this engine?

You need to modify the exe, meaning reverse engineering is needed.
There's an old thread about how to fix the choices in old version of the engine link

Edited by Sisulizer
Link to comment
Share on other sites

On 7/30/2023 at 3:45 AM, Sisulizer said:

You need to modify the exe, meaning reverse engineering is needed.
There's an old thread about how to fix the choices in old version of the engine link

Damn, that's unfortunate. It looks like even normal text is screwed in the Eroit games I'm trying, the limit is way too short and it doesn't look easy to insert lines too. Will have to try this when I have a lot more time then.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
On 11/28/2021 at 10:55 AM, Sisulizer said:

I know how to hack reminiscence, I tried both Ineditor and mjodev, guess what it works, if you want to translate to English then it's easy. I tried with my language:unknown.png?width=754&height=452

Hi, maybe late, but can you explain how to use them ? Plz pm

 

Edited by Aminatsu
Link to comment
Share on other sites

  • 4 weeks later...

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.

×
×
  • Create New...