I agree the units attack ranged units seems silly. I'm also excited that Stardock has fixed much of the AI tags and it allowed me to successfully test out this little change to the beguile spell. This should tell the spiders not to attack ranged units and still maintain the same AI tag of beguiling units with more than 10 HP. I wonder if this will fix the problem
https://dl.dropboxusercontent.com/u/75549875/Fallen%20Enchantress/AI%20Fixes/Beguile-AINoAttackRanged.zip
<AIData AIPersonality="AI_General">
<AIPriority>10</AIPriority>
<ValueCalcWrapper>
<ValueType>IsTargetWorthy</ValueType>
<Calculate InternalName="Calc" ValueOwner="TargetUnit">
<Expression><![CDATA[[Unit_GetHPCurrent]]]></Expression>
</Calculate>
<Calculate InternalName="Calc2" ValueOwner="TargetUnit">
<Expression><![CDATA[2 - [Unit_GetWeaponTacticalRange]]]></Expression>
</Calculate>
<Calculate InternalName="Calc3">
<Expression><![CDATA[[Calc]*[Calc2]]]></Expression>
</Calculate>
<Calculate InternalName="Value">
<Expression><![CDATA[[Calc3] > 10]]></Expression>
</Calculate>
</ValueCalcWrapper>
</AIData>
The bolded part is what I changed to get the functionality that I wanted. If the tactical range is 2 or more then the calculation of the current hitpoints will be negative thus the target is not worthy of beguiling. So far my tests have concluded that the spiders do not target ranged units.