So basically I make one model with just the bare carrier, then another one with the bombers on it, etc. and you can code it to switch promotion to promotion.
I could do that with XML I presume.
See, this is why it's so tricky.. I'm fairly certain that you're not actually using two versions of a unit.
So, for example, let's just say you're sick of having two infantry types for the ancient era and you decide you just want one unit called Heavy Infantry that can swap out Axes for Swords (and maybe other kinds of weapons). Each new weapon would be represented by a promotion.
This is actually what I want to do (though not with ancient melee units), to make more customizable units.
Now, if I've understood it correctly, the tag in the CIV4PromotionInfos.xml doesn't swap out one model for another. In other words, you can just use the existing models for Swordsmen and Axemen and point the Promotion Axes towards the Axemen folder and the Promotion Swords towards the Swordsmen folder.
The way I understood it is that the unit has to be modelled with the attached part hidden but present on the
original model. Then giving the unit this promotion
reveals that hidden part of the model.
This feature is actually used in the Afterworld Mod.
From the Afterworld CIV4PromotionInfos.xml
Code:
<PromotionInfo>
<Type>PROMOTION_SPAWN1</Type>
<Description>TXT_KEY_REALBTNSENT1</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<LayerAnimationPath>ANIMATIONPATH_AFTERWORLD_BACKPACK_ON</LayerAnimationPath>
..
Don't ask me what that means...
Hrmm... if I had to speculate though, I would guess it would mean that this would point towards new kfm files. If you look at the art folder, you'll see kf files that seem to correspond to these animation paths.
I know artists have problems creating new kfm files, so there might be a Plan B... I
believe it would be possible to modify the SDK code so that the unit art type of a unit can be changed based on promotions.
For example, I want Fighters to be able to equip Torpedoes or Bombs. Bombs would give them a bomb rate boost, torps would give them additional strength vs. ships (obviously). So I would create two different unit art types... maybe something like UNITART_FIGHTER_TORPEDO and UNITART_FIGHTER_BOMB. Then choosing one promotion would replace the fighter with one model and the other replace it with another.
The advantages are this: 1) You'll be able to make the promotion change
anything about the unit because it's pulling from a totally different model. So... model shape, texture, animations, corresponding effects, it's all basically changeable in this way. 2) Unit artists who can't create their own kfm files (and that's most of them) will not be left out.
The disadvantages though are as big as the advantages: 1) This will mean a lot more unit art style types. 2) It could cause problems if you have an ethnic unit art style type for that particular unit.