general hein said:
...Being able to give units attack and defense stats seems essential if you want to have more realistic warfare...
There is a work around for this. It is not exactly what you are looking for but it is close. The following CIV4UnitInfos.xml entries can be used to simulate this:
<
UnitClassAttackMods/> Used to give a strength bonus
while attacking a certain unit (must be a specific unit, eg -
UNITCLASS_RIFLEMAN, use multiple entries if necessary)
<
UnitClassDefenseMods/> Used to give a strength bonus
while defending against a certain unit (must be a specific unit, eg -
UNITCLASS_RIFLEMAN, use multiple entries if necessary)
<
UnitCombatMods/> Used to give a strength bonus against a certain unit class of units (must be a class of units and not a specific unit, eg -
UNITCOMBAT_MELEE, use multiple entries if necessary)
UnitCombatMods give the bonus to strength in all cases (attacking or being attacked).
Note to developers: Break up <UnitCombatMods> into <UnitCombatAttackMods> and <UnitCombatDefenseMods> allowing for attack only bonuses (or defensive) against a certain group of units (eg - Melee), but keep the original <UnitCombatMods>. This would keep me from having to enter every unit in a group into <UnitClassAttackMods> and give the users the flexibilty of attack only modifications against Melee units, for example.
<DomainMods> Used to give a strength bonus against a certain domain (ie - land, air, sea). Must be a domain only (ie - DOMAIN_SEA, DOMAIN_LAND, DOMAIN_AIR)
For example:
1) a Grenadier has a UnitClassAttackMod of 50% verses Riflemen. This means that when attacking Riflemen, it has a strength of 18 and when defending it has a strength of 12.
2) Currently nothing uses UnitClassDefenseMod, but the principle is the same as #1
3) There are several examples for UnitCombatMods: Infantry has a 25% bonus against all Gunpowder units, whether defending or attacking.
4) A Bomber is an example of a domain mod. It is -50% vs all Ships (DOMAIN_SEA)
With these settings you can create, with a lot of effort, your attack and defensive strength units. Although the units would still have one overall strength, this level of customizing allows us to take it farther than default Civ IV.