texture_import
Writes a PNG edited from texture_export back as the game’s texture (.dds): in the original’s format with every halving of the picture down to a pixel, as the game’s own are, and the game’s smaller copies for its farther models too. The picture’s sides must be powers of two. Answers the files written and where to put them for the game to take them. Writes nothing in the game’s folders.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
name | string | yes | The texture the PNG replaces, “cn_bdy_ogra_0d.dds”: its format is the one written, and its name the file’s. |
source | string | Which copy, by its source (“core”, “addin:…”). Default: the copy the game takes. | |
archive | string | Which copy, by its archive’s path. | |
to | string | yes | The folder to write into, a full path; made if missing. Never inside the game’s folder. |
png | string | yes | The edited picture, a PNG’s full path. |
normal | boolean | Whether it is a normal map, x, y, z in the PNG’s red, green and blue. Default: its name ends in n, as the game’s do (cn_bdy_ogra_0n). | |
format | "dxt1" | "dxt5" | "dxt5_normal" | "a4r4g4b4" | "a8r8g8b8" | The DDS format to write. Default: the original’s (DXT3 becomes DXT5, 24 bits 32). | |
far_copies | boolean | Also write the game’s smaller copies for its farther models (…_0dl2, _0dl3), from the picture halved. Default true. |
Call it as texture_import over MCP, or from a shell as ghilana.exe --call texture_import '<arguments as JSON>'.