#๐Ÿ”’ TPX inject script

12 messages ยท Page 1 of 1 (latest)

boreal fulcrum
#

Hello everyone. A friend made a tool for me that is able to extract PNG files from inside a TPX container file, but unfortunately this tool is not able to inject edited PNG files back into the TPX, could someone help me with this? I lost contact with this friend and I don't understand Python, but I have the source code and an explanation from him of how it works.

Explanation:
.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. You'll only need to install Python 3.6 and PIL.

https://paste.pythondiscord.com/5RSQ

slim stratusBOT
#

@boreal fulcrum

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

boreal fulcrum
wispy lance
#

Can i ask why you're trying to do this?

#

what are tpx files anyway?

boreal fulcrum
wispy lance
#

okay gotcha

#

Looks quite gnarly. Would be hard to help without knowing anything about the format. Sorry

#

god bless you

boreal fulcrum
slim stratusBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.