ROM Hack convert PNG to CTPK with ETC1(a4) compression?

DJPlayer

Banned!
OP
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
45
XP
428
Country
Netherlands
Hey Guys,

I want to know if there's a tool to convert PNG to CTPK with ETC1(a4) compression.
RIght now, I'm working on a Translation Patch of Fire Emblem Fates with some other guys but I want to work on a private project, too.
At the moment, I want to Recolor some Images used for Live2D (pat your waifu) but they're ctpk-files with ETC1a4 compression.
I also want to try to add a new character / custom character in Live2D but I need a way to recompress this ctpk-files.
I'm able to decompress the ctpk-files to png files with ctpktool but ctpktool doesn't support recompression to ETC1(a4).
The recompressed files with ctpktool (like it is at the moment) are compressed with Rgba4 which isn't supported by the game.

Could someone help me out with this?
 

DJPlayer

Banned!
OP
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
45
XP
428
Country
Netherlands
Would there be a way to change the pixelformat to RGBA8888? That trick works for bclims.
not sure :/ bclimtool supports more than one compression method, ctpktool only supports Rgba4-Compression.
When I use Rgba4-compressed ctpk-files, they are looks like "stripes of corrupted stuff"
 

DJPlayer

Banned!
OP
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
45
XP
428
Country
Netherlands
Last edited by DJPlayer,

Rusb

Well-Known Member
Member
Joined
Apr 17, 2014
Messages
178
Trophies
0
XP
945
Country
https://github.com/polaris-/ctpktool

I don't know what version are you using, but I've compiled this.

When you make a conversion from CTPK image, you generate a folder with the image and xml files, for reconvert the image to CTPK, you only have to put the command:

ctpktool.exe "Foldername"

as it's said in Readme.md
 

DJPlayer

Banned!
OP
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
45
XP
428
Country
Netherlands
https://github.com/polaris-/ctpktool

I don't know what version are you using, but I've compiled this.

When you make a conversion from CTPK image, you generate a folder with the image and xml files, for reconvert the image to CTPK, you only have to put the command:

ctpktool.exe "Foldername"

as it's said in Readme.md
This is the tool I've used. It does not repack the file back with ETC1a4 compression.
Decompression of the files of Fire EMblem If does not work with CTPK-Tool. I used FEAT instead.
This xml-file was created
Code:
<?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>R:/graphics/3D/L2D/ch126_カザハナ_KAZAHANA/カザハナ.1024/texture_01.tga</InternalFilePath>
  <RealFilePath>texture_01.png</RealFilePath>
  <Format>13</Format>
  <MipLevel>1</MipLevel>
  <Type>2</Type>
  <Unknown>0</Unknown>
  <BitmapSizeOffset>16</BitmapSizeOffset>
  <Info>1048576</Info>
  <Info2>117506317</Info2>
  <HasAlpha>true</HasAlpha>
</Entry>

FEAT uses the original source of ctpk-tool

the original ctpk-filesize is: 1.048.832 Bytes
The rebuilt filesize with ctpk-tool is: 4.194.560 Bytes
the rebuilt filesize with FEAT is: 4.194.560 Bytes (the same like ctpktool)

I heard that ctpktool rebuild files with RGBa4 only.
Fire Emblem If does not support this compression.
That's why I need a way to rebuild the file with ETC1a4 encryption
 

DJPlayer

Banned!
OP
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
45
XP
428
Country
Netherlands
Okay finally I found a way to create ctpk-files with etc1a4 compression!
There's no tool For it yet, I did it with hex-editing.
There's a fast-created example.
11170315_984440804920317_802947444906973017_o.jpg
 

DarkSynopsis

Well-Known Member
Member
Joined
Oct 15, 2014
Messages
481
Trophies
0
Age
32
Location
New Zealand
Website
ninjasfate.com
XP
2,287
Country
New Zealand
bumping this in hopes that someone has figured something out.

I guess I figured it out like a month back now but since it was pain in the ass process I didn't bother posting about it since I didn't see many people ask about it, last couple of days though I've seen Fates CTPK editing come up so here is the tutorial I captured.



Hope it helps and makes sense :P
 

DeathChaos

Unmei wo koeru!
Member
Joined
Oct 21, 2015
Messages
1,364
Trophies
0
Age
27
XP
1,710
Country
Puerto Rico
I guess I figured it out like a month back now but since it was pain in the ass process I didn't bother posting about it since I didn't see many people ask about it, last couple of days though I've seen Fates CTPK editing come up so here is the tutorial I captured.



Hope it helps and makes sense :P

Will try once I get my 3DS back in working order.
 
General chit-chat
Help Users
    SylverReZ @ SylverReZ: Hope they made lots of spaget