I found out that by looking into the text files, if I were to look at the first 4 bytes, it will reveal the length of the text file in bytes. (including the first 4 bytes)
However, I realized that the language is stored in bin files. I have gathered the following
offset: VARIABLE // details
0x0-0x3: FILE_LENGTH // File length in bytes
0x4-0x7: SEPERATOR_AMOUNT // The amount of line seperators in the text.
0x8-0xB: SEPERATOR_START // where does the line seperators start
0xC-0xF: TEXT_START// where does the text start
SEPERATOR_START until TEXT_START: TEXT_SEPERATOR 0x## // the line seperators of the text. Each seperator is 4 bytes long. To find where length of the text # that will be inputed, add TEXT_START by the TEXT_SEPERATOR of the line number
example:
in auto_wakeup_eng.bin
FILE_LENGTH: 0xf0h
TEXT_START: 0x44h
SEPERATOR_AMOUNT: 0x1dh
TEXT_SEPERATOR 0x00: 0x00h
TEXT_SEPERATOR 0x01: 0x48h
... (continues until SEPERATOR_AMOUNT)
TEXT_SEPERATOR 0x0d: 0xa1h
The length of "Today is the day of the contest! I have to go to the department store!" is 48 bytes,excluding the quotation marks and including the 00 byte.
I almost forgot about the text stuff, Inside the text, the hex 0A means enter, 20 is space key, and 00 is null.
There the next line, using TEXT_SEPERATOR 0x01, would be programmed to be in 0x44h + 0x48h = 0x8c, and if you check, the next line "Today the announce... (continued)" starts at 0x8ch.
I am unable to program a tool however to generate these types of bin files. I need help and I since I couldn't program bytes properly.
I also found out that the uncompressed LZ bin the text contained shares the NARC format.
So theoretically, I would have to...
1. uncompress the lz77 translation file AND lz77 the original script file, then extract both of the uncompressed bins
2. Rename both bins from .bin to .narc.
3. unpack using crystal tile
4. edit the original script file.
5. get the new length of the script file in bytes and paste it on the first 4 characters before the script name
6. Use a tool of some sort to edit the translation file.
7. replace the files on the corresponding folders
8. repack the narc files and rename the file type back to bin.