Jump to content

NKT File format for NANA (Unswizzling)


Go to solution Solved by DKDave,

Recommended Posts

Posted

i need help with a custom texture format to unswizzle for the ps2 game NANA. If you could help me achieve this in any way it would be a great help as i could get to work on fantranslating the game. I am putting a 65$ USD LTC/BTC bounty on anyone who can successfully unswizzle this format, and it will be paid to the first person who can provide the function or proof that they can unswizzle the current texture format.  Please contact me on my social platforms for this : @mxlg on discord and @mxlgborn on telegram.

image.png.3feba796c7f84b9a1cf9cf99840fffb6.png

This image ^ is what i got in tile molester, from using 8x8 block size 32bpp RGBA, on 2 dimensions with the custom block size. i still see the swizzling, and also i have this image with 24x24: image.png.7364bd56168ac6a03523e8823c433818.png

also here is the sample files you can test in tilemolester or any file explorer: https://www.mediafire.com/folder/gx88877fgxwye/NKT

The issues are the unswizzle method. The pallete starts at 0x1A0 and the texture at 0x5A0. The width and the height it seems is 256x512, the color depth is 8bpp.  image.thumb.png.2e2ecee6926ef70b7d0ca5bf31b8a73e.png

image.png.023ce009908a1d01828b59aa03c08f9d.png

 

  • Solution
Posted
22 minutes ago, pringll0000 said:

i need help with a custom texture format to unswizzle for the ps2 game NANA. If you could help me achieve this in any way it would be a great help as i could get to work on fantranslating the game. I am putting a 65$ USD LTC/BTC bounty on anyone who can successfully unswizzle this format, and it will be paid to the first person who can provide the function or proof that they can unswizzle the current texture format.  Please contact me on my social platforms for this : @mxlg on discord and @mxlgborn on telegram.

image.png.3feba796c7f84b9a1cf9cf99840fffb6.png

This image ^ is what i got in tile molester, from using 8x8 block size 32bpp RGBA, on 2 dimensions with the custom block size. i still see the swizzling, and also i have this image with 24x24: image.png.7364bd56168ac6a03523e8823c433818.png

also here is the sample files you can test in tilemolester or any file explorer: https://www.mediafire.com/folder/gx88877fgxwye/NKT

The issues are the unswizzle method. The pallete starts at 0x1A0 and the texture at 0x5A0. The width and the height it seems is 256x512, the color depth is 8bpp.  image.thumb.png.2e2ecee6926ef70b7d0ca5bf31b8a73e.png

image.png.023ce009908a1d01828b59aa03c08f9d.png

 

I looked at file HAT_1_10001.  That one has 16 tiles.  The palette is at 0x1a0 in RGBA32 format, and the 8-bit image data starts at 0x5a0 (PS2 swizzled).  Each tile is 128 x 64, and the image is made up of 2 x 8 tiles as follows - an example of the individual tiles, only the first 8 in order:

image.png.13b8d023ad388a81707753fd32180834.png

 

 

 

 

 

  • Like 2
Posted

I just did it manually using ImageHeat.  There's some header data, presumably info for each tile, but it's not 100% clear what all the values mean.  So it's not really a proper solution yet for all files that might have different size headers.

 

 

  • Like 1
Posted
6 minutes ago, DKDave said:

I just did it manually using ImageHeat.  There's some header data, presumably info for each tile, but it's not 100% clear what all the values mean.  So it's not really a proper solution yet for all files that might have different size headers.

 

 

Im still not sure what you did in imageheat? all the headers are the same for most of the textures since they are just variations of character movement, although every image should be in the same dimensions.  Can you share a screenshot of the HAT file in imageheat? or what you did to manually do this sorry im new to texture manipulation 🙂

Posted

This is a screenshot with the settings I used.  You can see each tile is 128 x 64 - I've just put the height as 512 so you can see multiple tiles.  They just need to be arranged correctly.  I've looked at the header, but can't make much sense of it at the moment.  If all the info was known, then a script should be easy enough to put together.

image.thumb.png.f8d0a848a5c99b3a217b6e474302ceef.png

  • Like 1
Posted
8 minutes ago, DKDave said:

This is a screenshot with the settings I used.  You can see each tile is 128 x 64 - I've just put the height as 512 so you can see multiple tiles.  They just need to be arranged correctly.  I've looked at the header, but can't make much sense of it at the moment.  If all the info was known, then a script should be easy enough to put together.

