The cannon is a modified version of the Predator´s cannon, the MG was based on the APC´s gun.
I already tried adding "DamageObjectFilter"-tags to both weapons, but that only resulted in the tank still using the wrong weapon and doing no damage at all.
I also tried using a "DamageScalarDetails" setting the damage against the unwanted targets to 0% and giving the tank a WeaponChoiceCriteria="PREFER_MOST_DAMAGE" entry on the WeaponSlotTurret - same as above.
Also tried the WeaponChoiceCriteria="USE_WEAPONSET_DEFAULT_CRITERIA" - however, there seems to be no way to actually define those criteria.
Any help would be appreciated.
WeaponSet and weapon code:
<WeaponSetUpdate
id="ModuleTag_WeaponSetUpdate">
<WeaponSlotTurret
ID="1"
<Weapon
Ordering="PRIMARY_WEAPON"
Template="GDIMilShepherdCannon"/>
<Weapon
Ordering="SECONDARY_WEAPON"
Template="GDIMilShepherdGun">
<TurretSettings
TurretTurnRate="60"
TurretPitchRate="20"
AllowsPitch="true"
MinimumPitch="-15d"
MinIdleScanTime="1.0s"
MaxIdleScanTime="5.0s"
MinIdleScanAngle="0.0"
MaxIdleScanAngle="90.0">
<TurretAITargetChooserData
CanAcquireDynamicIfAssignedOutOfRange="true" />
</TurretSettings>
</WeaponSlotTurret>
</WeaponSetUpdate>
[s]-------------------------------------------------------------------------------------------------[/s]
<WeaponTemplate
id="GDIMilShepherdCannon"
Name="GDIMilShepherdCannon"
AttackRange="300.0"
MinTargetPitch="-15d"
MaxTargetPitch="15d"
WeaponSpeed="600"
AcceptableAimDelta="2d"
WeaponRecoil="5d"
RadiusDamageAffects="ALLIES ENEMIES NEUTRALS"
ShotsPerBarrel="1"
ClipSize="1"
ReAcquireDetailType="POST_FIRE"
ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"
FireFX="FX_PredTankGun"
FireVeteranFX="FX_PredTankGunHeroic"
CanFireWhileMoving="true" >
<FiringDuration
MinSeconds="0.3s"
MaxSeconds="0.3s" />
<ClipReloadTime
MinSeconds="3.0s"
MaxSeconds="3.0s" />
<Nuggets>
<ProjectileNugget
WarheadTemplate="GDIMilShepherdCannonWarhead"
ProjectileTemplate="FXTankShell02">
<VeterancyProjectiles
VeterancyLevel="HEROIC"
ProjectileTemplate="FXTankShell02_Veteran"/>
</ProjectileNugget>
</Nuggets>
<ScatterRadiusVsType
Radius="10.0">
<Filter
Rule="NONE"
Include="INFANTRY" />
</ScatterRadiusVsType>
</WeaponTemplate>
<WeaponTemplate
id="GDIMilShepherdCannonWarhead"
Name="GDIMilShepherdCannonWarhead"
ProjectileCollidesWith = "ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"
RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" >
<Nuggets>
<DamageNugget
Damage="2100.0"
DelayTimeSeconds="0.0s"
DamageType="CANNON"
DamageFXType="GDI_CANNON"
DeathType="NORMAL" >
<DamageObjectFilter
Rule="ALL"
Exclude="INFANTRY"/>
</DamageNugget>
<SuppressionNugget
Radius="25.0"
Suppression="25"
DurationSeconds="5s" />
</Nuggets>
</WeaponTemplate>
<WeaponTemplate
id="GDIMilShepherdGun"
Name="GDIMilShepherdGun"
FireSoundPerClip="GDI_GuardianAPC_MachineGunFire"
FireFX="FX_GDIRifleManFire"
FireVeteranFX="FX_GDIRifleManFireHeroic"
AttackRange="200.0"
WeaponSpeed="999999.0"
RadiusDamageAffects="ALLIES ENEMIES NEUTRALS"
AntiMask="ANTI_GROUND"
CanFireWhileMoving="true"
ClipSize="3"
ReAcquireDetailType="PER_CLIP">
<FiringDuration
MinSeconds="0.1s"
MaxSeconds="0.1s" />
<ClipReloadTime
MinSeconds="1.0s"
MaxSeconds="1.0s"/>
<Nuggets>
<DamageNugget
Damage="300.0"
Radius="0.0"
DelayTimeSeconds="0.0s"
DamageType="GUN"
DamageFXType="GDI_MACHINEGUN"
DeathType="NORMAL">
<DamageObjectFilter
Rule="NONE"
Include="INFANTRY"/>
</DamageNugget >
<SuppressionNugget
Radius="15.0"
Suppression="25"
DurationSeconds="2s" />
</Nuggets>
</WeaponTemplate>
</AssetDeclaration>
Edited by Golan, 26 September 2007 - 16:29.