Ghost Trick rom hack problem

Discussion in 'NDS - ROM Hacking and Translations' started by Caxap91, Aug 28, 2011.

  1. Caxap91
    OP

    Caxap91 Member

    Newcomer
    12
    0
    Sep 5, 2009
    Serbia, Republic of
    Help me!
    I want to translate Ghost Trick to Russian, since I have enjoyed this game pretty much [​IMG]

    I have the enthusiasm to translate the whole text, but I don't know anything about the romhacking.
    Since (apparently) there is noone who wants to help me on russian forums, I decided to learn myself.

    I was able to open the rom (not so hard though), but the text files have a pretty wierd format...
    like this:

    st05_game000_Expand.en.xml.lz

    And I can not extract the text itself

    What can you say? Any help is appreciated! [​IMG]
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,698
    9,567
    Nov 21, 2005
    United Kingdom
    I am working with the European version here but I doubt it will be much different if you are using the US or Japanese one.

    The xml bit caught my eye- XML is a sort of computer language http://www.w3schools.com/xml/default.asp although even when extracting the files they do not appear to be proper XML with no real markup and a lot of binary data. There have however been modifications of such languages in the past (lua for puzzle quest) and there is an entire "equivalent" language for binary stuff called EBML (it is what MKV/matroska uses).

    LZ is a common type of compression- it starts with 11 which indicates type 11 LZ compression. Common enough and handled by the likes of http://code.google.com/p/dsdecmp/ and crystaltile2 http://filetrip.net/f23649-CrystalTile2-2010-09-06.html .

    Somewhat more curious is the stuff in the system directory which appears to have files in compressed and uncompressed form- the ones ending with LZ decompress to match the .bin ones exactly.

    Each of the st?? directories has a root.xml file although st04 has two files with root in the name.
    Although I did not check them all each group of files in the directories have another file without the implied language contents that is usually a bit to a lot bigger than the files it is grouped with.

    mods files are just videos from what I recall ("act imagine" format like VX files)

    The database files in the system directory all appear to start the same save for a value that changes 8 bytes in- in DS files this is often size related and in this I am guessing it is actually 4 bytes long rather than 2 making it an address which usually points to a location with "junk" in it but just after that (same distance every time) there is some text.

    I shall have to look more at this rom.
     
  3. Caxap91
    OP

    Caxap91 Member

    Newcomer
    12
    0
    Sep 5, 2009
    Serbia, Republic of
    Oh, thank you!

    I'll try to open these files with CrystalTile2, maybe it will work.
     
  4. Caxap91
    OP

    Caxap91 Member

    Newcomer
    12
    0
    Sep 5, 2009
    Serbia, Republic of
    I tried to open several system files with CrystalTile 2, but I have a problem with coding system, I suppose, because the only thing I get is this:

    [​IMG]

    I tried to change coding system, but it didn't work...
     
  5. Sora de Eclaune

    Sora de Eclaune Baby squirrel, you's a sexy motherfucker.

    Member
    2,802
    625
    Feb 15, 2011
    United States
    123 Fake Street
    That's odd... CrystalTile2 is supposed to have a DS button, so you can go into the file system of the ROM and import/extract files as needed.
     
  6. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,698
    9,567
    Nov 21, 2005
    United Kingdom
    @Sora de Eclaune that is only for DS roms- that looks like an individual file.

    Assuming that is decompressed and I can not be certain from that screenshot- when you right clicked the file in crystaltile2 there should have been an option to extract which just dumps the file as is and uncompress or words to that effect which will decompress the file although if you want http://code.google.com/p/dsdecmp/ should be able to do it.

    Anyhow yeah the text format, if there is any there, did not look like an encoding I have seen before but that is OK as games use custom encodings all the time (indeed such things are more or less the first lesson in translation hacking). Trying to puzzle it out will be a different game though- first I would look at the ram to see if it does end up as ASCII/unicode there (if it does it might be filtered or encrypted in files) but after that it is the stand methods (relative search- monkey moore and crystaltile2 have options, distribution- space is likely to be common, interpretation- again space is common and if it is XML it will have lots of < and > characters which should stand out, corruption, brute force, assembly, save fiddling* and so forth- do remember you have three regions to compare between). I did not do anything here when I pulled them apart other than scan the files by eye and decompress them so it might be easy and might be hard.

    *Start the game and name the character before saving. Start another and another and compare notes- start of the game should be near identical aside from the differences in the save data although it can get a bit more complex than that if you want it and you start entering names and looking at the ram when you are doing it.
     
  7. cualquiercosa327

    cualquiercosa327 Advanced Member

    Newcomer
    97
    12
    Mar 24, 2009
    Hello,i know this thread is old but i felt a lot of curiosity about this game:
    i would love be able to see the animations ,help on other translations,maybe recreate the 3d rooms ..

    I dont know if they are some also interest on this.Anyway i am going to post here what i know.I hope it can help and they are some people interest on it.(For me it is one of the best ds games)

    They are two version : the original nds and the IOS HD version.

    the IOS version and ds seem very similar (most of files have on common as the xml which are no compress as ds with dsdcom;i have attached a binary version of this program.when i decompress the ds files they are the same ).

    They also share the pac files "cpac_3d.bin" "cpac_2d.bin" which i think they have the same number of files inside (according "PAC File format specification" where "The file begins with a 4 byte long integer specifying the number of files in it." but it fail when i tried extract it as a pac file (it began fine but after two files it game error)


    And add the huge file : "allMotionPack3.pac" which can be extracted without problem as a simple pac giving 115 files but i dont know how open it yet. I "suppouse" it could be the 3D models-animation they render for the ds version because they are several ios resolution and this way avoiding have it repeat lots of times,but maybe i am wrong.

    The latest diferences are the format of sound : on ios are simple diferent mp3 and it has some h264 vids (the game trailer and two used on the game which is also included on ds version but on mods video format).
    the nds mods can be seen with "mobiclip decoder" and they are some scenes of the game (i imagine they use on places where cpu is very bussy and help to load the data without framedrops)


    they are a japan-korean translation of ds version .They are some info in this blogs:

    http://perfectacle.blog.me/220525483533
    and
    http://bbs.ruliweb.com/game/217

    but the tools are no available.Only i found "ghost-trick-font-converter.exe".I have sent they a mail asking info.

    Also someone create a file extractor of DS cpac_2d.bin file but i have problem with python and i am unable to make it work :/

    https://github.com/Zhorken/ghost-tripper

    also the creator seem no sure of all the format :/

    I forgot an important question : where are the nds animation stored? At the begining i thought it
    could came on cpac_2d.bin,but seeing than IOS version has the same file and with the same number of files and include an extra huge file with the animations.
    Also they are no on the arm9 binary because it is small.
    anyone could answer this?
    Thanks
     

    Attached Files:

    Last edited by cualquiercosa327, May 12, 2017
  8. cualquiercosa327

    cualquiercosa327 Advanced Member

    Newcomer
    97
    12
    Mar 24, 2009
    About cpaq files i have found a script
    http://aluigi.altervista.org/bms/resident_evil_cpac_nds.bms
    which is extracting the file.
    It seems work fine but it end with :

    "Error incomplete input file 0 : d:\cpac_2d.bin
    Can't read 113072 bytes from offset 0409400.
    Anyway don't worry, it's possible that the BMS script has been written
    to exit in this way if it's reached the end of the archive so check it or contact with the author or verify that all the files have been extrated"

    coverage file 0 1535% 1256299236 81826816 . offset 04e09400

    Last script line before the error or tht produced the error:

    39 log "" OFFSET SIZE
    "
    i will go on try repair this
     
    Last edited by cualquiercosa327, May 12, 2017
  9. cualquiercosa327

    cualquiercosa327 Advanced Member

    Newcomer
    97
    12
    Mar 24, 2009
    Last notes :i have used the same script with the 4 files cpac_2d.bin and cpac_3d.bin of both versions and i think interesting this:

    cpac_2d.bin extracted are 1.16Gb and 55 files on BOTH.
    cpac_3d.bin nds are 322 files 3.18 Mb (all files are .sdt format less one .dat) and IOS are 494 files 14.5Mb again most of them sdt.
    I am no sure but i think they are a mistake .2d first bytes are 30hex on both and on 3d are 20hex and the extracted files are 55 on 2d version but on ios version they are different (i could have converted bad the hex number but almost it should be the same number on both.

    Help?