ROM Hack Some questions about NDS romhacking (Game: The Legend Of Kage 2)

ZERO2028

Member
OP
Newcomer
Joined
May 20, 2017
Messages
18
Trophies
0
Age
21
XP
172
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,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
33,882
Trophies
2
Website
trastindustries.com
XP
22,622
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.
 
  • Like
Reactions: ZERO2028

celtudson

New Member
Newbie
Joined
Sep 20, 2020
Messages
1
Trophies
0
Age
25
XP
48
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
 
  • Like
Reactions: ZERO2028

ZERO2028

Member
OP
Newcomer
Joined
May 20, 2017
Messages
18
Trophies
0
Age
21
XP
172
Country
Belarus
Ah ****, here we go again.

And once again i'm going to ask for help and some explanation about how it works.
Well i'd like to say that translation of this game is going slow but smoothly, tho I can't avoid some restrictions.
Today's special is... texture coordinates.

Welp I have some questions about how i can change X and/or Y coordinates:
1) First of all... OBJects. After translation names in Russian i need to change their X-coordinates. And after some research it looks like they are not in the textures files. Probably somewhere in arm9.bin. Same thing for cursor in pause screen(I need to change it's X-coordinate, too)

Name_coords.png

Pause_Coords(ENG).png

____________________________________________________________________________________________________________________________________

2) The second problem is... vertex coordinates. And like before I have no idea how to edit them.

VTX_Панцирь.png

____________________________________________________________________________________________________________________________________

3) The third one is kinda hard to explain, but I'll try. Some of translated names are too large to fit in one texture file.
After understanding how OBJ coordinates work, i want to use the unused name textures. There is name Yukinosuke in this game. It was too large to fit into one texture, so game designers was probably forced to split it in two files(two objects - "name_05" and "name_05_1"). I'm understand that it's probably unreal(at least for a noob like me) to add new file in the rom, so i decided to use some unused name textures, that was left from japan rom. Is it somehow possible to make the game show these files?

Yukinosuke.png


P.S. I'm using NO$GBA debugger, but dunno how it's works. I was trying to track where the game takes information about coordinates, but didn't found anything useful.
 
Last edited by ZERO2028,
General chit-chat
Help Users
  • Xzi @ Xzi:
    was pretty much out of space on all my other external and internal drives
    Gift
  • kenenthk @ kenenthk:
    I'm not really into huge library collecting so I always have space
    Gift
  • kenenthk @ kenenthk:
    Just having the extra feels better
    Gift
  • Xzi @ Xzi:
    yeah i try not to fill above 75-80%
    Gift
  • Xzi @ Xzi:
    just like a superstitious thing i guess lol
    Gift
  • kenenthk @ kenenthk:
    Just upgraded a 2tb in my ps4 that will probably get filled quick
    Gift
  • kenenthk @ kenenthk:
    And got 128gb in my vita and 3ds that will never get filled
    Gift
  • Xzi @ Xzi:
    got a 1TB external drive connected to my PS5 for PS4 games
    Gift
  • Xzi @ Xzi:
    about 120GB left on the internal SSD
    Gift
  • Xzi @ Xzi:
    and just installed a 512GB SSD with nothing on it yet
    Gift
  • kenenthk @ kenenthk:
    So in other words only 4 games got installed
    Gift
  • Xzi @ Xzi:
    lol
    Gift
  • Xzi @ Xzi:
    PS5 games are actually considerably smaller than PS4 games
    +1
    Gift
  • Xzi @ Xzi:
    better compression/optimization i guess
    Gift
  • kenenthk @ kenenthk:
    But it only has like 4 games :tpi:
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    what is something you can say about console homebrew but also in the bedroom
    Gift
  • kenenthk @ kenenthk:
    Time to transfer files
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    "it was so hard the first time"
    +1
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    "Time to transfer files" bro having sex with robots
    +1
    Gift
  • Julie_Pilgrim @ Julie_Pilgrim:
    honestly knowing ken that isn't that unbelievable
    +1
    Gift
  • Xzi @ Xzi:
    arent many ps5 exclusives it's true, but there are a whole lot of ps4 games that got ps5 upgrades
    Gift
  • Xzi @ Xzi:
    and those have to be stored on one of the SSDs
    Gift
  • Xzi @ Xzi:
    "time to smash the stack"
    Gift
  • kenenthk @ kenenthk:
    Uremum does like to call me dadbot
    Gift
  • kenenthk @ kenenthk:
    Nothing beats a midnight shower
    Gift
    kenenthk @ kenenthk: Nothing beats a midnight shower