• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

Tool TConvert - Extract content files and convert them back



A combination tool for managing Terraria content resources. Extract from Xnbs, convert to Xnbs, backup, and restore. The unofficial sequel to TExtract.

Suppots: Images, Sounds, Sprite Fonts, ReLogic's Dynamic Sprite Fonts, and Wave Banks




Preview

(This preview has been sped up)




Features

~ Extract image, sound, and font resources from Terraria's Xnb files, and extract songs from Terraria's Xwb wave bank ~
~ Convert images and sounds back into Xnb format and copy them to the content directory ~
~ Backup and restore your content folder for when you need to remove changes (Glorified file copier) ~
~ Run scripts that give more control over where files go when they are converted or extracted ~
~ Drop files into the window to automatically process them ~
~ Command line support for use with Windows Shell or the command prompt ~
~ Set paths as "." to use the current directory of the executable ~

Requirements

.NET Framework 4.5.2 | Windows 7 or later

Downloads: v1.0.2.1

TConvert-1.0.2.1.exe
(The main UI-based executable)
TConvert-Console-1.0.2.1.exe
(The pure console-based version of TConvert. Works better on the console but has no UI)

~ Previous downloads can be found at the bottom of the page ~



Script Guides

How to Write XML
How to Write Scripts
Example Script


Links

Wiki | Credits | Image Album | Source Code



⬅ Other Information

v1.0.2.1
  • Program no longer crashes when failing to find the Terraria install directory and trying to extract a Wave Bank.
v1.0.2.0
  • Both now support premultiplying image alpha when converting to XNB. Note: This feature is enabled by default as most users will be expecting it (especially when A == 0 and RGB != Black)
v1.0.1.0
  • Now packaged with the full version of FFmpeg, which drastically increased the file size of the executable.
  • Numerous non-wave audio formats are now supported.
  • Now launches Terraria from the configured save folder in Terra Launcher if present on the computer.
  • A bit of code refactoring.
v1.0.0.4
  • No longer throws an error when encountering comments in xml scripts.
v1.0.0.3
  • Wave Banks can now extract to and from paths with spaces in them.
  • Renamed extracted tracks and TrackList file.
v1.0.0.2
  • Font checkbox in extract tab should properly disable.
  • No more errors related to invalid or null paths.
v1.0.0.1
  • Fixed an outdated error message window using the old program name and not linking to the correct GitHub page.
v1.0.0.0

The first release. Comes with everything you need to convert and extract Xnb files.
 
Last edited:

Unftf

Terrarian
Nice! Very useful.

Correct it can't extract shader? I get some error message:
Error: Extracting:...amapps\common\Terraria\Content\PixelShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)
Error: Extracting: ...amapps\common\Terraria\Content\ScreenShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)
Error: Extracting:..mapps\common\Terraria\Content\TileShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)

Did you made some change at the image size? E.g. NPC_276.png is 46x842 but has 15 different states. But you cant divide 842 by 15. Last two pixel not needed. Or do you know the reason for those sizes?
 
Last edited:
Nice! Very useful.

Correct it can't extract shader? I get some error message:
Error: Extracting:...amapps\common\Terraria\Content\PixelShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)
Error: Extracting: ...amapps\common\Terraria\Content\ScreenShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)
Error: Extracting:..mapps\common\Terraria\Content\TileShader.xnb
Reason: Xnb error (Unsupported asset type: Microsoft.Xna.Framework.Content.EffectReader.)

Did you made some change at the image size? E.g. NPC_276.png is 46x842 but has 15 different states. But you cant divide 842 by 15. Last two pixel not needed. Or do you know the reason for those sizes?
Yes, it's correct to say that shaders are not extractable. Whether it's even possible to decompile shaders in the first place is something I'm not sure of.

No changes are made to the extracted images, they are extracted exactly as they are stored. I guess this is either a simple mistake on Terraria's end, or a buffer to prevent looking outside the image. Other reasons are certainly a possibility.
 

blahblahbal

Skeletron Prime
I just found out that TConvert has a fairly large 'bug' in it. If you use white transparent pixels in a sprite, these pixels are converted to opaque white pixels. What I mean by 'white transparent pixels' is pixels that are fully transparent, but have an RGB value of 255, 255, 255.
 
I just found out that TConvert has a fairly large 'bug' in it. If you use white transparent pixels in a sprite, these pixels are converted to opaque white pixels. What I mean by 'white transparent pixels' is pixels that are fully transparent, but have an RGB value of 255, 255, 255.
Whoops. Looks like I forgot to premultiply the alpha. Amusingly enough I just pushed this same fix to png_to_xnb a few months ago. I'll get right on this.

A basic rundown for those who aren't familiar: Premultiplying alpha is what XNA does by default to images so that they're ready to be drawn without having to multiply the RGB channels by the alpha every time the image is drawn at runtime.

Edit: And v1.0.2.0 is live with premultiplied alpha (Now the default setting).
 
Last edited:
Top Bottom