Slynch Posted March 25, 2016 Posted March 25, 2016 Hello! Nice community you have here! So I'm trying to decompile the VN "Snow Sakura", but have hit a snag. You see, I cannot find any tools to decompile the script files; nor do I even know which files are the script files since they are not stored in plaintext! I'm posting here as a sort of Hail Mary and hoping for the best... So there are two files called "data" and "ISF". I figure ISF contains scene data ("Interactive Scene File"? idk) and data contains the text. So I decompile these archives using "pyge", and ISF spews out, oddly enough, lots of ISF files with no meaningful names or file headers. "data" just contains a bunch of binary files with no meaningful names, but they do possess a common first three bytes: "BM8" and it varies from "BM80" to " BM8' " depending on the file. I have tried arc_conv, AE, and I still cannot disassemble these files! If anyone can help I'd be most appreciative! Thanks! Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 What is it you want from them? Just the text? Slynch 1 Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 (edited) 13 minutes ago, Kelebek1 said: What is it you want from them? Just the text? Yes! I just extracted the "data" file using Crass, but I think it just contains animation data for transitions between scenes. So it must be the ISF files that contain the text  EDIT: I found this thread, which has useful information but I can't seem to get any of it working Edited March 25, 2016 by Slynch Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 They do, but it's an annoying format that's pretty difficult to automatically extract without putting a bunch of time in to map out the format, which I don't think I want to do... :x Slynch 1 Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 2 minutes ago, Kelebek1 said: They do, but it's an annoying format that's pretty difficult to automatically extract without putting a bunch of time in to map out the format, which I don't think I want to do... :x I'm mainly (or exclusively) interested in the strings themselves; I don't need to reassemble them, nor do I need the entire script data. I just need to rip all the strings, which CryingWestern seemed to have done, but I can't replicate how he did it Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 Alright, I went through, and here: https://dl.dropbox.com/s/myonl5e05v0aqxo/SnowSakura.rar  Like I said though, I can't guarantee 100% accuracy that every single string is in there since I didn't fully decompile the script or anything, just did a very quick basic check. I've looked through a bunch of them randomly and can't see any missing, so I hope they're nearly all ok. If you find some messed up or missing though, yeah, sorry. Hopefully someone else can do them all properly. Slynch 1 Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 10 minutes ago, Kelebek1 said: Alright, I went through, and here: https://dl.dropbox.com/s/myonl5e05v0aqxo/SnowSakura.rar  Like I said though, I can't guarantee 100% accuracy that every single string is in there since I didn't fully decompile the script or anything, just did a very quick basic check. I've looked through a bunch of them randomly and can't see any missing, so I hope they're nearly all ok. If you find some messed up or missing though, yeah, sorry. Hopefully someone else can do them all properly. You're a superstar! Ta muchly! I'll need to go through the strings and sort them by character and order and such, but this still saves me a ton of time!  Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 8 minutes ago, Slynch said: You're a superstar! Ta muchly! I'll need to go through the strings and sort them by character and order and such, but this still saves me a ton of time! Â Mmm yeah that's not immediately obvious, in regards to names. Is there a character list anywhere? Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 2 minutes ago, Kelebek1 said: Mmm yeah that's not immediately obvious, in regards to names. Is there a character list anywhere? https://vndb.org/v71/chars#chars But I've played through the game a million times, I'm surprised I don't know the dialogue from memory by now...! So putting a name to strings shouldn't be too difficult; just tedious. Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 39 minutes ago, Slynch said: https://vndb.org/v71/chars#chars But I've played through the game a million times, I'm surprised I don't know the dialogue from memory by now...! So putting a name to strings shouldn't be too difficult; just tedious. Â There were a tonne more than that. Went through all of them though and added all the names. Narration lines are left nameless, since it seemed a bit weird to list them as "Narration." Same download link as before, so try downloading again. Slynch 1 Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 21 minutes ago, Kelebek1 said: Â There were a tonne more than that. Went through all of them though and added all the names. Narration lines are left nameless, since it seemed a bit weird to list them as "Narration." Same download link as before, so try downloading again. Sir, frankly, I love you. Now all I need to do is put scene to string and write a quick parser. I was thinking it checks the first word and if it ends in ":" and matches a character's name, it does the appropriate text colouring/frame naming to that character. Else, it must be narrative and has no name Thank you very much! Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 4 minutes ago, Slynch said: Sir, frankly, I love you. Now all I need to do is put scene to string and write a quick parser. I was thinking it checks the first word and if it ends in ":" and matches a character's name, it does the appropriate text colouring/frame naming to that character. Else, it must be narrative and has no name Thank you very much! If you're going to parse it I can add Narration in for you if it makes it easier? Quote
Slynch Posted March 25, 2016 Author Posted March 25, 2016 2 minutes ago, Kelebek1 said: If you're going to parse it I can add Narration in for you if it makes it easier? Do you mean like how each character has "Name:", there would be "Narration:"? Because that shouldn't be necessary, but thanks for the offer! Â Quote
Kelebek1 Posted March 25, 2016 Posted March 25, 2016 Just now, Slynch said: Do you mean like how each character has "Name:", there would be "Narration:"? Because that shouldn't be necessary, but thanks for the offer! Â Yeah, that's what I meant. But mmk, no worries if you don't. Slynch 1 Quote
Slynch Posted March 27, 2016 Author Posted March 27, 2016 In case you're interested, your script RE'ing was very much required for what I am doing, which is an open-source VN engine in C++. And I'm using Snow Sakura as a tech demo  Here's the Github if you (or anyone else) wants to follow development: https://github.com/Slynchy/Snow-Sakura-CPP Quote
frc_ Posted March 28, 2016 Posted March 28, 2016 Had a quick read of the source code out of curiosity. Some tips: In ChangeLine(), the check should be newLine >= script.size(), not just >. You can do str == "literal" instead of str == std::string("literal"). For the various .txt files, why not read the file until the end instead of requiring the author to write the number of lines on the first line? Instead of having .txt files listing names of files and folders (e.g. characters), why not just scan the folders? Last but not least, why no unicode support? Also, is it really alright for you to place copyrighted artwork of a commercial game on Github? Slynch 1 Quote
Slynch Posted March 28, 2016 Author Posted March 28, 2016 17 minutes ago, frc_ said: Had a quick read of the source code out of curiosity. Some tips: In ChangeLine(), the check should be newLine >= script.size(), not just >. You can do str == "literal" instead of str == std::string("literal"). For the various .txt files, why not read the file until the end instead of requiring the author to write the number of lines on the first line? Instead of having .txt files listing names of files and folders (e.g. characters), why not just scan the folders? Last but not least, why no unicode support? Also, is it really alright for you to place copyrighted artwork of a commercial game on Github? Thank you for your tips! I've read and addressed them below  The script size check isn't even necessary for now since all scripts get terminated before eof is reached The std::string() is to stop my compiler whining when compiling. The line count at the top of the text files; it's messy and annoying for the author, but I plan on making SDK tools for these to ease development of these parts  Scanning folders can get your program looking iffy to virus scanners  And you're right, I really should have unicode support; not too difficult to fix  And no, I shouldn't really have the resources on Github; I've got numerous ideas on how to get around this but I've yet to implement one! Cheers! (sorry for any typos: answered on phone!) Quote
Kelebek1 Posted March 28, 2016 Posted March 28, 2016 Oh is that what you were doing? Ah, well, you can have the terrible stuff I wrote to do this if it helps at all: http://pastebin.com/GmQyfR0h  There's other decryption if the files don't start with 0x9597, but the script uses that so I didn't bother. Slynch 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.