The VG Resource
Hero of the Kingdom .tpx file extraction help - Printable Version

+- The VG Resource (https://www.vg-resource.com)
+-- Forum: The Resources (https://www.vg-resource.com/forum-109.html)
+--- Forum: The Spriters Resource (https://www.vg-resource.com/forum-110.html)
+---- Forum: Ripping Help (https://www.vg-resource.com/forum-114.html)
+---- Thread: Hero of the Kingdom .tpx file extraction help (/thread-43048.html)



Hero of the Kingdom .tpx file extraction help - bdeggers - 09-28-2024

I've been trying to extract the assets from all the Hero of the Kingdom games for the last couple of months
They've got TPX (figuring that these files are texture files), TSG files and EMT files

I've attached one of the TPX files if someone wants to have a go at figuring it out

https://mega.nz/file/XQw0AbwT#pVNHX4ZKXscvCS2zJzWXowfHH73afU8xx51sN7ORUtg


RE: Hero of the Kingdom .tpx file extraction help - applecuckoo - 10-01-2024

(09-28-2024, 09:59 AM)bdeggers Wrote: I've been trying to extract the assets from all the Hero of the Kingdom games for the last couple of months
They've got TPX (figuring that these files are texture files), TSG files and EMT files

I've attached one of the TPX files if someone wants to have a go at figuring it out

https://mega.nz/file/XQw0AbwT#pVNHX4ZKXscvCS2zJzWXowfHH73afU8xx51sN7ORUtg

Pretty easy, the header is 32 bytes while width and height are stored as 2 u32s at 0x0c and 0x10 respectively. The image data itself is BGRA8888. Did you expect something like this?
   


RE: Hero of the Kingdom .tpx file extraction help - bdeggers - 10-01-2024

Thank you. I was expecting something like this
I'm figuring that you edited it via a hex editor of some kind

I'm not so cluey when it comes to using it. I normally just use AssetStudio or umodel to extract the game assets


RE: Hero of the Kingdom .tpx file extraction help - applecuckoo - 10-02-2024

(10-01-2024, 09:28 AM)bdeggers Wrote: Thank you. I was expecting something like this
I'm figuring that you edited it via a hex editor of some kind

I'm not so cluey when it comes to using it. I normally just use AssetStudio or umodel to extract the game assets

I didn't really edit the file with the hex editor per se, it's more about messing around until you find the right details. After that, you import that raw data into something like PVRTexTool and you export it as a PNG.


RE: Hero of the Kingdom .tpx file extraction help - bdeggers - 10-02-2024

(10-02-2024, 02:09 AM)applecuckoo Wrote:
(10-01-2024, 09:28 AM)bdeggers Wrote: Thank you. I was expecting something like this
I'm figuring that you edited it via a hex editor of some kind

I'm not so cluey when it comes to using it. I normally just use AssetStudio or umodel to extract the game assets

I didn't really edit the file with the hex editor per se, it's more about messing around until you find the right details. After that, you import that raw data into something like PVRTexTool and you export it as a PNG.

Thank you so much for your help, I ended up downloading a program called TextureFinder, and messing with the width, height and pixel format, I was able to manage to get it to work somewhat
and got it to work with PVRTex Tool too

[Image: LXD9vHN.png]


RE: Hero of the Kingdom .tpx file extraction help - applecuckoo - 10-02-2024

(10-02-2024, 10:40 AM)bdeggers Wrote:
(10-02-2024, 02:09 AM)applecuckoo Wrote:
(10-01-2024, 09:28 AM)bdeggers Wrote: Thank you. I was expecting something like this
I'm figuring that you edited it via a hex editor of some kind

I'm not so cluey when it comes to using it. I normally just use AssetStudio or umodel to extract the game assets

I didn't really edit the file with the hex editor per se, it's more about messing around until you find the right details. After that, you import that raw data into something like PVRTexTool and you export it as a PNG.

Thank you so much for your help, I ended up downloading a program called TextureFinder, and messing with the width, height and pixel format, I was able to manage to get it to work somewhat
and got it to work with PVRTex Tool too

[Image: LXD9vHN.png]
Seems like part of the character is shifted to the right? I only use TextureFinder to figure out the details and I never use it for export, mainly because TextureFinder doesn't preserve transparency.

Anyways, your PVRTexTool import settings should look like this:

[Image: uaY2JB8.png]
To recap, file size is 130x154, the data offset is 32 bytes, the color space should be set to sRGB, and the pixel format should be set up as uncompressed BGRA8888. Everything else isn't really important here.