Regarding sets of items, will it be possible adding something like unitstat aka setarmourstat, where the value could be checked by the engine. If the total value equals 3 then you gain set armor bonus.
<itemtype>Armor</itemtype>
<itemname>Devil armor</itemname>
<setarmorstat> Devil</setarmorstat>
<setbonus>def = def + 4 </setbonus>
If the engine encounter setarmorstat, Devil, on the equipped unit 3 times, it could add the armor set bonus as specified. I believe the engine only needs to check this when equipping and unequipping and then it only needs to look for the <setarmorstat>.
The crafting system could incorporate set bonus, by having an enhancement spell providing predefined set bonus's. For example a spell could be +10 defence.The number of required items could also be hardcoded or set somewhere in the XML to 3.
disclamier: I have no idea if this works. Just a suggestion for a mod