ROM Hack [Release] CTPK Tool

DarkSynopsis

Well-Known Member
Member
Joined
Oct 15, 2014
Messages
483
Trophies
0
Age
33
Location
New Zealand
Website
ninjasfate.com
XP
2,625
Country
New Zealand
Is it normal that I export a ctpk file that is about 1.345 kB and after ctpktool converts the same folder back into a ctpk file, it's suddenly exactly 1 MB? The file then causes graphical errors in the game. Another file that already was 1 MB in size when I exported it obviously worked fine after some editing, but does anybody know how to handle files with different sizes?

Ran into similar problems in the past with graphical glitches, ended up having to do some messy hex editing to get stuff working, does the ctpk contain multiple images? if so are they different resolutions? I can't recall if the troublesome files I messed with in the past had multiple images but with Nagato's TXP Tool on VITA the images get messed up when there are multiple images and different resolutions, main reason I bring up the VITA tool is it works in a very similar way to this CTPK one.
 

Giodude

GBAtemp's official rock
Member
Joined
May 17, 2015
Messages
5,094
Trophies
1
Age
23
Location
New York
XP
2,761
Country
United States
im sorry to bump such an old thread, but i downloaded the tool, and even though they both are clearly in the same path, it says there is no ctpk file.
Capture.PNG
Capture.PNG

any idea why it wouldnt be able to find the ctpk file?
 

bqio

Active Member
Newcomer
Joined
Mar 30, 2017
Messages
30
Trophies
0
Age
25
XP
207
Country
Russia
Decoded the file status_u.ctpk.lz via FEAT.
As a result, I got a folder with graphical .PNG and .XML files.
I changed them and encrypted them back with ctpktool.
After that, I used DSDecmp4 to encrypt the file and got status_u.ctpk.lz.
Collected ROM and launched in Citra. As a result, I received a green screen instead of a texture. What to do? :huh:
XIwC4IU8Yvo.jpg
 
Last edited by bqio,

Subötaï

Well-Known Member
Member
Joined
Jul 13, 2016
Messages
141
Trophies
0
Age
34
XP
926
Country
script for batch extraction

Code:
:::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights
:::::::::::::::::::::::::::::::::::::::::
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges_%batchName%.vbs"
ECHO args = "ELEV " >> "%temp%\OEgetPrivileges_%batchName%.vbs"
ECHO For Each strArg in WScript.Arguments >> "%temp%\OEgetPrivileges_%batchName%.vbs"
ECHO args = args ^& strArg ^& " "  >> "%temp%\OEgetPrivileges_%batchName%.vbs"
ECHO Next >> "%temp%\OEgetPrivileges_%batchName%.vbs"
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%temp%\OEgetPrivileges_%batchName%.vbs"
"%SystemRoot%\System32\WScript.exe" "%temp%\OEgetPrivileges_%batchName%.vbs" %*
exit /B
:gotPrivileges
if '%1'=='ELEV' shift /1
setlocal & pushd .
cd /d %~dp0
for %%k in (%0) do set batchName=%%~nk
del "%temp%\OEgetPrivileges_%batchName%.vbs" 1>nul 2>nul
::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
:Loop
IF "%1"=="" GOTO Continue
   ctpktool.exe -x %~f1
SHIFT
GOTO Loop
:Continue
pause
 

Rooster33

New Member
Newbie
Joined
Sep 12, 2019
Messages
3
Trophies
0
Age
27
XP
45
Country
United Kingdom
I have converted and edited an image but when i turn it back into a ctpk and rebuild everything it plays up the the bit i changed it black screens ob menu cause thsts whst i edited is there a way to fix this yet?
 
D

Deleted User

Guest
Looks like the links to this tool are no longer functional. Does anyone have an updated link that for ctpktool?
there's probably no chance you're still interested, but I have an answer for anybody who finds this thread later.
i have a fork that still lives. https://github.com/MyLegGuy/ctpktool-patching
you can clone it and revert to commit 9ca30d043b28c99367212cb3c8772eeef1534bde if you only want polaris-'s code. https://github.com/MyLegGuy/ctpktool-patching/archive/9ca30d043b28c99367212cb3c8772eeef1534bde.zip
but i recommend my fork because it has an rgba4 bug fix.
 

