Psi combat

Maniac

Apolyton Sage
Joined
Nov 27, 2004
Messages
5,603
Location
Gent, Belgium
I'd like to make a description of how psi combat works. I don't really understand what C++ code is all responsible for combat or what it means, so please plug holes in what I'm writing here, to improve the description of psi combat.

Normally combat makes use of a unit base combat strength. In unmodded Civ4 this is <iCombat>. In Planetfall this is currently the sum of <iCombat> in ChassisInfos and WeaponInfos, and <iCombatModifier> in PromotionInfos. Gerikes also coded some XML tags in PromotionInfos to seperately increase attack or defense strength, but I don't see a use for those at the moment. In any case, this base combat strength is used for both offense and defense in unmodded Civ4.

What I would suggest for psi combat is that the base combat strength of the two units in a battle is ignored, and replaced by:
For the attacker: always a base combat strength of 3
For the defender: Depends on the domain of the defending unit. As in SMAC the value I'd try out for DOMAIN_LAND is 2; for the other domains (DOMAIN_SEA, DOMAIN_AIR and DOMAIN_IMMOBILE) three.

Q: When is a battle a psi battle?
A: When at least one of the two units taking part in a battle is a psi unit.

Q: When is a unit a psi unit?
A: When it has the boolean XML tag <bPsi></bPsi> set to 1. New tag, should be added to CIV4ChassisInfos.xml.

Q: What about collateral damage?
A: If the unit dealing collateral damage is a psi unit, all damage is calculated using the units' combat strength. If the unit dealing collateral damage is a conventional unit, and only part of the target units are psi, the conventional combat strengths are used for the conventional targets, and the psi combat strengths are used to calculate the collateral damage to the psi unit.

Q: What about ranged and air combat?
A: As with conventional direct combat, <iAirCombat> should be ignored and replaced by the psi combat strengths.


Psi combat strength, just like conventional base combat strengths, is affected by all kinds of possible modifiers. Combat promotions, terrain and feature attack and defense boni, fortifying, river crossing... No need to change all that.
 
I think you covered all the bases.

Wodan
 
Back
Top Bottom