TakeOffPutOn plugin (needs Tribunal)
by Cal
updated 13-01-2011: only takes off what armour the NPC is wearing; more nudists
clothed.


When sold clothes or armour, merchants, traders, smiths and clothiers may don them. 
So, suddenly, the normally elegantly dressed Arrille is wearing a robe and a Dark 
Brotherhood helmet. I've tried having him take them off using "strip off" plugins,
but that didn't work. In one of those plugins, I did find a handy undressing trick
that comes from the plugin "Vampire's Embrace": have the NPC equip "no_armour" and
then immediately delete "no_armour" from the NPC's inventory. This leaves the NPC
without armour on whatever body part the "no_armour" was assigned to.

I adopted this trick to be able to ask the NPCs of trading classes to remove an
item of clothing, a part of armour, all clothing, all armour, or everything the
NPC is wearing. This only works under Tribunal or higher, because it was only from
Tribunal onwards that the command to make a NPC equip something, actually worked.
The subject "--Could you take off.." is added by a startup script, and startup 
scripts were also first implemented with Tribunal.

To avoid having to barter with naked NPCs, I also added "--Could you put on...",
although I found that if I sold Arrille so much as a piece of paper, he would 
instantly don all items befitting his armour class, including whatever armour
I had just stripped him of. Likewise if I use the topic to ask him to wear a 
pair of shoes: if he has boots that would suit him better, he will end up
wearing the boots instead. The only way to stop him putting unwanted items 
back on is to steal or buy them from him (and sell them to Creeper, who can't
wear anything).

In imitation of the "Got the Time" plugin, either topic starts with a double 
dash.

The plugin normally only works with NPCs that can be bartered with. If you get
the Masque of Clavicus Vile (which makes its wearer seem charming and 
trustworthy) you can ask the same of any NPC with a disposition of 100. It 
can be handy to put some armour on slaves following you (although you need
to "pickpocket" it into their inventory first) or to restore their slave bracers,
wich are pushed off by any regular bracers, gauntlets or gloves.

There are two problems with this dressing/undressing plugin: first, the
fact that you can't make the NPC equip anything without affecting the general 
state of dress. You can however make the NPC wear something he/she would not
automatically wear, like (if there is nothing else in the inventory that might
get in the way) a slave bracer.

Secondly, the fact that you can't selectively take off a piece of armour sharing
a body part with clothing. Removing boots also removes shoes, a problem if the
aim was to make Arrille take off those glass boots and put his shoes back on.
The plugin tries to make sure slave bracers are not removed unless replaced with
gloves, gauntlets or bracers.

So it's not a perfect solution. Still, at least it can be used on any NPC, and 
no NPC needs to have any stats altered.

In addition, the startup script slaps some greaves on both Bulfim (Caldera
Mansion) and Yakov (Suran Slave Market) who are both partly naked when using
Better Bodies without underwear, and makes Tul equip his slave bracers rather
than just carrying them around. It also adds some moon sugar to Helviane's 
inventory. I haven't touched Helviane or her girls, I'm sure it would cause
disappointment if I added clothes to them. :)




