Okay, I'm working on implementing the Melee Weapon Mastery, Ranged Weapon Mastery, and Weapon Supremacy feats from Player's Handbook II. Naturally, I have questions. 
1) For both Melee & Ranged Weapon Mastery, you're supposed to specialize in bludgeoning, piercing, or slashing weapons. So, is there a way to let the user pick one of those categories when the pick the feat? I don't see how, but the workaround is obvious -- make separate versions of the feats for each category. But it would be tidier to have one & pick from a dropdown -- so is it possible?
2) How can I detect if a particular weapon is Bludgeoning, Piercing, or Slashing? You get +2 attack & damage with all weapons of the appropriate type, so I need to put in a foreach loop to add the damage & attack bonuses to weapons of the right type.
3) Speaking of that -- how do you add damage & attack bonus to weapons? I tried looking at the (Greater) Weapon Focus/Specialization feats, but I couldn't figure it out. They seem to use some sort of tags, somehow, and I don't know how to mimic that (especially since the bonuses from Weapon Mastery stack with all the Focus & Specialization feats).
4) The Weapon Mastery feats, along with a few other feats, require Weapon Focus/Specialization with a specific type of weapon -- is it possible to check for this (e.g, Weapon Focus with a reach weapon, Weapon Focus with a slashing weapon, etc.)?
5) Which leads to a bonus question, not entirely related to the feats in question: Can you detect/check if a weapon has reach? Weapons are tagged as reach, so how do you check for that tag?

1) For both Melee & Ranged Weapon Mastery, you're supposed to specialize in bludgeoning, piercing, or slashing weapons. So, is there a way to let the user pick one of those categories when the pick the feat? I don't see how, but the workaround is obvious -- make separate versions of the feats for each category. But it would be tidier to have one & pick from a dropdown -- so is it possible?
2) How can I detect if a particular weapon is Bludgeoning, Piercing, or Slashing? You get +2 attack & damage with all weapons of the appropriate type, so I need to put in a foreach loop to add the damage & attack bonuses to weapons of the right type.
3) Speaking of that -- how do you add damage & attack bonus to weapons? I tried looking at the (Greater) Weapon Focus/Specialization feats, but I couldn't figure it out. They seem to use some sort of tags, somehow, and I don't know how to mimic that (especially since the bonuses from Weapon Mastery stack with all the Focus & Specialization feats).
4) The Weapon Mastery feats, along with a few other feats, require Weapon Focus/Specialization with a specific type of weapon -- is it possible to check for this (e.g, Weapon Focus with a reach weapon, Weapon Focus with a slashing weapon, etc.)?
5) Which leads to a bonus question, not entirely related to the feats in question: Can you detect/check if a weapon has reach? Weapons are tagged as reach, so how do you check for that tag?