Magic.TXD/Build System/

From GTAMods Wiki
Revision as of 16:47, 19 March 2016 by The GTA (talk | contribs) (Configurations)
Jump to navigation Jump to search

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.

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

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