<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=TPL_%28File_Format%29</id>
	<title>TPL (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=TPL_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=TPL_(File_Format)&amp;action=history"/>
	<updated>2026-05-06T18:42:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=TPL_(File_Format)&amp;diff=328&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=TPL_(File_Format)&amp;diff=328&amp;oldid=prev"/>
		<updated>2024-05-01T18:06:05Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;TPL&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;exture &amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;alette &amp;#039;&amp;#039;&amp;#039;L&amp;#039;&amp;#039;&amp;#039;ibrary) is an image file format introduced on the [[Nintendo GameCube]], but later used on [[Wii]]. The format can store multiple textures into one file, though typically one file will contain one image. It also allows mipmaps to be stored. TPL files are on [[Wii]] used together with [[BRLYT]] and [[BRLAN]] to generate 2D layout.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
The file starts with the following header:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File version&amp;#039;&amp;#039;&amp;#039;. Always 0x0020AF30.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || &amp;#039;&amp;#039;&amp;#039;Number of [[#Image Table|image tables]]&amp;#039;&amp;#039;&amp;#039; in this file.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Image Table|Image tables]] offset&amp;#039;&amp;#039;&amp;#039;. This will always be placed after this header, thus 0x0C.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Image Table ==&lt;br /&gt;
The image table structure stores the texture. It splits the image into two sections, image and palette, where the latter is only used if the format used is a palette format. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Image|Image]] offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Palette|Palette]] offset&amp;#039;&amp;#039;&amp;#039;. May be 0 if this image doesn&amp;#039;t have a palette.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Image ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Height of image&amp;#039;&amp;#039;&amp;#039; in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Width of image&amp;#039;&amp;#039;&amp;#039; in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[GameCube and Wii Image Formats|Image format]]&amp;#039;&amp;#039;&amp;#039;. The pixel data type is determined by this value.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Image data offset&amp;#039;&amp;#039;&amp;#039;. Offset to the data of the first image. The mipmaps are stored directly after the end of the first image.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Wrap S&amp;#039;&amp;#039;&amp;#039;. 0 = Clamp, 1 = Repeat, 2 = Mirror&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Wrap T&amp;#039;&amp;#039;&amp;#039;, same enum as above.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Minification filter&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Type&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nearest&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Linear&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Nearest_Mipmap_Nearest&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Linear_Mipmap_Nearest&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Nearest_Mipmap_Linear&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Linear_Mipmap_Linear&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Magnification filter&amp;#039;&amp;#039;&amp;#039;. 0 = Nearest, 1 = Linear&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || &amp;#039;&amp;#039;&amp;#039;LOD bias&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Byte || &amp;#039;&amp;#039;&amp;#039;Edge LOD enable&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || Byte || &amp;#039;&amp;#039;&amp;#039;Min LOD&amp;#039;&amp;#039;&amp;#039;. The level of the first image stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || Byte || &amp;#039;&amp;#039;&amp;#039;Max LOD&amp;#039;&amp;#039;&amp;#039;. The level of the last image stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || Byte || &amp;#039;&amp;#039;&amp;#039;Unpacked&amp;#039;&amp;#039;&amp;#039;. Must be set to 0 in file, set to 1 at runtime when the TPL file has been loaded.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Palette ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of palette entries&amp;#039;&amp;#039;&amp;#039;. Each consist of a color of the type specified by the palette format.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Unpacked&amp;#039;&amp;#039;&amp;#039;. Must be set to 0 in file, set to 1 at runtime when the TPL file has been loaded.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[GameCube and Wii Image Formats|Palette format]]&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Palette offset&amp;#039;&amp;#039;&amp;#039;. Offset to the palette colors.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
The following tools can handle TPL files:&lt;br /&gt;
* [[BrawlBox]], by [[Kryal]] and [[BlackJax96]]&lt;br /&gt;
* [[CTools Pack]], by [[Chadderz]]&lt;br /&gt;
* [[SZS Modifier]], by [[Chadderz]]&lt;br /&gt;
* [[Wexos&amp;#039;s Toolbox]], by [[Wexos]]&lt;br /&gt;
* [[Wiimms SZS Tools]], by [[Wiimm]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GameCube File Formats]]&lt;br /&gt;
[[Category:Wii File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>