image.thumb.png.f8d0a848a5c99b3a217b6e474302ceef.png

image.thumb.png.161872084cd30bc6971b87fd8e74c65e.png

image.thumb.png.8ab42bb4990c707d81ccb931d9cd72ee.png

 

image.thumb.png.c48ead677d753c0906c28f6ad40e8c6e.png

Im pretty sure the header is to indicate a character model, ill delve into some more files to see but i know HAT = Nana Komatsu, NAN= Nana Osaki, SIN = Shinichi Okazaki, and NOB = Nobuo Terashima. I will supply more model files in a second. Also can you tell me how you exported all those images as BMP files to complete the full image? thank you!  Im pretty sure you can generate a script based off the header in a second i just need to test more files.

Posted
49 minutes ago, DKDave said:

This is a screenshot with the settings I used.  You can see each tile is 128 x 64 - I've just put the height as 512 so you can see multiple tiles.  They just need to be arranged correctly.  I've looked at the header, but can't make much sense of it at the moment.  If all the info was known, then a script should be easy enough to put together.

image.thumb.png.f8d0a848a5c99b3a217b6e474302ceef.png

image.thumb.png.15472b4f766b15f199d84e746fa8eea0.png

 

all the files including cutscenes but marked with the character header are all the same, so i assume a script can be made to automatically translate the images with the same offsets and headers, i will link all the files with textures below soon for testing.

  • Members
Posted

This is just a sample program for demonstration purposes. It's quite basic and rigid, as it can currently only handle 128x512 NKT files with a specific rearrangement layout. In reality, there are other dimensions and block layouts.
The NKT files I tested consist of eight 128x64 blocks arranged linearly from top to bottom like this:
1
2
3
4
5
6
7
8

bgt_ma000001_original.png.c508b0ba2e8e189df8a660c520ca1f9e.png
The script rearranges them into the correct final image (512x128) like this:
1234
5678

bgt_ma000001_rearranged.png.9a6cf9850d2a86a63478a0abcd0a61bd.png


However, please note that this rearrangement method is not universal. For example, the "KOMATSU NANA" texture cannot be assembled correctly using this pattern.
In short, you would need to modify the script to handle different image dimensions and different layout patterns flexibly.
To convert modified PNGs back into NKT files, the process needs to be reversed: you need to "reverse-tile" the image back into a strip, swizzle both the pixel data and the palette, and generate new bitmap data. Then, import this pixel and palette data back into the original NKT file (or, if you fully reverse-engineer the NKT structure, generate a brand new NKT file directly from the data).

nkt2png_test.py

Posted
33 minutes ago, morrigan said:

This is just a sample program for demonstration purposes. It's quite basic and rigid, as it can currently only handle 128x512 NKT files with a specific rearrangement layout. In reality, there are other dimensions and block layouts.
The NKT files I tested consist of eight 128x64 blocks arranged linearly from top to bottom like this:
1
2
3
4
5
6
7
8

bgt_ma000001_original.png.c508b0ba2e8e189df8a660c520ca1f9e.png
The script rearranges them into the correct final image (512x128) like this:
1234
5678

bgt_ma000001_rearranged.png.9a6cf9850d2a86a63478a0abcd0a61bd.png


However, please note that this rearrangement method is not universal. For example, the "KOMATSU NANA" texture cannot be assembled correctly using this pattern.
In short, you would need to modify the script to handle different image dimensions and different layout patterns flexibly.
To convert modified PNGs back into NKT files, the process needs to be reversed: you need to "reverse-tile" the image back into a strip, swizzle both the pixel data and the palette, and generate new bitmap data. Then, import this pixel and palette data back into the original NKT file (or, if you fully reverse-engineer the NKT structure, generate a brand new NKT file directly from the data).

nkt2png_test.py 5.73 kB · 0 downloads

Thank you for this, there are many tile formats as there is no universal tile pattern they use for buttons, but for most backrounds like this and alot of the character models are exactly the same. i have successfully modified the intro a little bit: image.thumb.png.9e55776b70e42924858e2fdd2153ce17.png

by using a unswizzler script that lets me modify it in a pixel editor and also a reswizzler that repacks the nkt from a png file.  the original nkt file is used for palette and header data so that it doesnt screw up.  I will also need some help with the pixel art for the buttons.  the step after i fix all the visual art on the buttons text etc, is finding and remapping the english character map, and then going ahead with the translation.  I will keep you updated and i will test out this script for the backround, thank you!

  • Members
