Jump to content

Kazoku Keikaku (Family Project) re-edit project (Ikura GDL engine script extraction and editing)


Recommended Posts

Hi.

After reading Kazoku Keikaku I was taken aback by poor editing of the later part of the game. Thinking about re-editing it into something more readable, I tried to extract the scripts from the game. Unfortunately I ran into the wall pretty quickly.

The only tool that was able to do anything was ArcTools. It recognizes ISF files, has even built-in template for Family Project. Unfortunately it was only able to decompile dialogue lines, omitting everything else (narration, character names over spoken lines etc etc). It produced a bunch of files with content like this:

:: word wrap line after, characters=50 ::

- <7B79, 0006> "......"=
- <8296, 0006> "Ai ya~"=
- <8458, 0006> "..."=
- <8948, 0006> "Hey, are you alive?"=
- <89B2, 0006> "...mmm..."=
- <8DA7, 0006> "Hey, what's wrong?"=
- <8E89, 0006> "Are you okay? Can you get home by yourself?"=
- <8F23, 0006> "..."=
- <902D, 0006> "Ah..."=
- <9109, 0006> "... Wo ... xiang yao ... yi bei ... shui."=
- <923D, 0006> "Ai ya..."=
- <92EF, 0006> "Hey."=
- <94A9, 0006> "What happened?"=
- <9A31, 0006> "Damn it."=
- <9BC4, 0006> "But now isn't the time to be saying this."=

Completely unusable.

"AE VN Tools" is able only to extract files from main archive, but they stay in encoded form - its script module isn't working, so it cannot decompile scripts.

On the AE page, I stumbled upon a pack of python scripts that are supposed to decompile and compile ISF scripts, and also convert them into Ren'py. Unfortunately - they crash :(

d:\tools\isf_tools_20100606>isf_disasm.py snr00.isf >snr00.txt
Traceback (most recent call last):
  File "D:\tools\isf_tools_20100606\isf_disasm.py", line 97, in <module>
    print isf_disasm(sys.argv[1])
  File "D:\tools\isf_tools_20100606\isf_disasm.py", line 76, in isf_disasm
    x = isf.decompile(buf)
  File "D:\tools\isf_tools_20100606\isf.py", line 589, in decompile
    return ast(ISF(), buf[len(j) * 4:], j)
  File "D:\tools\isf_tools_20100606\isf.py", line 580, in ast
    isf.ast += [[o] + params[o](p, (j, js))]
  File "D:\tools\isf_tools_20100606\isf.py", line 121, in p_onjp
    r += [(T_LABEL, ulabel(wd(p, i), jjs))]
  File "D:\tools\isf_tools_20100606\isf.py", line 65, in ulabel
    return js.index(j[l])
IndexError: list index out of range

d:\tools\isf_tools_20100606>

 

Edited by adamstan
Link to comment
Share on other sites

