Following Chalid's advice I created versions of the fire mage and the fire catapult that don't conflict with existing units, i.e. you can now have both regular and fire catapults in game and each will use the appropriate effects, same for fire mage and grenadier. Both are in the attached zip.
In order to make them work you will need to first of all add the following two entries to the
CIV4EffectInfos.xml file:
Code:
<EffectInfo>
<Type>EFFECT_MAGE_FIREBALL</Type>
<Description>Firemage Fireball</Description>
<fScale>1.0</fScale>
<fUpdateRate>1.0</fUpdateRate>
<Path>Art/Units/Firemage/GrenadierGrenade.kfm</Path>
<bIsProjectile>1</bIsProjectile>
<fSpeed>350.0</fSpeed>
<fArcValue>4.0</fArcValue>
</EffectInfo>
<EffectInfo>
<Type>EFFECT_CATAPULT_FIRE</Type>
<Description>Catapult Fire Rock</Description>
<fScale>1.0</fScale>
<fUpdateRate>1.0</fUpdateRate>
<Path>Art/Units/FireCatapult/CatapultRock.kfm</Path>
<bIsProjectile>1</bIsProjectile>
<fSpeed>500.0</fSpeed>
<fArcValue>4.0</fArcValue>
</EffectInfo>
You
cannot change the type of the effect (i.e. EFFECT_MAGE_FIREBALL and EFFECT_CATAPULT_FIRE), but if you put the units in a different folder then you can change the path.
You will also notice that this time, these units come with the animation files. That means the the art definition of these units will also need to modify the KFM tag to reference to the correct animation file. Something like this:
Code:
<UnitArtInfo>
<Type>ART_DEF_UNIT_FIRE_MAGE</Type>
<fScale>0.44</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
[b]<NIF>Art/Units/Firemage/Firemage.nif</NIF>
[color=#aa0000]<KFM>Art/Units/Firemage/Grenadier.kfm</KFM>[/color]
<SHADERNIF>Art/Units/Firemage/Firemage_fx.nif</SHADERNIF>[/b]
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.95</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>
However, there is a problem with the mage that I was unable to resolve and I hope someone might be able to help me out with it. First of all the mage's pedia entry is screwed up, the only thing visible is the icon. On top of that when stacking several mages and selecting one of them the unit list doesn't show up, and if you previously had another stack of units selected then
that list will show up when selecting the stack of mages. I suspect the two problems are related.
The screwed up pedia entry problem I encountered before when I tried to use separate animations for new/modified units, i.e. let's say I gave the swordsman a new sword, but on top of that copied all the animations from the original folder to a new one and referenced them in the art definition. On the other hand if I referenced the original swordsman animations everything would work fine.
Here's the thing though, I modified the catapult and I modified it's animations, yet it works perfectly fine. The only difference I see between it and the fire mage is that I added some items to the fire mage that don't have a proper FX version. I did a quick test by removing them all but it didn't work. Btw, the current FX version of the firemage is proper in that I used the FX versions of christian missionary and grenadier to create it.
If the catapult would also have a problem I would just chuck it up to combination of modified NIFs and animations and learn to live with it, but it does work. That means that something in the way I created the mage caused the problem. It could be the fact that the hood and the cape don't have proper FX versions (I'm still having trouble exporting FX models, but I'm sure I'll figure it out soon), it could be a simple XML mistake, maybe there is another XML reference somewhere that needs to be changed. Anyway, so I'm posting these two units and maybe someone can figure out what the heck is going on.