09-03-2019, 02:59 PM
(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: