Difference between revisions of "Magic.TXD/Build System/"

From GTAMods Wiki
Jump to navigation Jump to search
m
m (added video tutorial)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
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.
 
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: [https://www.youtube.com/watch?v=qAsKaXIX1GU On YouTube]
  
 
==How it works==
 
==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).
 
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).
 +
 +
[[File:build_help_pal.png|550px]]
  
 
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.
 
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.
 +
 +
[[File:mgtxd_build_indivcfg.png|550px]]
  
 
==Configurations==
 
==Configurations==

Latest revision as of 12:13, 8 September 2016

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).

Build help pal.png

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.

Mgtxd build indivcfg.png

Configurations

  • platform: sets the target platform
  • rwversion: sets the RenderWare version (3.1.0.0, 3.4.3.1, ...)
  • 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)

Example

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