While looking at this you have two different ideas to consider. A direct ranged weapon bow, sling, and staff. Or a accessory that gives an additional range attack to a normal melee unit. So it depends on your intent for each weapon. Now for the items such as the knives, axes, and javelins it makes sense to have them as accessories that can have independent stats compared to held weapons that are used for direct combat.
Also I was correct when I looked back at the stats it becomes a combat ability only because it is listed as such when you reference the spell like:
<Attribute>UnlockCombatAbility</Attribute>
You just need to change how it is referenced when the spell is accessed through the weapon like:
<Attribute>UnlockRangedAction</Attribute>
After that each spell then needs the flag
<IsSpecialAbility>1</IsSpecialAbility>
changed to
<IsRangedAttack>1</IsRangedAttack>
otherwise it will be ignored by dodge against ranged stat.
Hopefully this helps.
Oh yeah when the spells you created are used you don't need to add the calculated data unless its used as an accessory then you do.
Cheers.