OK, I did some digging, and it seems that ArcTool would be ideal for this, if it was finished and not abandoned :( In current state it doesn't cope with Kazoku Keikaku scripts, as contrary to Crescendo, it uses different "headers" for different text sections. In Crescendo, there was constant pattern of 000080FF before each line, with line length stored 4 bytes before. That equals to the default ArcTool setting of FF800000|4 according to the manual. However, for Kazoku Keikaku there are different values for different sections. And it is for example FF03|2 for narration, FF010403|2 for MCs dialogue lines,  FF020403|2 for Chunhua dialogue lines etctc. Unfortunately, when using "Family Project" template, ArcTool only grabs the ones responsible for MCs dialogue. In Manual mode theoretically I should be able to input something like FF020403|2|FF010403|2|FF03|2 etc and get all content decompiled, but due to some bug, it doesn't accept anything above 16 characters, so it doesn't work.

Edited by adamstan
Link to comment
Share on other sites

Well, it looks like I'm slowly figuring it out, and even getting some results back ;)

kkhack.jpg

It looks like I wiil have to extract each part of text separately, edit and recompile. Fortunately, as the above image proves, Arctool is able to put edited lines back into game. It works like a "translation" - you don't replace lines, but add edited lines after "=" sign in extracted strings file.

Edited by adamstan
Link to comment
Share on other sites

I'm replying to myself - clear sign of madness ;) I figured out how to do it, but it will be very tedious task - extraction alone may take weeks :( In the START.ISF file I found a table of character names. I wrote them down, and here's the result:

Kazoku Keikaku (Family Project)
String search patterns for ArcTool

FF03|2 - narration

FFxx04|3 - dialogue lines

xx=
01 - Tsukasa
02 - Chunhua
03 - Matsuri
04 - Jun
05 - Aoba
06 - Masumi
07 - Hiroshi
08 - Lau
09 - Kei
0A - Sayo
0B - Welcome
0C - Daigo Fukuryu Maru
0D - Claude
0E - Jody
0F - Yuri
10 - Junko
11 - Fung
12 - Isasaka
13 - Ooba
14 - Meat
15 - Old Man
16 - Crow
17 - Hasta Luego
18 - Part-timer
19 - Voice from kitchen
1A - Everyone
1B - Staff
1C - Landlord
1D - Landlord
1E - Sales Clerk
1F - Shady Guy
20 - Mailman
21 - All at once
22 - Driver
23 - Hiroshi A
24 - Hiroshi B
25 - Customer
26 - Dog
27 - The three
28 - Jin
29 - TV
2A - Manager
2B - Interviewer
2C - Clerk
2D - Jackie
2E - Sarah
2F - Voice
30 - Passerby A
31 - Passerby B
32 - Housewife A
33 - Housewife B
34 - Housewife C
35 - Lady
36 - Girl
37 - Girl A
38 - Girl B
39 - Girl C
3A - High School Girl 1
3B - High School Girl 2
3C - Woman
3D - Little Girl
3E - Principal
3F - Child
40 - Female Employee
41 - Jody
42 - UnKnown
43 - UnKnown
44 - UnKnown
45 - UnKnown
46 - Man
47 - Man 1
48 - Man 2
49 - Man 3
4A - Kid
4B - Young Man
4C - Father
4D - Father
4E - Old Man
4F - Soeda
50 - Opponent
51 - Subordinate
52 - Announcer
53 - Lanxia
54 - Misha
55 - Worker
56 - Wakaba
57 - UnKnown
58 - UnKnown
59 - UnKnown
5A - UnKnown
5B - UnKnown
5C - UnKnown
5D - UnKnown
5E - UnKnown
5F - UnKnown
60 - UnKnown
61 - UnKnown
62 - UnKnown
63 - ?
64 - UnKnown

According to that list it seems, that when using "Family Project" preset, ArcTool grabs "Tsukasa" (01) and "Girl" (36) dialogue lines. But still in the output file they aren't tagged, so still everything has to be extracted using "Manual" mode - one character a time.

So now it goes like this - for each scenario script file (there are 28 of them) I have to run ArcTool multiple times to extract texts belonging to each character. That will produce bunch of text files like that in  first post. Then I need to import them into spreadsheets, add a column with character name for clarity, put them all together, sort by address/offset at the beginning of each line, and then they're ready for editing...

Edited by adamstan
Link to comment
Share on other sites

  • adamstan changed the title to Kazoku Keikaku re-edit project (Ikura GDL engine script extraction and editing)

I don't see in which way would it be easier. The amount of the operations needed stays the same.  In the meantime (thanks to the power of HEX search in Total Commander ;) ), I determined which character appears in which script, and made nice chart for it :D Total amount of extraction operations that have to be manually invoked from ArcTool is 355 (dialogues) + 28 (narration) + 12 (choices) = 395 :o

kkdialoguechart.png

EDIT make that 384 (344+28+12) - I set bad ranges for "X" counting ;)

Edited by adamstan
Link to comment
Share on other sites

