I’d like to work on the the Aoishiro PC game, but compared to the demo, the real game has over 1000 script files and I can’t use the DAT files from the demo since they’ve changed so it’s like starting from scratch…
Maybe I can work on it after the current manga set since I haven’t found anything new that’s interesting to me and that no one is working on. :p
It seems some people are interested in working on Aoishiro so I’ll give more details on how I edited it.
This is a really crappy way of doing this.
It’d be better if there were an extract and re-insert script for the text, so if anyone is up to it… =)
So after you’ve installed the game, the directory that contains the data for the game is:
All the script is in the file SCRIPT.AFS.
To extract the DAT files from the script, you can use
AFSExtract7. I was using version 1.3 Beta 5
Open up SCRIPT.AFS and then you can go to Command->Export Folder and export all the DAT files.
Now, open up a DAT file, say, a1_01_00.DAT in your favorite Hex Editor.
I was just using a free one xvi32
If you scroll down to E72, then you’ll see a block like: FA 00 74 16 7E 18 72 18
So FA 00 is the length of text allocated and 74 16 7E 18 72 18 stands for 語り手(katari te or “Orator”)
So the characters are encoded using two bytes. This is important because when you’re replacing text, you have to make sure you replace two bytes at a time (even if it’s just to make the second byte a null or a space).
In other words, if you just replace 74 instead of 74 16, you’ll probably encounter an error.
From E86 to F01 is the first line of text.
FD FF marks the end of the line.
To replace with english, you just have find the right encoding. You can use 00 00 to ignore the rest of the line.
‘a’ corresponds to 9F so if you replace the first two characters of the first line:
7F C0 with 9F 9F, then your line will say “a a” now.
After you’ve modified the DAT file, then use AFSExtract7 to re-insert it.
Click on a1_01_00.DAT, then go to Command->Import File and select the DAT file you edited.
Now, run the game and the first line of text should be replaced.
Here’s some info/scripts that might be useful.
Mapping of alphabet to hex and names to hex – Here
Script to translate a line of text into hex characters – Here
It will write the output to a file, out.txt. Ideally, it should write to the clipboard instead to make insertion easier…
Ex. ./convert.pl “Testing”
$ ./convert.pl “Testing”
T = AC
e = 9B
s = 8D
t = 8C
i = 97
n = 92
g = 99
Total bytes: 7
$ cat out.txt
AC 9B 8D 8C 97 92 99
Script to replace names in a DAT file – Here – Incomplete
I only added “Orator” for now. The other names need to be added but that shouldn’t be too bad.
Caveats: I didn’t know how to increase the space allocated for a line so that’s why some of the translated text is not an exact match to the Japanese.
Also, that’s why Syouko is just Syou though Syouko would fit on the line.
Aoi is one character in Japanese but the space allocated for Aoi can take up 4 bytes which is why Aoi is not Ao.