ROM Hack NFTR Editor

DarthNemesis

Well-Known Member
OP
Member
Joined
Feb 19, 2008
Messages
1,210
Trophies
0
XP
260
Country
United States
This is a font preview and editor utility for NFTR files.

Download NFTRedit v1.9 (.NET Framework 2.0 required)

Currently supported features:
* Preview text in the game's font (Shift_JIS, Unicode, raw hexadecimal, or a user-defined encoding)
* View and edit a character map of all tiles (graphics, width/offset, etc.)
* Import and export a bitmap of all tiles for use with your graphics editor of choice
* Change tile dimensions
* Copy and paste individual characters

Planned future features:
* Add/remove characters

kp3pRP5.png


up0wpA9.png


VHPHHgN.png


MvGl5Z6.png


What other features would you guys like to see?
 
Last edited by DarthNemesis,

DarthNemesis

Well-Known Member
OP
Member
Joined
Feb 19, 2008
Messages
1,210
Trophies
0
XP
260
Country
United States
There's no way to scale up a pixel font automatically and still have the image look good or figure out the spacing, but you could maybe build a new font with the same mappings as the old one...
 

kazumi213

Well-Known Member
Member
Joined
Oct 16, 2006
Messages
293
Trophies
0
XP
75
Country
Really interesting tool DarthNemesis.

Quite some time ago I started dealing with NFTR files and managed to get font dumps like the one in your picture using a combination of CrystalTile 2, a LZ77 decompressor and feidian. In example this is the dump I got for one of the NFTR files in the Pokemon D/P ROMs:

unilcm11x15vs5.png


I dumped all other NFTR files I found on D/P, but I'm pretty sure they don't contain all possible displayed characters in-game. In example all my dumps are missing the "zz" glyph you can pick on the "enter character name" screens. Maybe you could suggest where should I look for, other than NFTR files.

What did you use to dump the font?

Other question: Once I get one of those BMP dumps, how can I turn it into a Windows font? Need them to be 2-byte fonts? Basically I don't know what to do next after getting the font BMP
unsure.gif
 

DarthNemesis

Well-Known Member
OP
Member
Joined
Feb 19, 2008
Messages
1,210
Trophies
0
XP
260
Country
United States
kazumi213 said:
I dumped all other NFTR files I found on D/P, but I'm pretty sure they don't contain all possible displayed characters in-game. In example all my dumps are missing the "zz" glyph you can pick on the "enter character name" screens. Maybe you could suggest where should I look for, other than NFTR files.Where'd you find NFTR files? I see font.narc, which would be a good place to start looking.

kazumi213 said:
What did you use to dump the font?The NFTR file specification, as best I could understand it from some Chinese websites, and C#.
CODEint numCols = 20;
int numRows = (int)Math.Ceiling(1.0 * table.Tiles.Length / numCols);
Bitmap dump = new Bitmap(numCols * table.MaxWidth, numRows * table.MaxHeight);
Graphics g = Graphics.FromImage(dump);
g.Clear(BackColor);
for (int i = 0; i < table.Tiles.Length; i++)
{
ÂÂÂÂint x = (i % numCols) * table.MaxWidth;
ÂÂÂÂint y = (i / numCols) * table.MaxHeight;
ÂÂÂÂg.DrawImageUnscaled(table.Tiles, x, y);
}
g.Dispose();
Clipboard.SetImage(dump);

QUOTE(kazumi213 @ Sep 15 2008, 03:41 AM)
Other question: Once I get one of those BMP dumps, how can I turn it into a Windows font? Need them to be 2-byte fonts? Basically I don't know what to do next after getting the font BMP
unsure.gif
Sorry, I've never looked into anything like that.
 

kazumi213

Well-Known Member
Member
Joined
Oct 16, 2006
Messages
293
Trophies
0
XP
75
Country
Thanks DarthNemesis
rolleyes.gif


I think the fastest way to find NFTR files inside NDS ROMs is by opening them with a hexeditor, then search for the string "RTFN" (start of a NFTR file). This way I located 9 occurrences in Pokemon D/P (I didn't try the Korean version).

The first match is at a too low offset, probably in one of the ARM bins or just an "index entry" (not sure whether this makes sense, I mean no "extractable" file was on that range).

The next four matches are inside a LZ77 compressed file called "data/utility.bin". I worked with these NFTR files after uncompressing them.

Last four matches are exact copies of the previous ones and are inside "dwc/utility.bin". This second utility.bin is the same as the previous one too.

Of course I noticed font.narc, but it doesn't contain NFTR files. Something useful could be there, but it probably requires dealing with tiles
wacko.gif
. You seem very skilled at this. If you can inspect it a bit and write about your findings it would be much appreciated.
 

DarthNemesis

Well-Known Member
OP
Member
Joined
Feb 19, 2008
Messages
1,210
Trophies
0
XP
260
Country
United States
utility.bin is a self-contained file that's included in many different games. It contains the wireless settings screens, so its NFTR files have nothing to do with Pokemon. I'm betting that the Pokemon font isn't in NFTR format.
 

psycoblaster

Divine
Member
Joined
Jan 26, 2008
Messages
2,131
Trophies
0
Age
33
Location
Seoul.. (in Korea)
Website
Visit site
XP
211
Country
when I click on character map, an error message comes out
frown.gif

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Object reference not set to an instance of an object.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Nut on the hill