You can restrict using of item via script, but you can not restrict equipping
That would work perfectly, I only need them not to be activated / fired by the X-Com soldier holding them.
Is there an already coded example of this script available that I can adapt?
I hate to contradict, but in a very limited manner, weapons can be attached to a single stat and their attacks can be made to require that stat, mana.
Mana would work however I've already set that stat aside for use with
costAimed,
costSnap and
costAuto so using the max amount of mana as a limiting factor isn't an option in this case.
I can see how this would be a good method though. Just setup your armor to regen all of the unit's mana at the start of every turn. Then make the weapon's action require certain amounts of mana that can only be provided if the unit's equipped armor or transformation increased the mana's max stat cap high enough to activate that equipment.
Alternatively another way of limiting certain weapons is you could take over the
"Melee Accuracy" stat and then cap the max really low, only raising that stat's value max via armor or transformation. Then slave the output of the equipment directly to that stat via the
damageBonus: variable.
So a soldier could equip it, use it... but without the right other equipment it just wouldn't do any damage.
Messy but theoretically it would also function, I think.
The two disadvantages I see to this method are:
. Actual melee weapons that rely on that stat would be effected limiting their use.
. If not used for melee equipment the relied on stat's name could be counterintuitive.