Adding new damage/armor types

  More problems. >_>

When trying to give fighters a new damage type I added to gameplay.constants

DamagePercentBonus:FIGHTER:CapitalShip 0.25
DamagePercentBonus:FIGHTER:VeryLight 1.0
DamagePercentBonus:FIGHTER:Light 2.0
DamagePercentBonus:FIGHTER:Medium 1.0
DamagePercentBonus:FIGHTER:Heavy 1.00
DamagePercentBonus:FIGHTER:VeryHeavy 0.25

ChanceToHitTargetType:FIGHTER
CAPITALSHIP 1.00000
INTERCEPTOR 0.650000
BOMBER 0.100

And on all the fighters I changed their damage type from "ANTILIGHT" to "FIGHTER".
Now fighters don't attack at all. They don't do any attack orders. You click them then right click a target and they get a move order to it and simply touch it.  They don't fly around and circle it or anything,  they just move up to it and stop, staying still in space.

Is there other stuff elsewhere I need to edit, or is this simply not possible?
2,634 views 2 replies
Reply #1 Top
I found if you give a ship a damage type where their percentbonus is '0', they just sit there and don't attack as well. This makes it seem that when you try to add a new type, the game does imilar behavior: it doesn't know what to do with it.

AI also seems to match the attack type with appropriate armor; antiheavy units attack heavy armor units, etc. This makes me think the types are hardcoded in the EXE, or at least the AI.

Also, chance to hit target type means that's the chance to hit of that type of attack; IE, ChanceToHitTargetType:FIGHTER means the fighter type attack's chance to hit those types of targets, so you probably don't want 0.1 for anti-bomber.

(Also, with chance to hit, the weapon effects still play regardless (there's no 'miss'), but the unit simply doesn't take damage.)

My suggestion would be to remove one of the more redundant damage types and use 'antiverylight' as the new fighter damage type, without renaming it.
Reply #2 Top
Oops i meant to have it 1.0 but it doesn't matter as it doesn't work..