Difference between revisions of "Making Sprites"
|Line 38:||Line 38:|
''Good luck and happy modding!''
''Good luck and happy modding!''
Revision as of 04:59, 28 January 2007
You can make sprites for new units in RTW and BI by using a function that is built into both games by CA. To activate the function you need to add -sprite_script to your command line. For some general discussion on the process see here.
As well as the command line you need a text file called sprite_script.txt in your RTW root level directory (same one the .exe files are in) with all the units that you want sprites for listed see example below:
horse_light romano_british horse_light no_faction west_spearmen goths west_spearmen slave
You just need the units name as listed in descr_model_battle.txt followed by a space and then the faction name that you want sprite for (you must have texture line for that faction in DMB). Use no_faction for merc textures.
There is a tool here which will generate a sprite script for all the units in your descr_model_battle.txt, unfortunately its other functions don't seem to work properly.
The sprite generator needs certain preferences settings to work. You must have anti-aliasing turned off, and you must be using 16bit colour - not 32bit. You can change these settings in the game options before you add -sprite_script to the command line or edit the text in the file preferences/preferences.txt (bi/preferences/preferences.txt if you're using BI) to change the settings. Please note that some graphics cards override the game preferences settings so you may need to make changes in your graphics control panel as well. If settings are incorrect you can either get 100's of tga's per sprite or all black tga's.
The sprite generation process can take a few hours if you are making them for all units in a mod. The game doesn't give you any indication that the process is working - all you see is splash screen - but you can look in your data/sprites folder and check that new sprites are appearing there.
Instructions After Sprites are Generated
When process has worked properly you should have between about 1 and 5 tga's for each unit and a .spr file e.g.
alemanni_horse_medium_sprite.spr alemanni_horse_medium_sprite_000.tga alemanni_horse_medium_sprite_001.tga alemanni_horse_medium_sprite_002.tga
You can run game using .tga sprites but it's much more efficient if you convert them to .dds files. For small numbers you can do this manually by opening them in Photoshop or similar graphic editing program and re-saving them as .dds files. To get Photoshop to read and save .dds files you will need nvidia plug ins.
Correct save settings are DXT5 ARGB - 2d texture - generate all MIP maps, see above screen shot. For large numbers of sprites you can try using a batch conversion tool.
Once your files are converted please note that they have to be named 'file_name.tga.dds' eg.
alemanni_horse_medium_sprite.spr alemanni_horse_medium_sprite_000.tga.dds alemanni_horse_medium_sprite_001.tga.dds alemanni_horse_medium_sprite_002.tga.dds
to change multiple files use a renaming tool such as Lupas rename. Don't forget to also delete the original .tga files when you have done the conversion.
After that you just need to add the correct lines for your new sprites in descr_model_battle.txt ie.
model_sprite alemanni, 100.0, bi/data/sprites/alemanni_horse_medium_sprite.spr
Good luck and happy modding!