Yeah, that could work. You'd just need to attach this script (untested) to the object:
Begin neil_enchant_scriptshort equippedif ( equipped == 1 ) if ( Player->HasItemEquipped "your_armour_id_here" == 0 ) Player->RemoveSpell "enchantment_ability" endifelseif ( Player->HasItemEquipped "your_armour_id_here" == 1 ) Player->AddSpell "enchantment_ability" set equipped to 1endifEnd
That code looks good, but I have yet to try it. I think there may be an issue with the ability though.
Let me explain what I'm doing, and that might help. I'm creating a mod for people who want to play nasty assassins. I want to provide variety in the place and manner of assassinations, and in this instance I am creating a costume party. The guests will be wearing masks, wigs, helms, or a combination of all three which, when combined with varieties of armor and clothing will make it difficult to tell which guest is the target. I intend for that to add a degree of difficulty to the quest.
I don't want the armors to be valuable in themselves, so I have given them a health of 5 (which provides an interesting strip tease effect during combat) and I want to add a cumulative burden effect. so, if there are 8 pieces of armor and each one adds a burden of 15 points. the cumulative burden should be 120. I guess I could write a ability spell for each type of armor (cuirass, bracer, greaves, etc. but that seems a bit clunky... I don't think abilities are cumulative if it's different instances of the same ability, are they?.