The Magic.TXD Build System is used to create TXD files from image files (.PNG, .TGA, ...). It can easily be instrumented to create textures for multiple game versions and platforms.
Video tutorial: On YouTube
How it works
The builder expects a source root folder with directories inside of it. For each directory it finds the builder attempts to turn into a TXD. The contents of the TXD are the image files that are directly inside the directory (excluding sub folders).
Each TXD directory can have a "_build.ini" file that specifies configuration for the entire TXD. Additionally, each image file can have a "*IMGFILENAME*.ini" file for per-image configuration.
- platform: sets the target platform
- rwversion: sets the RenderWare version (220.127.116.11, 18.104.22.168, ...)
- gameVer: sets the RW version depending on a known game configuration tuple (like SA,PC or VC,PS2)
- game: sets the RW version and platform based on a known game configuration tuple (input same as gameVer)
- size: sets a fixed width and height that textures should be scaled to (512,512 or 128,64 etc)
- filterMode: sets the texture filtering mode (point, linear, point_mip_point, point_mip_linear, linear_mip_point, linear_mip_linear)
- uAddress/vAddress: sets the texture addressing mode on a dimension (wrap, clamp, mirror, border)
- compressed: boolean whether the textures should be compressed (true, false)
- comprQuality: sets the compression quality (0.0 .. 1.0)
- palettized: boolean whether the textures should be palettized (color reduced)
- palType: can be PAL4 or PAL8
- genMipmaps: decides whether mipmaps should be generated (true, false)
- genMipMaxLevel: an integer that decides the maximum level to generate mipmaps to (by default 32)
This configuration file builds a TXD for GTA:San Andreas PC with maximum mipmaps and compression.
[main] game=SA,PC compressed=true comprQuality=1.0 genMipmaps=true genMipMaxLevel=32