The full credit for this tutorial goes to Caliban who posted the original in May 2007. Further credit is extended to alpaca for his DDS<->Texture tool and NVIDIA, ImageMagick and u7angel for the DDS converter .
The aim of this rewrite is to consolidate the information gathered in the original thread and to provide a safe upload for the tools and their 'soft and easy' setup.
The hard core way
For those interested in the inner workings of generating sprites please refer to my post in the original thread
.
The soft and easy way
Setup
Extract this download into the Medieval II Total War main folder, 7zip is freeware Open the CFG file of your mod (use Notepad) and add bypass_sprite_script = 1 to the [misc] section, create section if necessary Make sure you have a Python version less then 2.7 installed, else install from the applicable download link
Preparation
Open the sprite_script.txt file in the Medieval II Total War main folder and enter the model name(s) from the modelDB file, one entry per line Make sure sprite entries in ModelDB follow this naming convention otherwise you have to change either the sprite file name or the ModelDB entry (the line count numbers have not been added in the example) :
Code:
model name
Mesh lines
faction
texture line
texture line
unit_sprites/faction _model name _sprite.spr
Converting Once your mod has exited go to the ...\Medieval II Total War\export\unit_sprites folder and proceed as follows:
Run\double click the _1 Convert TGA to DDS file - you will have to browse to the export\unit_sprites folder to set the source and destination folder, this is a one time affair. The other settings have been preset. Click 'Convert' Run\double click the _2 Convert DDS to Texture file Run\double click the _3 Delete DDS and TGA file Move the remaining SPR and TEXTURE files into the ....\data\unit_sprites folder of your mod Put a hash (#) sign in front of the bypass_sprite_script line of your mod's CFG file unless you wish to generate further sprites
Note: the DOS windows may not close after finishing the task - this is done to enable bug hunting. Simply press any button to close the window, click on the window first to activate it.