So I wanted to tweak my sniper units so that they ignore vehicles as I have always thought it kind of pointless for them to even engage vehicles. However when I go into the weapons.xml file I see this function relies on the "ANTIMASK" variable and so far from what I can tell all ground units and infantry are all on one mask called "ANTI_GROUND".
I did notice that for airborne units there are separate masks, such as "ANTI_AIRBORNE_VEHICLE" and "ANTI_AIRBORNE_INFANTRY" however after trying this format on the ground units it is invalid, so far I have tried...
INFANTRY
ANTI_INFANTRY
ANTI_GROUND_INFANTRY
All appear to be invalid, and I don't know if its possible, and if it is where these ANTIMASK variables are defined.
If there is another way to do this I'm completely up for suggestions.
Targeting masks.
Started by Codiah, Sep 25 2011 04:17 AM
5 replies to this topic
#1
Posted 25 September 2011 - 04:17 AM
#2
Posted 26 September 2011 - 12:36 AM
You need to look in the schemas to find out what is valid.
Look in 'C:\Program Files\Electronic Arts\Command & Conquer 3\MOD SDK\Schemas\xsd' and find the 'AssetTypeWeaponTemplate.xsd' schema.
It is quite long, but at least you will have an idea what is possible.
Depending on what program you use, it might be possible for the program to find and load the Schema files for you. This would mean that the program will let you know if something is not valid according to the schema files. Some will even provide you with a list of allowed entries when you make certain new data.
Look in 'C:\Program Files\Electronic Arts\Command & Conquer 3\MOD SDK\Schemas\xsd' and find the 'AssetTypeWeaponTemplate.xsd' schema.
It is quite long, but at least you will have an idea what is possible.
Depending on what program you use, it might be possible for the program to find and load the Schema files for you. This would mean that the program will let you know if something is not valid according to the schema files. Some will even provide you with a list of allowed entries when you make certain new data.
--------------------------------------------------------------------------------------------------------------
Edited by Madin, 26 September 2011 - 12:37 AM.
#3
Posted 26 September 2011 - 08:07 AM
Wow.. so I found that section...
this is really limited, is it possible to edit these? or is the defines for this kind of set in stone?
<xs:simpleType name="WpnAntiT"> <xs:restriction base="xs:string"> <xs:enumeration value="ANTI_AIRBORNE_VEHICLE" /> <xs:enumeration value="ANTI_GROUND" /> <xs:enumeration value="ANTI_PROJECTILE" /> <xs:enumeration value="ANTI_SMALL_MISSILE" /> <xs:enumeration value="ANTI_MINE" /> <xs:enumeration value="ANTI_AIRBORNE_INFANTRY" /> <xs:enumeration value="ANTI_BALLISTIC_MISSILE" /> <xs:enumeration value="ANTI_PARACHUTE" /> <xs:enumeration value="ANTI_STRUCTURE" /> <xs:enumeration value="ANTI_AIRBORNE_MONSTER" /> </xs:restriction> </xs:simpleType>
this is really limited, is it possible to edit these? or is the defines for this kind of set in stone?
#4
Posted 26 September 2011 - 02:53 PM
In this case, this is really all you can use.
#5
Posted 29 September 2011 - 02:48 AM
the only way to do it is give the sniper a weapon with projectile, but only damage infantry. the normal sniper weapon will ignore its damage setting and attack vehicles.
#6
Posted 29 September 2011 - 04:48 AM
Actually, I found another way of doing this after quite a bit of tinkering. You have to add the special object filters in to keep them from attacking vehicles, this is already set for the sniper on one part, but you have to set it for the spotter as well or your sniper team will still open fire at vehicles. Here is the sniper and spotter weapons.xml section from my current project which seems to work rather well. You can still make them force attack a vehicle, but they will ignore them on their own... Hope this is helpful to anyone else who has been having this issue...
<WeaponTemplate id="GDISniperRifle" Name="GDISniperRifle" AttackRange="450.0" WeaponSpeed="999999.0" PreAttackType="PER_SHOT" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" ClipSize="2" FireSoundPerClip="GDI_Sniper_RifleFire" FireFX="FX_GDISniperFire" FireVeteranFX="FX_GDISniperFireHeroic"> <PreAttackDelay MinSeconds=".2s" MaxSeconds=".2s" /> <FiringDuration MinSeconds="2.00s" MaxSeconds="2.02s" /> <ClipReloadTime MinSeconds="0.1s" MaxSeconds="0.1s" /> <Nuggets> <DamageNugget Damage="500.0" Radius="0.0" DelayTimeSeconds="0s" DamageType="SNIPER" DamageFXType="GDI_RIFLE" DeathType="NORMAL"> <SpecialObjectFilter Rule="ALL" Exclude="STRUCTURE VEHICLE" /> </DamageNugget> <SuppressionNugget Radius="15.0" Suppression="250" DurationSeconds="10s"> <SpecialObjectFilter Rule="ALL" Exclude="STRUCTURE VEHICLE" /> </SuppressionNugget> </Nuggets> </WeaponTemplate> <WeaponTemplate id="GDISpotterRifle" Name="GDISpotterRifle" AttackRange="100.0" WeaponSpeed="999999.0" FireSoundPerClip="GDI_Spotter_MachineGunFire" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" ClipSize="3"> <FiringDuration MinSeconds="0.2s" MaxSeconds="0.2s" /> <ClipReloadTime MinSeconds="0.7s" MaxSeconds="0.7s" /> <Nuggets> <DamageNugget Damage="25.0" DelayTimeSeconds="0.0s" DamageType="GUN" DamageFXType="GDI_MACHINEGUN" DeathType="NORMAL" > <SpecialObjectFilter Rule="ALL" Exclude="STRUCTURE VEHICLE" /> </DamageNugget> <SuppressionNugget Radius="10.0" Suppression="25" DurationSeconds="5s" /> </Nuggets> </WeaponTemplate>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users