ROM Hack [Help] Puyo Puyo Tetris - Texture and Graphics Replacement Issues

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
So I recently started looking through the files in Puyo Puyo Tetris to see if I could possibly translate some of the basic menus and such. I haven't gotten too far (I only have the graphics done for the title screen), but I've hit a bit of a brick wall as the game crashes when the title screen starts to load.

The file I'm working with is named "title.narc" and the tools I've been using are NDS Editor (kiwi.ds) and Puyo Tools. Using NDS Editor I can unpack the .narc, which leaves me with three files.

- title_000.bm
- title_001.swif
- title.ctpk

The .ctpk can be unpacked with ctpktool and doing so left me with a bunch of .png and corresponding xml files. The two files i've edited are "title_tds2_d8888.png" and "title_02_d4444.png", both are shown below with the code from the matching xml file.

The main issue I'm having now is rebuilding the .ctpk with CTPK Tool. Extracting and rebuilding the .ctpk seems to causes the game to crash, even when using the unmodified .png files that were originally extracted from it. Also the modified file is always 2.75mb when the original is ~1mb.

If I rebuild the .narc (using puyo tools) with the unmodified .ctpk, the game works fine. This leads me to believe that the .ctpk building process could be to blame.

If anyone has any experience with .ctpk, bm , or .swif files, please let me know.

Linked in this post is the title.narc and a LayeredFS plugin for both the base game and the v1.1 update. This is the SD card setup for the plugin:

SD:/PuyoPuyoTetris/title/title.narc


WKpRpEW.png

title_tfs2_d8888.xml said:
<?xml version="1.0" encoding="utf-8"?>
<Entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<InternalFilePath>title_tds2_d8888</InternalFilePath>
<RealFilePath>title_tds2_d8888.png</RealFilePath>
<Format>0</Format>
<MipLevel>1</MipLevel>
<Type>2</Type>
<Unknown>0</Unknown>
<BitmapSizeOffset>52</BitmapSizeOffset>
<Info>262144</Info>
<Info2>134283520</Info2>
<HasAlpha>true</HasAlpha>
</Entry>

pxyAmYg.png

title_02_d4444.xml said:
<?xml version="1.0" encoding="utf-8"?>
<Entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<InternalFilePath>title_02_d4444</InternalFilePath>
<RealFilePath>title_02_d4444.png</RealFilePath>
<Format>4</Format>
<MipLevel>1</MipLevel>
<Type>2</Type>
<Unknown>0</Unknown>
<BitmapSizeOffset>49</BitmapSizeOffset>
<Info>262144</Info>
<Info2>134283524</Info2>
<HasAlpha>true</HasAlpha>
</Entry>
 

Attachments

  • puyopuyo_layeredFS_title_narc.rar
    126.4 KB · Views: 216
Last edited by ongo_gablogian,

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
Update:

I think root of my issues are with CTPK Tool (or possibly my .png format), as rebuilding a .narc with the unmodified files works fine. If anyone knows anything about CTPK Tool or .png formats used in Puyo Puyo Tetris (or other 3DS games) please let me know

Also @Nagato, maybe you'd have some ideas about the issues I'm running into.
 
Last edited by ongo_gablogian,

DarkSynopsis

Well-Known Member
Member
Joined
Oct 15, 2014
Messages
483
Trophies
0
Age
33
Location
New Zealand
Website
ninjasfate.com
XP
2,590
Country
New Zealand
According to the .png files once extracted from the ctpk they are etc1a4 encoded, CTPK Tool does not repack with this encoding.

I believe in the original post about why this is the case is most games don't care about the encoding but you get the odd few that are, I know Fire Emblem If/Fates is one and I guess this is another.

Best you can do is create a etc1a4 encoded image and hex it into the ctpk which is a nightmare.



I had done a video for Fates but doing it with Puyo at least with that ctpk seems like it would be more a pain since more than one image within the ctpk.

Had hoped this was just a similar issue we ran into with Taiko 3 Mystery Adventure, that was just a matter of taking some of the lines from the original ctpk and putting them into the new one.
 
Last edited by DarkSynopsis,

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States

Interesting, I was actually just watching that video to see if it would be possible to do a something similar. I have barely any experience when it comes to hex editing, so I don't think I could pull off editing a etc1a4 image properly. Hopefully the CTPK Tool can be updated to include this functionality.

Thanks for helping out.
 

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States

Wow thanks a ton for this. The game doesn't crash anymore, but there still are some image issues. The image on the left is the title_002.ctpk rebuilt with it's original contents, while the image on the right is the .ctpk rebuilt with the modified top and bottom screen textures.

EDIT: I've added a screenshot of the game's original title screen for reference. Also I realized this issue could have something to do with some of the other files in the "title" folder of the RomFS, as they share similar names. I've uploaded them here and their names are listed below.

- title_texlist.bin
- title.naix
- title.narc-info

Modified Title Screen said:
Original Title Screen said:
 
Last edited by ongo_gablogian,

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
Try this: http://www.mediafire.com/download/3fn9ccc3o91wohq/ctpktool(9).rar
It's doubtful that it'll fix it, but I noticed a peculiarity with the way it handled the hash table, so this will fix that. The rest of the CTPK file should be mostly mostly the same (aside from the way the ETC1A4 images are encoded).

Note: You will need to extract the title_002.ctpk again using this version of the tool. You only need to update the .xml files since it adds more metadata.

Nice, it's almost perfect!

Same deal as before, the image on the left are the original japanese files from the ctpk rebuilt and the one on the right is with the edited png's.

New Puyo Puyo said:
 

tiduscrying

