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

ZERO2028

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

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
36,798
Trophies
3
XP
28,321
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
28
XP
79
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
21
Trophies
0
Age
24
XP
335
Country
Belarus
Ah ****, here we go again.

And once again i'm going to ask 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,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs