Users browsing this thread: 4 Guest(s)
Hero of the Kingdom .tpx file extraction help
#1
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#pVNHX4ZKXs...51sN7ORUtg
Reply
Thanked by:
#2
(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#pVNHX4ZKXs...51sN7ORUtg

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?
   
applecuckoo - ripper of sounds, sprites and models

Places to get help:
DYKG/VG Resource Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files. I'm also there under the same username.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by:
#3
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
Reply
Thanked by: applecuckoo
#4
(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.
applecuckoo - ripper of sounds, sprites and models

Places to get help:
DYKG/VG Resource Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files. I'm also there under the same username.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by: bdeggers
#5
(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]
Reply
Thanked by: applecuckoo
#6
(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.
applecuckoo - ripper of sounds, sprites and models

Places to get help:
DYKG/VG Resource Discord - This is where most of the ripping experts on the VG Resource hang out these days, so you should probably start here. Any requests to rip stuff (i.e. "Please rip sounds/models/sprites from game X!") are only allowed here as per the rules.

ResHax forum - Another forum that is home to most of the reverse engineers who were on the old ZenHax and XenTax forums. A great place to get help for any mysterious files. I'm also there under the same username.

And remember, always upload example files. That way, people don't have to dig in and fetch them for you.
Reply
Thanked by:


Forum Jump: