I made an initial stab at a weapon/armor mod back in FE and I will pass on some stuff I learned from doing it here.
Cool then, let's see what you learned .
1) As stated above the AI has a real problem with ranged weapons with limited ranges so you have to be creative. You have to make the initial weapon be a melee weapon using a custom damage type like “bow”. If making a custom damage type does not make sense that can be covered as well in a later post. After you make the initial melee weapon you give it a ranged special attack that uses the base damage so that any boosts to the base damage will apply to the special ability. Make sure to set the special ranged ability to be able to be used each round. The AI will use ranged special abilities with no problems, see the throwing knives and the throwing axes and spear mod. This solves the problem of the AI not using ranged weapons with a range limitation. They will simply advance to to the max range and stay at max range while they can.
An example (with code) would be nice, once i have this i can easily duplicate for all the weapons that may need it.
2) This depends in what you are trying to do here. If you are trying to make only a weapon/armor type buildable at a certain city for trainable units you have to make a custom resource that is produced by that building that is a non global resource. Make it not storable and give it a large amount so that you can build units at this location.
Hum, sound complicated to do. May not be worth the effort.
If you want make it so the shop sells these items for sov/champion use you need to add within the coreimprovements.xml file the shop unlock tag including the name/s of the item/s you wish to unlock. See the city hubs or alchemy buildings for an example of how this works.
That should open a lot of possibilities.
3) You can add more classes of weapons depending on what you mean by classes. This will need some more clarification before I can go over that.
I mean the class of weapons like when we design new units; clubs, spears, blades... What weapon is related to the others and what is an upgrade of the rest. FH has lots of weapons, but most aren't accessible to units; if i split them into several more classes i could add them without having some being obsolete by the time you get them.
4) You can set range to melee weapons to two and they can reach two squares.
Another example would be nice there.
I hope this helps. I found out most of this through trial and error and asking for help here on this forum and I am just paying it forward after Heavenfall and Parrotmath helped me understand this much. There were many others that offered help but those two are the ones that stick out the most.
Thanks, it's appreciated.