Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Making Sprites"

From TWC Wiki
Jump to navigationJump to search
(Now "Sprites" is the primary page and "Making Sprites" is the secondary)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
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_functions|command line]].  For some general discussion on the process see [http://forums.totalwar.org/vb/showthread.php?t=44180 here].
+
#REDIRECT [[Sprites]]
 
 
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 [http://www.twcenter.net/forums/showthread.php?t=57990& 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 [http://developer.nvidia.com/object/n...ure_tools.html nvidia plug ins].
 
 
 
http://img152.imageshack.us/img152/3311/ddsdm3.jpg
 
 
 
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 [http://files.filefront.com/DDS%20Converter%202%2010/;3577988;;/fileinfo.html 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 [http://www.azheavymetal.com/~lupasrename/ 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!''
 

Latest revision as of 17:30, 28 January 2007

Redirect to: