OK, so I loaded up the Bradford's Gun example and saw that instead of just saying default, it was
Template.RangeAccuracy = class'X2Item_DefaultWeapons'.default.SHORT_CONVENTIONAL_RANGE;
So I fixed that on all the properties of the pistol, and it built a solution successfully. But then when I ran it via Debug, it didn't show up in the list of mods I could select, and now some files seem to have disappeared from the project. Got an idea I'm going to try, but here's the code while I work on it:
static function X2DataTemplate CreateTemplate_PrimaryPistol_Conventional()
{
local X2WeaponTemplate Template;
`CREATE_X2TEMPLATE(class'X2WeaponTemplate', Template, 'PrimaryPistol_CV');
Template.WeaponPanelImage = "_Pistol"; // used by the UI. Probably determines iconview of the weapon.
Template.ItemCat = 'weapon';
Template.WeaponCat = 'pistol';
Template.WeaponTech = 'conventional';
Template.strImage = "img:///UILibrary_Common.ConvSecondaryWeapons.ConvPistol";
Template.EquipSound = "Secondary_Weapon_Equip_Conventional";
Template.Tier = 0;
Template.RangeAccuracy = class'X2Item_DefaultWeapons'.default.SHORT_CONVENTIONAL_RANGE;
Template.BaseDamage = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_BASEDAMAGE;
Template.Aim = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_AIM;
Template.CritChance = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_CRITCHANCE;
Template.iClipSize = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_ICLIPSIZE;
Template.iSoundRange = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_ISOUNDRANGE;
Template.iEnvironmentDamage = class'X2Item_DefaultWeapons'.default.PISTOL_CONVENTIONAL_IENVIRONMENTDAMAGE;
Template.NumUpgradeSlots = 1;
Template.InfiniteAmmo = true;
Template.OverwatchActionPoint = class'X2CharacterTemplateManager'.default.PistolOverwatchReserveActionPoint;
Template.InventorySlot = eInvSlot_PrimaryWeapon;
Template.Abilities.AddItem('PistolOverwatch');
Template.Abilities.AddItem('PistolOverwatchShot');
Template.Abilities.AddItem('PistolReturnFire');
Template.Abilities.AddItem('HotLoadAmmo');
Template.Abilities.AddItem('Reload');
Template.SetAnimationNameForAbility('FanFire', 'FF_FireMultiShotConvA');
// This all the resources; sounds, animations, models, physics, the works.
Template.GameArchetype = "WP_Pistol_CV.WP_Pistol_CV";
Template.iPhysicsImpulse = 5;
Template.UpgradeItem = 'Pistol_MG';
Template.StartingItem = true;
Template.CanBeBuilt = false;
Template.DamageTypeTemplateName = 'Projectile_Conventional';
Template.bHideClipSizeStat = true;
return Template;
}