Tools you need
Gimp (free download): http://gimp-win.sourceforge.net/stable.html
Gimp DDS plugin: http://nifelheim.dyndns.org/~cocidius/dds/
Vercingetorix's PAK Extractor: http://www.twcenter.net/downloads/db/?mod=43
Setting up
To use the unpacker, follow the instructions in the readme. After extracting, go to data/packs/DATA/MODELS_UNIT and copy or cut the folder named TEXTURES to data/models_unit
To install the dds plugin, extract the files that are in the plugin's zip (excluding the readme) to C:/Program Files/GIMP-2.0/lib/gimp/2.0/plug-ins
Editing
Go to data/models_unit/TEXTURES. Now decide what model you want to base your skin on. Most models have several skins, for several factions. It doesn't matter which you open. I'd suggest opening the one which looks the closest to the skin you wish to make (Don't open the ones that end with GLOSS though). For my example, I'll use UNIT_BARB_INFANTRY_SLAVE.TGA.DDS
After opening it, click CTRL + L to open the Layers dialog. Delete all the layers except the first one by clicking on each and clicking the trash can icon.
Now edit the image any way you wish. Don't add new layers though. Click "save as" (CTRL + Shift + S). Change the name of the file to UNIT_BARB_INFANTRY_TEST.TGA.DDS and click ok.
A dialog will open. In the first rolldown list, labled "Compression", choose DXT5. Check "Generate mipmaps". Make sure "Swap red and alpha" is not checked. Click ok, and exit GIMP.
Putting the unit ingame
For this part, you'll need to edit descr_model_battle.txt and export_descr_unit.txt, both in the Data folder. As a general rule, when editing a text file, make a back up copy first.
First of all, open descr_model_battle.txt and copy paste the following text.
I don't believe it matters much where exactly you put it, but I'll suggest putting it in the barbarians section.Code:type barb_infantry_test skeleton fs_spearman indiv_range 40 texture gauls, data/models_unit/textures/unit_barb_infantry_test.tga model_flexi data/models_unit/unit_barb_infantry_high.cas, 8 model_flexi data/models_unit/unit_barb_infantry_med.cas, 15 model_flexi data/models_unit/unit_barb_infantry_low.cas, 30 model_flexi data/models_unit/unit_barb_infantry_lowest.cas, max model_sprite gauls, 60.0, data/sprites/slave_barb_infantry_sprite.spr model_tri 400, 0.5f, 0.5f, 0.5f
Now open export_descr_unit.txt and copy paste the following text.
I'd suggest pasting it right after the comments, to make it easier to edit it in the future.Code:type barb infantry test dictionary barb_infantry_gaul category infantry class light voice_type Light_1 soldier barb_infantry_test, 60, 0, 1.2 attributes sea_faring, hide_improved_forest, warcry formation 1.2, 1.2, 2.4, 2.4, 5, square stat_health 1, 0 stat_pri 7, 4, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73 stat_pri_attr light_spear, spear_bonus_4 stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1 stat_sec_attr no stat_pri_armour 3, 2, 5, leather stat_sec_armour 0, 0, flesh stat_heat 3 stat_ground 2, -2, 3, 2 stat_mental 4, impetuous, untrained stat_charge_dist 40 stat_fire_delay 0 stat_food 60, 300 stat_cost 1, 420, 200, 50, 70, 420 ownership gauls
You can change the exact parameters. To know what each does, look at the comments at the top of the file.
That's it, your new unit will be selectable for the Gauls in Custom Battle.
If you notice mistakes in my tutorial, inform me inside this thread.
EDIT: Oops, silly mistake. Fixed.
EDIT 2/12: Edited for clarification.
EDIT 3/28: Edited for a working GIMP download site.




Reply With Quote