Posted
1 hour ago, pringll0000 said:

Thank you for this, there are many tile formats as there is no universal tile pattern they use for buttons, but for most backrounds like this and alot of the character models are exactly the same. i have successfully modified the intro a little bit: image.thumb.png.9e55776b70e42924858e2fdd2153ce17.png

by using a unswizzler script that lets me modify it in a pixel editor and also a reswizzler that repacks the nkt from a png file.  the original nkt file is used for palette and header data so that it doesnt screw up.  I will also need some help with the pixel art for the buttons.  the step after i fix all the visual art on the buttons text etc, is finding and remapping the english character map, and then going ahead with the translation.  I will keep you updated and i will test out this script for the backround, thank you!

Good

Have you investigated the font for this game? Is it perhaps located within a specific NKT file?

Several KONAMI games use this development toolset. Besides NANA, this includes:
Gantz: The Game
Cy Girls
Mahoromatic
The file formats are all identical.

If I can figure out the textures and fonts, perhaps I could also try to translate this game into my language in the future.

  • Like 1
Posted
9 hours ago, morrigan said:

Good

Have you investigated the font for this game? Is it perhaps located within a specific NKT file?

Several KONAMI games use this development toolset. Besides NANA, this includes:
Gantz: The Game
Cy Girls
Mahoromatic
The file formats are all identical.

If I can figure out the textures and fonts, perhaps I could also try to translate this game into my language in the future.

The fonts are the last issue, i dont know where the character map for japanese and english is, i can redo all the pointers to support my text but i assume the charmap is in the fonts correct? that is my latest issue currently. I will link a folder with the decompiled and deswizzled files, although about half have no tile info or are swizzled with a different format, I will also link the decompiled file base as well.

image.png.09a3e886dfd71fc5164506a93c872061.png

 

for example, most of the character and backround assets use the same texture format, but i dont know what tools or things to use for finding the fonts for the game, i just need the character map so i can remap all the characters to english.  Here is the decompiled vers (images + files) : https://www.mediafire.com/file/8i7852px88k3ztv/extract1.zip/file and here is the compiled vers: (files + bms + decompile script): https://www.mediafire.com/file/ycglpfcr47vq6tq/iop.zip/file  i have a working reswizzler if needed and i will just attach the tools below.  I also need some help with the smaller images as the buttons have to be redone by a pixel guy i know and they are in smaller file formats / not being processed, also some of the title images and other miscellaneous images have different file and palette offsets that need to be found so that i can fully translate everything.  Thank you!

deswizzlenew.py reswizzlenew.py

  • Like 1
Posted
On 10/13/2025 at 11:57 PM, morrigan said:

Good

Have you investigated the font for this game? Is it perhaps located within a specific NKT file?

Several KONAMI games use this development toolset. Besides NANA, this includes:
Gantz: The Game
Cy Girls
Mahoromatic
The file formats are all identical.

If I can figure out the textures and fonts, perhaps I could also try to translate this game into my language in the future.

I have found the prologue text, its in 4PAL, but it is in multiple long lines of text needed to be modified, so i need a better script to handle the full image in my editor.  Screenshot2025-10-15085930.thumb.png.aba51eb147f4269233175bcdf0b4bb3d.png

im not sure if this is what i need to find the charmap, but i assume somewhere in the images the charmap is in this format. first i need a working deswizzler fo the first images as you have shown me, and then i will work on a PAL4 deswizzler for all the prologue text images and maybe i can find the charmap from that, i will link supporting files below. test2.zip keep in mind that the prologue text spans a long ways, and that a good tile recompiler will be needed for the massive amount of text / texture. image.thumb.png.90801722d356704088696ff0798fdf57.png

Posted

image.png.91b06ca997820a83c62a40b51a3cd41e.png

here is the image unscrambled, i am assuming this is the text before the character selection, but i still need someone to figure out the font files if they can i have no experience with that, thank you!

Posted

image.png.91b06ca997820a83c62a40b51a3cd41e.png

here is the image unscrambled, i am assuming this is the text before the character selection, but i still need someone to figure out the font files if they can i have no experience with that, thank you!

image.thumb.png.80eb4bff60becd37595e3b1d006559aa.png

 

The text is there but its all over the place, i have to edit specific lines in order to translate the prologue.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...