If you have BTS and just want to add these units for each civ replacing the default swordsman, pikeman, ect then this guide is probably best:
http://forums.civfanatics.com/showthread.php?t=229557
3.0 Unit Art Styles
There has been a lot of amazing work done creating new unit art for civilization 4. Many of these units have been implemented as “flavor” units, sharing identical stats but added to the game to vary the artwork of different civilizations. Unfortunately this requires a new unit to be added to the game, a swordsman (for example) that is a duplicate in every way except its art definition.
BtS allows us to define unit art types, similar to the building art types in warlords. With it you can have one unit definition but configure different civilizations to use different art for that unit. So the Greek scout can be made to look different than an Aztec scout without adding a new unit to the game.
There are 3 steps required to enable this.
3.1 Step 1: CIV4CivilizationsInfos.xml
In this file we need to define the civilizations Unit Art Style as follows:
Code:
<CivilizationInfo>
<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_AMERICA</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<UnitArtStyleType>UNIT_ARTSTYLE_EUROPEAN</UnitArtStyleType>This is very similar to the way city art styles were defined in warlords but added as a separate attribute so modders can use different unit and city building styles. A NONE value will cause the Civ to use all default Unit Art.
3.2 Step 2: CIV4UnitArtStyleTypeInfos.xml
This is a new XML file in BtS. It contains the definition for the Unit Art Style and allows a new unit art meshes to be used for a given unit. In the example below the ART_DEF_UNIT_ARCHER_EURASIAN is the Early art definition used for an Archer and ART_DEF_UNIT_ARCHER_EUROPEAN is used in the middle and late periods. The Archer like most units has only one UnitMesh as specified on its CIV4UnitInfos.xml element. But units can actually have any number of Meshes, the Settler units are the only Original game units to use more then one Mesh and to modify these simply list the replacement Meshes as <UnitMeshGroup> elements, they will be matched in the order with the CIV4UnitInfos meshes and replace it one for one, any number of Meshes can be present in a Unit and all can be substituted in this way.
Any Unit not given replacements for a StyleType will simply be defaulted to the Art from the UnitInfos.xml file and any individual ARTDEFs can be referenced any number of times and in as many different StyleTypes as desired allowing considerable sharing and creation of Styles which differ only at certain time periods to reflect cultures branching and merging.
Code:
<UnitArtStyleTypeInfo>
<Type>UNIT_ARTSTYLE_EUROPEAN</Type>
<StyleUnits>
<StyleUnit>
<UnitType>UNIT_ARCHER</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_ARCHER_EURASIAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_ARCHER_EUROPEAN</LateArtDefineTag>
<MiddleArtDefineTag> ART_DEF_UNIT_ARCHER_EUROPEAN </MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>UNIT_SETTLER</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_SETTLER_MALE_EUROPEAN</EarlyArtDefineTag>
<LateArtDefineTag> ART_DEF_SETTLER_MALE_EUROPEAN </LateArtDefineTag>
<MiddleArtDefineTag> ART_DEF_SETTLER_MALE_EUROPEAN </MiddleArtDefineTag>
</UnitMeshGroup>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_SETTLER_FEMALE </EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_SETTLER_FEMALE </LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_SETTLER_FEMALE </MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
</StyleUnits>
</UnitArtStyleTypeInfo>
Step 3: CIV4ArtDefines_Unit.xml
Just as in Civ4 the Unit Art Information has to exist for the unit. But instead of using the default one assigned to that unit in the Civ4UnitInfos.xml (ART_DEF_UNIT_ARCHER for example) Unit Art Styles allowed us to use a alternate one such as this:
Code:
<UnitArtInfo>
<Type>ART_DEF_UNIT_ARCHER_EUROPEAN</Type>
<Button>,Art/Interface/Buttons/Units/Archer.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,1</Button>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/Archer_European/Archer_European.nif</NIF>
<KFM>Art/Units/Archer_European/Archer.kfm</KFM>
<SHADERNIF>Art/Units/Archer_European/Archer_European_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.85</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>Note that the unit button graphic is defined on the UnitArtInfo, it is no longer set in the CIV4UnitInfos.xml file. This allows us to use different buttons for different unit art styles. This change will also require modders converting older mods to BtS to move all their button info into the art file.
By modifying the SDK you can create alternative types of StyleUnit logic with their own xml files and logic structures such as Units which show different Artwork based on how heavily they are damaged or the presense of specific Promotions.