Does anybody have JP version of the game (original voiced PC version from 2002 - https://vndb.org/r6253 , not remake)? If so, could you send me the scripts file (ISF)? In english version, there is one missing line in Matsuri's route - like, there's voice but no text at all, just blank box. It is caused by error in script file, and I am unable to fix it - ArcTool can replace/reinsert text in existing lines, but cannot insert new lines into existing script. Pasting whole block from previous line with Hex editor doesn't work, because script is compiled, and when I do that, all offsets go through the window - the script then fails to load. So the only way to fix it is to use original script (hoping it isn't broken as well...) and replace JP lines with english ones.

Another alternative would be to put that text into next Tsukasa's line, but it'll look weird.

BTW Today I finished text extraction from script files - now I have to import them into spreadsheet, sort, format etc etc. (And possibly re-extract second chapter of Matsuri's route, If I can lay my hands on JP script file).

Edited by adamstan
Link to comment
Share on other sites

  • adamstan changed the title to Kazoku Keikaku (Family Project) re-edit project (Ikura GDL engine script extraction and editing)

I found JP version, but it's no good :( It uses different script encoding, and ArcTool cannot handle it. So I'll have to rename next Tsukasa's dialogue line to "Matsuri", and change it into something like

"<contents of missing Matsuri's line>     - Tsukasa: <next line>"

 

Link to comment
Share on other sites

Quick update - I managed to extract the names of voice files for each voiced line (and voice files themselves too) - it might be useful :) So by this extraction itself seems to be definitely finished. Now tedious importing into spreadsheets and formatting.

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  • 5 months later...

A fan restoration project, that's admirable! ^_^

If I may ask, I was thinking about picking up Kazoku Keikaku during one of JAST's sales - how rough is the English? The roughest official TL I've read and still liked is probably Kira*Kira. I wonder if it's better or worse than that...

Edited by Incynerate
Link to comment
Share on other sites

6 hours ago, Incynerate said:

A fan restoration project, that's admirable! ^_^

If I may ask, I was thinking about picking up Kazoku Keikaku during one of JAST's sales - how rough is the English? The roughest official TL I've read and still liked is probably Kira*Kira. I wonder if it's better or worse than that...

For most of the time it isn't terrible, a bit awkward or stiff at times, typical for older translations, but readable. But there are some lines in the later parts of the game that look unedited, as they are almost unreadable mess. Very strange, almost as if they were pasted from different thing...

Unfortunately this project is stalled for now :( - I feel that I bit more than I could chew, as the script is pretty big - over 62k lines. Maybe I'll try doing "lite" version first, fixing only those obviously messed-up lines. Fixing whole script (=reducing its awkwardness and making it more consistent) which I intended to do, might be too much of a task for me after all - I mean, with me being an ESL, whose only writing practice are years of forum posting, I fear that I might involuntarily produce something equally awkward, while thinking that I 'fixed' it...

As for the game itself - I'd say it's cheap enough to be worth getting even at regular price ;)

 

Edited by adamstan
Link to comment
Share on other sites

  • 2 months later...
On 30.05.2018 at 6:51 PM, adamstan said:

I found JP version, but it's no good :( It uses different script encoding, and ArcTool cannot handle it. So I'll have to rename next Tsukasa's dialogue line to "Matsuri", and change it into something like

"<contents of missing Matsuri's line>     - Tsukasa: <next line>"

Project is on the backburner, but there are some good news - I found a way to extract scripts from voiced JP version - AE was able to extract files, and then isfcodec to decode. After that, ArcTool can extract strings using the same method as with translated version.

So now it should be possible to restore that missing line from Matsuri's route, and also, when I finally get to it, I should be able to compare TL with original text, which may come useful when fixing those few lines that are hard to understand in TL.

Edited by adamstan
Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
On 2/16/2019 at 7:51 AM, adamstan said:

...as the script is pretty big - over 62k lines...

VNDB being full of shit again...

How can the VN be labeled "Medium (10 - 30 hours)" if you have a whooping 60k+ lines?! For comparison purposes, Miazora is around 45k lines (labeled "long" on VNDB), and the most complete version of Cocoro Function is around 57k of lines (also labeled "long" on VNDB). This shit makes 0 sense.

Anyway, I remembered this thread as I was thinking about grabbing scripts from older G-Collection VNs. Sadly, yeah, it seems the scripts are always encrypted differently, and there doesn't seem to be any tool that can deal with them universally. What a pain in the ass, sigh...

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...