1. ZERO2028

    OP ZERO2028 Member
    Newcomer

    Joined:
    May 20, 2017
    Messages:
    14
    Country:
    Belarus
    Hello to everyone! I hope i will explain it right. I'm kinda working now with The legend of Kage 2. I want to translate it on russian language and I'm already done with searching game text(even found the way to unpack it from .mbb files and pack back after editing), font, some textures ect. for translation. The idea was to add russian signs instead of unused signs like: ¿ À Á Â Ã Ä Å ect. I'm really newbie with all that stuff, so i decided to redraw font and put russian signs on unused letters place( yeah, without remapping) cuz I'm also need english letters(for staff roll and other things) upload_2020-7-6_23-19-12.png upload_2020-7-6_23-17-35.png

    So to make more or less readable text i need to put these unused symbols in right order(cuz i'm stupid for remapping). Well it's fine. It's not the issue. I'm even accomplished something by doing this. Russian symbols are appeared, but some of them aren't display well.

    upload_2020-7-6_23-25-4.png upload_2020-7-6_23-25-30.png

    So i started to dig further and asked some people who more or less know the translation routine and they told me I need to edit font table(it's probably lies in arm9.bin).
    So the questions is: How can i find font table, how can i edit it, so letters can displayed correctly? Is there any tools i can use? Or maybe how this "font table" even looks like?
    Any advices?

    I found NFTR Editor, but it's not working with .NTFT files this game has.

    upload_2020-7-6_23-34-23.png

    P.S. Sorry for my English. I hope for your cooperation!
     
    Last edited by ZERO2028, Jul 6, 2020
  2. FAST6191

    FAST6191 Techromancer
    Reporter

    Joined:
    Nov 21, 2005
    Messages:
    31,488
    Country:
    United Kingdom
    Font table is an odd term, or at least one that risks confusion with several other terms and is not used (table when talking about fonts will normally see people think about what would be known as codepages in windows, and character encoding values in most other places).

    Going by the pictures what I suspect is meant is for you to find the size values of the given characters and alter them (some games will change tiles, some games will give a full tile but detail the size somewhere else).
    In this case the ones you replaced were all variations on I with different accents beforehand with in some cases some rather wide characters and they got chopped off.
    Sadly Cyrillic does not have so many narrow characters that you could mess with the order a bit to do it so you will likely have to find it, or go cannibalise those other characters you don't need (maybe some of that punctuation above as that looks wide and you probably won't need it -- do you really need TM, CE, Euro symbol, £, copyright, registered trademark,± and some of the others?).
    Р and С (maybe Т) look like they are off from the original location as well which is why they sit oddly on the line or are cropped a bit.

    If you do want to go mess with the size values I am not sure what it will look like -- on that picture it seems the whole font is one big image and presumably everything sliced out of that (viable method, never seen it before on the DS). The mathematician in me says you can do it with two values (coordinates of the opposite corners of a box) or maybe technically 4 if it splits it up into x1,y1,x2,y2 or x,y and length and width of box, however if some programmers cooked up something this odd to begin with then all bets are off.
    Whether it will live in the ARM9 (or one of its overlays) here I don't know. I have dealt with custom sizes before and sometimes they are in the same file as the rest of the font, in the same directory as a helper file or similar, other times then yeah they are baked into the code.
    If it is baked into the ARM9 binary somewhere you will probably want some help tracking it down and figuring it out at first, though once where and how are known you can happily change it yourself. You would want to get a debugging emulator (no$gba debug being my usual suggestion) and watch as it grabs the font in or decodes text. This will tell you how it does it and you can follow it back from there. It might be several steps as you would have to go line by line in that.
    Before you do venture into that though do consider using some of the other symbols you won't need in the game. It is maybe not quite as elegant but it will get the job done and look just fine in the end.

    Also if you do finish (and if you got this far by yourself then much of the hard stuff is already done) do come back and share.
     
    ZERO2028 likes this.
  3. celtudson

    celtudson Newbie
    Newcomer

    Joined:
    Sunday
    Messages:
    1
    Country:
    Russia
    Hello! I'm a beginner, but recently I also wanted to translate the game from Nintendo DS to russian. It's not surprising that I found on this topic. Using the program CrystalTile2, I also did not find a table with offsets on a silver platter. It's probably normal, I guess. I also speak Russian, so please excuse my English, guys:D

    So, after viewing a sea of articles, I now know that the letters and their offsets are most likely located in the same file. If you find a similar file (see screenshot number 1) in CrystalTile2 in your ROM, then open it by pressing the space bar on your keyboard. A window opens that, as I understand it, tries to translate bytes into a picture, because this is how fonts are usually stored. By clicking on different tiles, it is important to make sure that we are still in the right file. To do this, look at this inscription (in screenshot number 2, it is shown with an arrow). And so I found the last tile in this file (the second arrow points to it), because if you click on one tile to the right, the file name in the lower-left corner will change, and we don't need to go there. Identical way, by clicking the tiles one by one to the left, I found the beginning of the file.

    In the middle of the file indeed symbols, but what are these squiggles at the top and bottom (please, look again at screenshot number 2)? This data can't be represented as symbols, obviously it contains some other data :) In my case, the offsets for each letter lay in the place between the © symbol and the last tile of the file that we found earlier. I advise you to write down the interval of addresses in notepad (like any addresses when working with ROM) and go to another hex editor (if desired, I personally don't like the hex editor in CrystalTile2). We will have to manually change the values in each address in the interval that we found, then restart the emulation so that the graphics are reloaded (God, I hope I'm not mistaken) and look at changes in the output of letters in the game.

    Probably the format for storing offsets and symbols loading rules may differ from game to game. But most likely all this data is stored in the same file where the symbols are stored... Like I said, I'm a newbie. But I was managed to find offsets, so I remembered this topic to share. Good luck!
    Screenshot_2.png Screenshot_3.png
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - romhacking, questions, Legend