Users browsing this thread: 8 Guest(s)
Help needed with .tpx files
#1
I'm trying to get sprites from "Trauma Center: New Blood" but can't figure out this file type (.tpx). I've looked and looked for a program that can view or convert these files and can't find anything. The programs I've tried just give me an error message. All other posts on this subject either have no replies or no solution Sad .

Any ideas? Thanks.
Reply
Thanked by:
#2
Share an example of one so we can take a look?
Reply
Thanked by:
#3
Sure, the .tpx files are under "bustup". 

http://www.mediafire.com/folder/pdbn85d3cdz9c/sprite
Reply
Thanked by:
#4
Looks like there's raw image data in the files, though I've been unable to get it to look right.
Reply
Thanked by:
#5
Hmm, do you think it's a lost cause then?
Reply
Thanked by:
#6
Nah, it's not a lost cause. It would just need someone to invest the time into figuring it out, which is well within the realms of possibility seeing as image data can be fairly easily viewed in a distorted manner.
Reply
Thanked by:
#7
Glad there's hope for this haha. How are you able to view the images? The most I've gotten was text with a general file viewer.
Reply
Thanked by:
#8
(09-01-2019, 05:42 AM)1percentcrit Wrote: I'm trying to get sprites from "Trauma Center: New Blood" but can't figure out this file type (.tpx). I've looked and looked for a program that can view or convert these files and can't find anything. The programs I've tried just give me an error message. All other posts on this subject either have no replies or no solution :( .

Any ideas? Thanks.

.TPX files are just containers for .TPL files, however, the palette is a little tricky. The first half is a table with Green and Red values, and the second half is a table with Alpha and Blue values. So basically you need to multiply the number of colors by 4 to get the size of the palette data and then rearrange in the correct order.

I don't know if there is a program that does this, but I wrote one that successfully converted all the chr files:

tpxtopng.exe (69 MB): https://drive.google.com/open?id=1h5gcz2...GAUrbMJx0R
I used Python to write and compile this tool; that's why the file size is huge for a simple tool. Drag and drop the .TPX files into the white box press Convert.

tpxtopng.py (8 KB): https://drive.google.com/open?id=1JEUfBN...f7IVe4HgUA
This is the source code. If you want to run this one, you'll need to install Python 3.6, PyQt5 and PIL.

Convert.py (4 KB): https://drive.google.com/open?id=1En_Jss...QwqiRoURAt
This is a much simpler version. You'll only need to install Python 3.6 and PIL.

Theoretically, they should work with all .TPX files from this game.

Some examples:

                       
Reply
#9
(09-03-2019, 02:39 PM)1percentcrit Wrote: How are you able to view the images?

http://www.rawpixels.net

But see Akaiji's post. Looks like it actually had some now-solved complexity to it. At least that explains why the headers before the image data were so large.
Reply
Thanked by: 1percentcrit
#10
Wow, that’s very impressive! I tried it out and it works like a charm. Thanks for explaining the know-how behind the files Akaiji and Simpsons Dumper. I was in the dark since this is my first time dealing with ripping.

Thank you so much @Simpsons Dumper and @Akaiji. I appreciate you both! Big Grin
Reply
Thanked by:
#11
(09-03-2019, 06:18 PM)1percentcrit Wrote: Wow, that’s very impressive! I tried it out and it works like a charm. Thanks for explaining the know-how behind the files Akaiji and Simpsons Dumper. I was in the dark since this is my first time dealing with ripping.

Thank you so much @Simpsons Dumper and @Akaiji. I appreciate you both! :D

I can't send a private message because it's disabled and this is the only way to reply.

Sure, and thanks for the message, I'm quite pleased to know my tool worked.
Reply
Thanked by: paviv14
#12
(09-03-2019, 02:59 PM)Akaiji Wrote:
(09-01-2019, 05:42 AM)1percentcrit Wrote: I'm trying to get sprites from "Trauma Center: New Blood" but can't figure out this file type (.tpx). I've looked and looked for a program that can view or convert these files and can't find anything. The programs I've tried just give me an error message. All other posts on this subject either have no replies or no solution Sad .

Any ideas? Thanks.

.TPX files are just containers for .TPL files, however, the palette is a little tricky. The first half is a table with Green and Red values, and the second half is a table with Alpha and Blue values. So basically you need to multiply the number of colors by 4 to get the size of the palette data and then rearrange in the correct order.

I don't know if there is a program that does this, but I wrote one that successfully converted all the chr files:

tpxtopng.exe (69 MB): https://drive.google.com/open?id=1h5gcz2...GAUrbMJx0R
I used Python to write and compile this tool; that's why the file size is huge for a simple tool. Drag and drop the .TPX files into the white box press Convert.

tpxtopng.py (8 KB): https://drive.google.com/open?id=1JEUfBN...f7IVe4HgUA
This is the source code. If you want to run this one, you'll need to install Python 3.6, PyQt5 and PIL.

Convert.py (4 KB): https://drive.google.com/open?id=1En_Jss...QwqiRoURAt
This is a much simpler version. You'll only need to install Python 3.6 and PIL.

Theoretically, they should work with all .TPX files from this game.

Some examples:
I'm so sorry for replying to this thread 5 years later, but I literally made an account just to tell you how grateful I am that you made this tool. I'm currently digging through the files of Trauma Team and upon encountering TPX files, I could not for the life of me find an explanation on how to view them or what they even were. I managed to stumble upon this thread/website by pure luck and endless scrolling. It still works like a charm and is extremely vital to my search for unused content (which I have already discovered a lot of) because I don't think anyone has documented the unused content in Trauma Team yet.

I can't thank you enough, this is the kind of thing that's impossible to find. Smile Dunno if you're even still around, but in case you are, I just wanted to let you know how much I appreciate this!
Reply
Thanked by:


Forum Jump: