Help with text compression in DS games

Discussion in 'NDS - ROM Hacking and Translations' started by GHANMI, Dec 12, 2012.

Dec 12, 2012
  1. GHANMI
    OP

    Member GHANMI GBAtemp Advanced Fan

    Joined:
    Jun 10, 2012
    Messages:
    918
    Country:
    Antarctica
    Hello. I have attempted to do some text editing in some DS games but always faced the same problem: the dreaded text compression. I am now seeking advice from more experienced members about the following:

    1/Radiant Historia: I tried using CUE Atlus Decompresor tool, but it returned an error. I used the unaltered available-on-net ROM release.
    Has anyone managed to decompress it and open its files? If so please help me, since I can't do anything as things stand at this point.

    CUE released another tool specific to that game, along with its font file, but I can't get it to show correctly on CrystalTile. Any help?

    2/How to open the archives used in some Konami games, like Zack and Ombra

    3/ I had the idea to mod Layton games to re-introduce the Wi-Fi puzzles scrapped in all other versions even if they were completely translateable, just because they don't translate that well in EU versions. You can read more about that in a series of Layton articles I made myself here (It doesn't cover games 1 and 4, and half of the Wifi puzzles were deleted in all games) http://tcrf.net/Professor_Layton_and_the_Unwound_Future

    Pleonex did a good job at his Tinke program, but it only supports the first two games, and only the US and Spanish versions, not the Japanese one. Yet when I tried reinserting Japanese puzzle 67 in the second game and modify the text, the pack couldn't be compressed.

    Also, the third and fourth games are not supported by Tinke.
    We would need to find a way (tool?) to modify graphics and text for all four games, preferably using English versions, as JP one uses Fixed-width font.

    If you are interested in Layton games, there are also 4 Akira Tago games, which are unfortunately using a vertical text orientation. I am in fact very interested in learning how to track the text printing ASM procedure and change the text orientation, since there are so many gems like Goemon DS suffering from this problem.

    3.b Finally, if you are fed up with my wishful thinking about Layton mods, I may as well tell you that another very decent Layton clone, Treasure Report, which CAN be actually easily hacked.
    It uses msd text files, needing a special tool which was already uploaded here (search for msd in GbaTemp). Those for events are stored under mass archives (used too for Final Fantasy 4HoL, Avalon Code, One Piece Gear Spirit, ...) but you can open those with this excellent tool from CUE here (under Avalon Code thread in this forum http://romxhack.esforos.com).

    I replaced successfully some text, and some enigmas can even be modded for a different solution. Good News: there is no low letter limit! You may want to swap fonts with another NTFR file (I tried Layton font :) ) since some English letters are missing.
    All graphics can be edited with a DS tile editor (except the Win/Lose graphics).

    4/Keroro RPG has the script files under _Data/Field/Script, but most of the script is seemingly compressed since it's quite lacking compared to the cutscenes in-game. I see chunks of Japanese words between walls of garbage, but I suspect they might be some control codes.

    For those interested in the game:
    Most of the menu options, and the battle options are store as graphics
    Intro cutscene is stored as ScriptMovie/Script as plain text
    Most Weapon/Title/Artes data is stored under System/, in files named Info, as plain text. A menu patch should be possible at the very least, but I can't yet find the summon names.

    ====
    Dunno If this one even fits here, Didn't find a dedicated fan-translation board outside DS and PSP here so please excuse me, but may I ask:
    5/ How can I decompress>edit>compress text and graphics in a GBA game like Zelda A Link to The Past GBA (not Four Swords side), all GBA Castlevania games, and some RPGS like Summon Night 3?
    I really need to get more familiar with this.

    5.b Shaman King MoS 2 has a set of European characters in the US version but using their character values from eU version in US version give glitched tiles. How can I re-add them to the table in the US version. I'm a noob in these things, and the US has uncompressed text, while EU version is compressed to oblivion (Huffman?).

    6/ I recently found out you can mess out with txt files in Kururin Squash for the GameCube, and I found that the English text does show up in a font never used by the game. However, The letters are oddly spaced and as such most of the text overflows outside the message boxes.
    I would like to know how to fix such a problem. Possibly know how to edit txg files (which program do I use? CrystaTile doesn't work: I need advice from experienced people :) )
    Proof: 1 2 3 4 5 (Placehoder English text)

    7/ Can you link me to a reference page and text/font/graphic editors for Pokémon Black/White 1 & 2? Can't seem to find it anymore.

    Thanks a million in advance for any hint or advice or help of any kind; :moogle:
     
  2. Auryn

    Member Auryn GBAtemp Advanced Fan

    Joined:
    Jul 21, 2011
    Messages:
    529
    Country:
    Switzerland
    OMG, we are not in Australia!!
    My advice to you?? Stop jump around from game to game and system to system like a kangooroo!

    1) If cue released a program, it's 99% sure working correctly. If it's not working for you, read the read me again, check if you are doing something wrong or using a wrong version of the rom (or bugged).

    2) using a lot of time to study how they are build and probably programming your own tools to split/ decompress them and rebuild / compress them

    3) I find it strange what you are saying about tinke there. The only way i can think of is if the "unsupported" games use some kind of archive that you didn't crack but if you crack that archive, you have supported graphics inside.
    By the way, i find it funny that you say " preferably using English versions, as JP one uses Fixed-width font." but you don't understand why the letters are oddly spaces in point 6)
    Are you just copy paste from somewhere but you don't have any idea about what you are writing??

    4) here again the same apply as 2). Need time to find out how the game is compressed especially if not a standart BIOS compression. It's even very possible that you have control codes between the text and it's actually not compressed. In this case the work will probably be even more complicated because you need to discover every control code and what they do.

    5) funny again: you found all tools of Cue probably in RNDH but you not find programs like Unlz-gba (or any of the 5 programs listed there) in the same section of that site.

    6) Fixed-width font

    7) usually there are at least 3-4 threads about pokemon hacks on top of this forum, i don't believe it's so difficult to find them or google is your friend.

    I am sorry if i sound like an asshole but it's very clear from your post that you are impatient and that it's the wrong attitude for an hacker. Translate a game is not same as translate a txt file. Need time, need patience and need an incredible urge to discover every bit and cranny of the game.
    Slow down, concentrate on 1 game, 1 system and then somebody will probably help you out but with a thread like this, i don't think you will get many answers.
     
  3. GHANMI
    OP

    Member GHANMI GBAtemp Advanced Fan

    Joined:
    Jun 10, 2012
    Messages:
    918
    Country:
    Antarctica
    I might sound like a noob, but all of the above was based on my observations as I was using tools (and in case of the GBA games, only hex editors and tile ditors, which are inefficient without the use of a decompression tool). No way I'm posting info I didn't check myself.
    The reason there are so many games listed there is that since I was making no progress, I decided to move on each time or another game to study and build experience before returning to the other one.

    Since I didn't actually justify/clarify my claims:
    3/ I actually tried myself and replaced successfully some puzzle text (conveniently stored as txt files) in Layton London Holyday (JP Layton 2), but even though the English chars in the NTFR font itself are variable-width, it is written on-screen with letters separated with wide spaces, kinda like Mother 3 early hacking screenshots, and in Terranigma.
    Do not know though which aspect does need to be considered when dealing with 3/ and 6/: A font width table, or ASM? And ASM documntation for GC is scarce...
    3/b I agree that I shouldn't post bug reports about Tinke in a request topic :ninja: (since it's a bug, there is nothing to do about it other than figuring the format myself: and that in itself is beyond my abilities for now)
    This is about the Layton 1/2 formats in Tinke being incorrectly recognized in JP versions, a file-swap will do. The main problem in all versions of Layton 2 is that there is a bug in the repack process for the text files in Layton 2.
    About Layton 3 and 4 though, it's simply a matter of unsupported formats.

    I might have been too narrow-minded up to now since I worked mainly on DS games and not GBA games. And no, I perfectly understand how annoying newbies can get, and I thank you from the bottom of my heart for being willing to providing some answers for my questions (Mainly Unlz-GBA which I didn't know about, and the Keroro RPG tip: for that one I excluded the long control code possibility since existing other text is differently formatted)

    =================
    So, if I may reformulate it better this time (even if it's useless at this point):

    1/ I tried CUE's Atlus ROM Packer with the US version of Radiant Historia with all three archive files (bin, idx, ndx: i named them all Data) required extracted with Tinke and put in the same folder as specified in the readme. For some reason it returned an error each time, even with the program run as Administrator. ("Packer Data" (tried also Data.bin/ndx/idx unsuccessfully) and this appears "Reading the original NDX file - File Open Error")

    I tried just now with a redownloaded ROM and it didn't work.

    Has anyone managed to unpack that particular game? What am I doing wrong?
    I know it is kind of rude to ask for support or troubleshooting for rom-hacking tools but I would like to know If someone managed to do it.

    2/ How can I get unknown graphic formats (like the txg in Kururin GC) to show up, since they aren't recognized by CrystalTile? What kind of approach should I take to open them?
    =====

    Anyways I hope I will make better contributions in the future, and thanks for your help!
     
  4. Skye25

    Newcomer Skye25 Newbie

    Joined:
    Jun 13, 2011
    Messages:
    2
    Country:
    Spain
    Yes, I have successfully unpacked Radiant Historia with that tool. If you get a file read error it means it can't find the file. Which in turn probably means you renamed them all "Data", but deleted the extensions. So, just open the ROM (with dslazy/dsbuff or Tinke, doesn't matter), copy all three Data files to the same directory with the tool and don't rename them. Then open Command Prompt, navigate to that folder, and type "packer Data", without the quotes.
     
  5. GHANMI
    OP

    Member GHANMI GBAtemp Advanced Fan

    Joined:
    Jun 10, 2012
    Messages:
    918
    Country:
    Antarctica
    I did just that, and it's odd that it doesn't recognize it.
    Extracting them with Tinke 147 (tried 141 too) and Using Windows 7 x64, btw, and packer.exe is running fine, just throwing "File open error"
    Moved folder to c:\a\ and same result.

    EDIT: Never mind!
    I typed CD C:\a to change the active folder (instead of "c:\a packer Data" .. how could I forget that?),
    an just typed packer Data and the magic worked.
    Thanks a lot!

    I didn't expect all my questions to be answered that fast and I'm so grateful to everyone who helped me words fail me! Thanks!

    ==
    Well, that leaves one last question (please bear with me):

    does anyone have tips and advice (or just a useful tutorial) about how to get to show an unknown graphic format like in GameCube and Wii games. Many just don't show up on CrystalTie even with those odd RBG modes. (I tried before using tileED to modify tiles and font with that tile composition tool successfuly, but this is another matter altogether)
     
  6. Auryn

    Member Auryn GBAtemp Advanced Fan

    Joined:
    Jul 21, 2011
    Messages:
    529
    Country:
    Switzerland
    CT2 is a good tool but it has his limitation as well.
    One of the top tools to try to view graphics is Tilemolester.

    About the font things:
    - you need to check if the game has a width table for the font and if it's the case correct it to be not all the same value (probably max width for japanese characters
    - you need to make sure the game use that table. If it's not using it, you need ASM to correct that or other tricks.

    By going to GC and WII you are going in almost uncharted waters.
    There really apply what i told you about research and analisys of the files.
    Many times 3D data is used to store 2D images in those sistems.
    Lucky you some of those formats are the same as the NDS 3D format so a tool like the Mario Kart editor, could be usefull there. I would take a tour of "texture change" like you see in this video:
     
  7. GHANMI
    OP

    Member GHANMI GBAtemp Advanced Fan

    Joined:
    Jun 10, 2012
    Messages:
    918
    Country:
    Antarctica
    From my research I found out that many DS games do store as well 2D graphics as textures for 3D BMD0 models. I think it has to do with the 3D engine being more powerful than the dedicated 2D one for the Nintendo DS. You can view some of them in Tinke, but can't edit them.

    Case in point, in Ninokuni DS everything showing during battle segments (portraits, buttons, the text showing like in Zelda games when you enter a new dungeon/town, major boss names).
    Too bad that for that particular game the models can't even be opened with MKDS Editor.

    Would like to edit the textures somehow since I wanted to do some work on a menu patch for my language ... How can I do it? CrystalTile doesn't separate texture (actually it's tile+palette) and model data, so I don't know what to do with my BMD0 model.

    I guess tackling GC/Wii graphics is somewhat out of my league... That's a shame, since I wanted to eventually give Tales of Graces font a go and modify it, possibly replacing some kana with needed accentuated characters (found a tool to decompress the cpk archives on a PS3 forum, but still have to figure out where in the world is the text, and the font).
    Even it's a little bit off-topic, I wanted also to tackle Nayuta no Kiseki for Psp since it's so simple to tackle (as most Falcom games, like Ys III Felghana / YS 7) as the Shift-JIS text is just laying there uncompressed, but I need to modify the kana graphics in the font with latin letters since for some dumb reason Falcom is using latin letters as control codes..

    But may I ask you a question since you are versed on the subject: How do I reseach and analyze unknown graphical formats? It's very different from, say, text or map/item/level up data.
    I see that there are many custom graphic formats on the PS2/Wii/GC yet people still manage to rip them (sometimes modify them). How can I study the file structure and somehow get the graphic info (RGB+Alpha) out of it in a readable format? Do you know about tutorials on the subject (not asking for a universal solution of course, that would be stupid)

    Anyways, Thanks a lot!
     
  8. Auryn

    Member Auryn GBAtemp Advanced Fan

    Joined:
    Jul 21, 2011
    Messages:
    529
    Country:
    Switzerland
    OMG, not Ninokuni again :(

    Well. I repeat what i told you before. stop jumping from game to game and system to system.
    And i will add, start from something easy meaning RPG are no good, games that are only in japanese are no good.
    You will get nowhere with your mentality you have now especially if you expect tools / programs to do everything for you.
    I don't want to be bad with you but all the games you are picking are out of your range and are not good games to learn to translate.
    Why not pic a little game like a puzzle or a jump and run maybe where you have different languages already and you compare how they changed things??

    Anyway, you need a lot of time and the right mentality to do this job.
    Let's make you an example: you know that the texture is in 2D format inside a file with the 3D model.
    Now stop and think about this first.
    The NSBMD file format is pretty well documented so it should be possible even for you to find where the 2D graphics are. When you study that format you will know where the palette is or other parts you need to see that 2D graphics. And as last, this 2D graphics will be in a format that you probably view because it's a standart format.
    Meaning you can edit as 2D format and then reinsert it in the 3D file:

    2D texture:
    [​IMG]
    TEST should be black but the program i used was bugged.


    3D model with edited 2D testure:
    [​IMG]

    There are many threads in this forum where people edited this textures successfully but you have to spend time to search GBATEMP or the net to find the information you need.
    As example if you search the tread in this forum about the title screen of Saga 3, you will get the answer to your question about BMD0 and CT2.

    I didn't post the video of Zelda just because it was the first i found that matched the topic but because there is a thread in GBATEMP that explain how to do that step by step with all the links to the tools meaning that if you understand how this works for the NDS, you will have the base for WII translations as well because they use the same system.

    About Ninokuni, yes they use something similar but the graphics are compressed and packed so you will need one more step before you can edit them. Like i said, not a good game to learn to translate.
    The same applies to ToG because they use custom compression like the whole serie "Tales of" meaning you need custom made program to decompress and then recompress everything (graphics and text).
    By the way, it's not said that if a you found a tool to decompress the PS3 version that the same tool will work for the WII version as well.

    About Nayuta no Kiseki: you mean the single byte latin letters?? Well, where is the problem?? You still have the 2 bytes latin letters in the Shift Jis encoding.

    About how to find the unknow formats: search for "GBA3 xBPP specs" or "Help with Fire Emblem DS2 display/font issue" thread in this forum, it give you a little idea about how it's done but basically it's need a lot of patience and tries.

    Anyway, as said, stop jump around, choose a nice and easy game to translate and concentrate on that.
    Probably nobody here will help you here if you want to translate ToG or Ninokuni.
    Join a project like " Delving into Iron Master: The Legendary Blacksmith " or "Fujimori Midori no Let's Tarot - Anata mo Kyou kara Uranaishi " (especially the second should be easy to get used to use CT2 and learn those basic 2D graphic formats).
     
    Phoenix Goddess likes this.

Share This Page