Jump to content

causality

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by causality

  1. I wrote a quick and dirty filter script and extracted the text from the raw memdump

    The text filter might have missed a few dialogues (The suspiciously small size leads me to believe so. One would expect it to be 2-3x times bigger than altered fable, there are multiple games in photonmelodies) so I am attaching raw dumps as well

    I reuploaded Altered Fable text too

     

    All of these are available here: https://drive.google.com/drive/folders/1_sPH11muc9LTZhx38mQVTpddecGV5vwp?usp=sharing


    Dumps format info:

    Text Scripts are stored encrypted in *.rio files. The encryption algo isn't really that complex.
    These dumps are the result of decrypting rio files

    Filtered Dump:

    filter_rioN = photonmelodies.rio.00N (filter_rio0 = photonmelodieis.rio)
    There are a few trash bytes at the start of file which I couldn't filter.
    There's a `TEXT_S` header before each text script
    The japanese translation of a text script is just above it
    A few japanese text scripts contain `\x03` bytes for some reason. This is indicated by `{3}` (just like RioX)
    A few scripts contain `\x00`, `\x01`. This is also indicated by `{0}`, `{1}`


    Raw Dumps:
    dump_rioN = photonmelodies.rio.00N (dump_rio0 = photonmelodieis.rio)

    Dumped by hacking RioX's memory

    Text Scripts are UTF-16LE encoded(Unlike filtered dumps which i converted to UTF-8)

    There's not a concrete way to find where the text scripts start in the file but I have noticed a few patterns:
    1. There are two 0 bytes just before the first text script (`\x00\x00`). Lets call this "Zero Header"
    2. This Zero Header is always squeezed between two non zero bytes, with the right side being renderable unicode (i.e the start of the text script)
    3. First text script is japanese

    The text scripts follow these patterns:
    1. The Text Scripts are separated by `\x01\x00`. The japanese translation of the text script is the text script before it.
    2. The Text Scripts mostly contain renderable unicode only (not confirmed) (There are several exceptions refer to filtered dumps)

    Original Altered Fable Dump:

    Extracted with RioX
    jap_rio1 = altfable.rio
    jap_ruo1 = altfable.rio.ruo1 (mostly menu related stuff)

    Each file name is the offset of the encrypted text script "chunk" in the corresponding rio file
    i.e `jap_rio1/003F2880.txt` => altfable.rio+0x003F2880

    Each text script is separated by a header of format `### suboffset ###`
    Where suboffset is the offset from "text script chunk" in the corresponding rio file
    i.e `jap_rio1/CHUNKOFF.txt` => altfable.rio+0xCHUNKOFF+0xSUBOFFSET

    A few text scripts contain `\x00`, `\x01`, `\0x3` etc.. This is indicated by {n}

    Text scripts end with {0}. This is useless for us and can be safely removed for searching purposes


    A text script can be directly searched in "filtered text", since the text scripts in original dump are all japanese & photonmelodies use exactly the same text scripts for its japanese mode.

    To create a translation map the following has to be done:
    If filtered text is complete (which i suspect it isn't), we should be able to automatically search for the translation without any manual effort.

    In case we choose to get the translation from the raw dump, the following can be done:
    Replace {n} with `\x0n`
    Go through each raw dump file, load it as string(encoding="utf-16le", "backslashreplace") and search for the corresponding translation.
    This is a more guaranteed to work solution but annoying to implement. Again, no manual effort.
    It is also intensive but can be parallelized easily.
    ------

    PS: I have 0 experience with translating visual novels. I am just a programmer so please don't count on me to translate Altered fable.
    Worst case scenario I will try to translate it but I am taking a bit of a break(1-1.5 week) from this project.
    Reverse engineering for hours has been really exhausting for me as its more of a hobby for me.
    I request other translators to please continue the work in the meantime
    I *guess* the information I have provided is more than enough to translate altered fable within a matter of days.
    If you need any help with parsing, generating, automation, etc I will be glad to help.
    Translating is still a big task for me.

  2. Hi I have hit a roadbloack while REing RioX as it was taking too much time with dynamic analysis so I have decided to instead try to work with alterdec (https://github.com/tsudoko/chinesize/tree/master/Rugp/alterdec). It will still probably take much time to make anything useful with it but REing RioX has helped me understand rugp better.
    If anyone wants to continue REing RioX here's my ghidra project archive (Riox.exe.1 is my attempt to patch the binary)

    https://drive.google.com/file/d/181fn1bb-7pfvlRmgpvLYF9m51zuYq3yM/view?usp=sharing

  3. 17 hours ago, total_eclipse4 said:

    I think there a partial translation for the original game Muv Luv Altered Fable. https://alternativeprojects.wordpress.com/2014/05/11/muv-luv-altered-fable-patch-3-by-jutsuki-sen/ does that not mean someone already hacked it? IDK if that means anything here 

     

    I am having trouble extracting english script from photonmelodies, as I said from my previous post. I am trying to patch RioX but I am having trouble finding the encoding subroutine(It doesn't use MultiByteToWideChar :(() + I have entrances too so right now allocating much time to this project is not feasible for me.

  4. Some more progress.
    I patched RioX with ghidra so that it is able to perform Heuristic scan on newer .rio file from photonmelodies.
    Unfortunately it still can't extract the english text as it seems to be performing some encoding conversions.
    Probably some japanese encoding to Unicode. The text in english version is already unicode encoded so it tries to decode unicode with some japanese encoding, which obviously fails for most of the strings(Just a guess. I don't know how its doing it exactly).

    I am not that good at patching binaries so it will be hard to patch those encoding conversions but i will still try.
    Luckily I did get the offsets from RioX that indicate where the text is stored. I am not sure how to use them though as I said before the text doesn't seem to be plaintext

    photonmelodies11.rio: https://del.dog/inesettogr.txt
    photonmelodies11.rio.003: https://del.dog/pungumobot.txt

    The text scripts in photonmelodies11.rio are probably for all 3 games. If we assume the number of scripts to be the same as the Jap version I would expect ~100+ scripts for Altered Fable

    "photonmelodies11.rio" seems to have altered fable data
    "photonmelodies11.rio.002" seems to have bg, chara frames and menu items
    "photonmelodies11.rio.003" also seems to have altered fable data
    "photonmelodies11.rio.004" seems to be Alternative Chronicles

    Better tools seem to be the need of the hour along with veteran fan translators who have worked with age vns.
    Here's the patched RioX(Won't work with older games, I only patched it to be working with eng photonmelodies):  https://gofile.io/d/nLT4fF

    virustotal: https://www.virustotal.com/gui/file/2d0002d0e77111a7d311df3b2cce28cd124c89fc0da3e6b8aeace4af5530b166/detection

  5. Japanese text extracted from Altered Fable.
    https://gofile.io/d/CNuvmn
    jap_ruo seems to be menu/error related stuff
    You are better off translating it.

    I can't extract photonmelodies with the ancient riox tool(Kind of expected but kek) or else I would have tried to patch jap AlteredFable myself.
    If anyone can extract the english text I can try creating a 1:1 <Jap, Eng> Map.
    The r*trd engine seems to be using VMWare images for some reason?
    No plaintext either.
    I asked the author of RioX for its source code but I don't really expect a reply from them.

    EDIT: Sent you CG dump of altered fable to your email.

×
×
  • Create New...