I just finished my anti-theft triggers, much thanks to Nick and Lua, but looking over that script I had an idea:
In Lua, is it possible to make a script that changes your description depending on *all* the clothes you're wearing?
Say I have a mask, a cloak, and my undergarments. If I'm wearing both the cloak and the mask my description would be:
She is about six feet tall, and all defining features are hidden by her clothing.
If I remove the mask it would be:
She is about six feet tall, and *facial description here*
If I wear the mask but remove the cloak it would be:
She is about six feet tall, and *body description here*, but her face is completely hidden.
etc, etc, etc...
I have a feeling that the script I need for such a task is going to be much more complicated than I'll be able to understand, but so far Lua seems pretty simple.
Certainly a small script. :-)
Maybe some sort of tree arrangement (that is, a cloak might cover your arms, wrist, hand, shirt etc.). So based on what you are wearing you go down a list and turn on a "hidden" flag. Then display what is not hidden.
Alright, that sounds like it could work... time to get to work and make my very first script! If I finish it and it works I'll post it here.
Yeah... I never finished it. So far I know it will have the variables:
Head = description
arms = description
(etc)
then a list of clothing and what they cover, but I have no clue what to do with all the pieces. I'm a failure.
I designed a system for generating dynamic descriptions based on worn equipment last year, although I did it server-side, and even then I found it non-trivial. I discussed my approach (and got feedback from other developers) here: http://www.mudbytes.net/topic-1890
For example, this my character's description, in which my head and face are uncovered:
He is reasonably attractive, with pale white skin, glowing red eyes and long curly black hair which reaches his bare shoulders, held away from his face with a bandanna. Thin lines of dark runes cover his cheeks and naked upper body, tracing the muscles of his chest, coiling around his bare arms and twisting across his flat stomach. He has a pair of trousers tucked into his boots, with a black sash tied around his waist and greaves strapped over his shins. He is nearly six and a half feet tall, and seems quite agile on his feet. A pair of knives are strapped to his forearms.
But this is what I see when I look at someone who is covering their head and face:
A pair of light green eyes gaze out through the slit in the closed visor of his full helm, which fully conceals the rest of his features. He is wearing a breastplate over his chainmail shirt, and a pair of bracers are strapped to his forearms. He has a codpiece over his chainmail leggings, which are tucked into his boots, with a belt tied around his waist and greaves strapped over his shins. He is about six feet tall, and rides his greater warbeast with grace and balance. He is holding a dripping wet brass demonic battleaxe in both gauntleted hands. A pair of wands are strapped to his belt, while a crescent shield is slung across his back.
Doing this with a client script would require access to quite a lot of character and equipment data though...are you able to retrieve such information?
No, which is why I'd need variables. Every time I wear or take off an article of clothing, the variable for that article becomes 0. That means I'd need to set up a trigger identifying all clothing I own and/or might wear, as well as one that sends the new description every time I change clothes.