Xmortal

Other Nickname Legarad
Member
Joined
May 28, 2008
Messages
306
Trophies
1
Age
36
Location
Venezuela
XP
1,106
Country
Venezuela
there's probably no chance you're still interested, but I have an answer for anybody who finds this thread later.
i have a fork that still lives. https://github.com/MyLegGuy/ctpktool-patching
you can clone it and revert to commit 9ca30d043b28c99367212cb3c8772eeef1534bde if you only want polaris-'s code. https://github.com/MyLegGuy/ctpktool-patching/archive/9ca30d043b28c99367212cb3c8772eeef1534bde.zip
but i recommend my fork because it has an rgba4 bug fix.

I looking binary file ctpktool.exe, Even yours is useless without creating that file.
 
Last edited by Xmortal,

DKH6789

Active Member
Newcomer
Joined
Jun 1, 2020
Messages
28
Trophies
0
Age
33
XP
273
Country
Vietnam
Decoded the file status_u.ctpk.lz via FEAT.
As a result, I got a folder with graphical .PNG and .XML files.
I changed them and encrypted them back with ctpktool.
After that, I used DSDecmp4to encrypt the file and got status_u.ctpk.lz.
Collected ROM and launched in Citra. As a result, I received a green screen instead of a texture. What to do? :huh:
XIwC4IU8Yvo.jpg
Did you find solution for this?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • realtimesave @ realtimesave:
    @SylverReZ that reminds me that my friend sells CRTs he gets cheap or free for hundreds of dollars. people are dumb
    +1
  • RedColoredStars @ RedColoredStars:
    And is incredibly annoying.
  • realtimesave @ realtimesave:
    man I just washed my shoes and they look exactly the same as before I washed them :|
  • realtimesave @ realtimesave:
    luckily they didn't fall apart
  • RedColoredStars @ RedColoredStars:
    Some CRTs are very much worth the price
  • RedColoredStars @ RedColoredStars:
    i used to go out to the recycling center every couple weeks and look at the crts and other electronics people would drop off. Usually screens were broken or severely scratched from being tossed around. Did find a good one here and there, but never anything like a 1080i widescreen crt.
  • RedColoredStars @ RedColoredStars:
    Or a good contition 40" Sony Trini that weighs 300 lbs. lol
  • RedColoredStars @ RedColoredStars:
    Literally 300 lbs. lolol
  • BigOnYa @ BigOnYa:
    I have a few of those boat anchors in my basement I tried giving away but no one wanted them, So anyone close to Columbus, Ohio area that wants them, (26", 2x 19") please come get, for free.
  • RedColoredStars @ RedColoredStars:
    Dont know anyone wants those smaller ones. Most are after larger sizes and the kinda top of the line models
  • RedColoredStars @ RedColoredStars:
    Motion handling and input lag on those things destroy plasmas, led, oled
  • realtimesave @ realtimesave:
    I had some really nice CRTs I should've kept
  • realtimesave @ realtimesave:
    now I have all lcd
  • realtimesave @ realtimesave:
    one in particular I regret getting rid of oh well :|
  • realtimesave @ realtimesave:
    the Sonys and stuff I don't care about
  • realtimesave @ realtimesave:
    and used LCD are hard to sell I can imagine.. not worth much
  • realtimesave @ realtimesave:
    @SylverReZ where do u lurk
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    Is it piracy if it was released for free? Not in my opinion, but I also think it's not piracy if buying it isn't owning it, and it's not piracy if you can't buy it from the original creators anymore.
  • K3Nv2 @ K3Nv2:
    Free release can have loopholes where they still make money through ads
    +1
  • Xdqwerty @ Xdqwerty:
    sigh
  • Xdqwerty @ Xdqwerty:
    @a_username_that_isnt_cool, could you change your username?
  • Xdqwerty @ Xdqwerty:
    i guess not...
  • Xdqwerty @ Xdqwerty:
    yawn
  • Xdqwerty @ Xdqwerty:
    anybody here?
    Xdqwerty @ Xdqwerty: anybody here?