that butt...
Member
Joined
Jun 12, 2012
Messages
509
Trophies
1
Location
HELL
Website
tiduscrying.wordpress.com
XP
2,491
Country
United States
Nice, it's almost perfect!

Same deal as before, the image on the left are the original japanese files from the ctpk rebuilt and the one on the right is with the edited png's.

Hmm.. This looks familiar to an issue I was having with some images as well, back with the translation of Taiko no Tatsujin: Don to Katsu no Jikuu Daibouken. The issue I had resulted in weird black lines surrounding things in the tutorial images.
xtmKqts.png
@Nagato, I recall from when you helped me with the image, it had something to do with a color format, right? Could this be a similar issue?

Also, @ongo_gablogian, this looks like it'll be a nice translation! I tried playing the game in Japanese but couldn't figure out much... I was considering doing a translation at some point, but taiko took my attention away from that. Let me know if you need any help with the graphics or anything! I'd be more than willing to lend a hand! :yay3ds:

Edit: Looks like nagato replied before I could finish typing, haha.
 

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
Looks like the alpha channel is getting lost when encoding ETC1A4 only. How does this work?
http://www.mediafire.com/download/32h10c8cr65nh8a/ctpktool(11).rar

It produces the same results as the last build unfortunately.

I'm really interested in at least a basic menu translation, I have the game card and it can be booted via Hans too.
Good luck.

Thank you, I was hoping start a translation project as soon as the image issues are sorted out. I don't speak any japanese so I'll likely need help with translating most of the text graphics.

Hmm.. This looks familiar to an issue I was having with some images as well, back with the translation of Taiko no Tatsujin: Don to Katsu no Jikuu Daibouken. The issue I had resulted in weird black lines surrounding things in the tutorial images.
@Nagato, I recall from when you helped me with the image, it had something to do with a color format, right? Could this be a similar issue?

Also, @ongo_gablogian, this looks like it'll be a nice translation! I tried playing the game in Japanese but couldn't figure out much... I was considering doing a translation at some point, but taiko took my attention away from that. Let me know if you need any help with the graphics or anything! I'd be more than willing to lend a hand! :yay3ds:

Edit: Looks like nagato replied before I could finish typing, haha.

Thanks for the offer, I'll need all the help I can get! I'll let you know when I'm ready to make and "official" translation thread.
 
Last edited by ongo_gablogian,

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
Oh. :(
That's not good. I don't really know what the problem could be then.

Just for giggles, can you open title_01_etc1a4.xml and title_tds1_etc1a4.xml, and replace
Code:
<Format>13</Format>
with
Code:
<Format>0</Format>
and see what happens then?

It might crash, it might not (depends on the game).
HOLY SHIT THAT WORKED! Seriously, thanks so much. The only issue I can see is the "X" shaped texture in the background of the top screen isn't loaded for whatever reason.

Modified Title Screen said:

Original said:
 
Last edited by ongo_gablogian,
  • Like
Reactions: tiduscrying

RandomKid150

Translator
Member
Joined
Nov 4, 2015
Messages
371
Trophies
0
Location
Texas
XP
488
Country
United States
Good to hear! That means that you can probably change the image format of most of the images in the game without it crashing. If you run into another error with things displaying black like that, try changing from format 13 to 0 again. This also means that I think there's a transparency issue somewhere in the ETC1A4 code, but I have no idea where (not my code to begin with :V).

The missing X shape in the background is weird. I think that graphic is coming from another or image somewhere. It's not anywhere in the title data you gave me. Have you tried searching around for it?
This might be a little off topic, but can you see if you can get these .ctpk files open? It for the game, Sumikko Gurashi - Here You Settle Down. Thanks. :)
 

Attachments

  • .ctpk Files.zip
    6.8 KB · Views: 162

ongo_gablogian

Well-Known Member
OP
Member
Joined
Mar 26, 2010
Messages
191
Trophies
1
XP
593
Country
United States
Good to hear! That means that you can probably change the image format of most of the images in the game without it crashing. If you run into another error with things displaying black like that, try changing from format 13 to 0 again. This also means that I think there's a transparency issue somewhere in the ETC1A4 code, but I have no idea where (not my code to begin with :V).

The missing X shape in the background is weird. I think that graphic is coming from another or image somewhere. It's not anywhere in the title data you gave me. Have you tried searching around for it?

I've got some good news and some bad news. I rebuilt the title.narc with kiwi.ds editor instead of puyotools and that "X" shaped texture came back. I have no idea where it's located in the romfs and I've looked around for it a bit too. Either way, I guess that's solved.

I've also almost finished the main "Single Player" menu and a screenshot of that is below. The only issue I've noticed is the transparency issue with the puyos and other graphics on the screen (minnade02_d4444.png), maybe you could check it out for me? The files have been uploaded here.

Now the bad news. When I modified the main menu textures (RomFS:/main/main_menu.narc/) the game crashes. I've tested it and it seems to be happen when the xml format value is changed from 13 to 0. I have a few observations that could possibly lead to why this is occurring (main_menu.narc files uploaded here).

- If I rebuild the .ctpk file found in main_menu.narc without changing the format value, the main menu boots but has those black backgrounds, like the title screen originally had. If I unpack modified the file, the pngs that end with etc1a4 no longer have transparent backgrounds and are black instead.

- The single player screen has no issues working when I change the xml format value (besides that strange transparency issues shown below), but I noticed that the ctpk file only contains four etc1a4 images while the main menu ctpk has five or six. So maybe that has something to do with it.


95% Finished Title Screen said:


In Progress Main Menu and Single Player Screens said:
 
Last edited by ongo_gablogian,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool