if equip.cloak or equip.tabbard or equip.armor or equip.shirt then
description += " {player.name} is wearing "
if equip.cloak then
description += " {equip.cloak.indirect_name}"
if equip.tabbard or equip.armor or equip.shirt then
description += " over"
end
end
if equip.tabbard then
description += " {equip.tabbard.indirect_name}"
if equip.armor then
description += " on top of {player.his_or_her} {equip.armor.possessive_name}"
end
else if equip.armor then
description += " {equip.armor.indirect_name}"
if equip.shirt then
description += " over {equip.shirt.indirect_name}"
end
else if equip.shirt then
description += equip.shirt.indirect_name
end
end
> look flumpy
Flumpy is wearing a long coat, an I love Fosters t-shirt, a pair of silver greaves,
a stained pair of brown trousers and a condom.
He is carrying a mad looking chicken.
> look flumpy's coat
Flumpy is wearing a long coat over a white shirt.
> look flumpy's greaves
Flumpy is wearing a tarnished pair of greaves over a nasty looking pair of stained trousers.
His bare feet stick out the end of his trouser legs, they seem far too small for him.
My basic idea was that a character's description could be made up of 4 sentences, as follows:
Sentence 1: Head and face equipment. Include skin, eyes and hair info if appropriate.
Sentence 2: Body, arms, forearms and hands equipment.
Sentence 3: Groin, legs, shins and feet equipment.
Sentence 4: General sentence based on non-equipment factors.
For example:
Sentence 1: A pair of light brown eyes gaze out through the slit in the closed visor of his full helm, which fully conceals the rest of his features.
Sentence 2: He is wearing a breastplate over his chainmail shirt, and a pair of battle bracers are strapped to his forearms.
Sentence 3: He is wearing a pair of trousers tucked into his boots, with greaves strapped over his shins.
Sentence 4: He is about six feet tall, and moves with cat-like grace.
These would then be formatted into a single paragraph.
The problem is that players can wear any combination of equipment, and you really don't want descriptions which say things like "He is wearing a breastplate. He is wearing a pair of trousers."
I tried to get around the issue by including naked and partially naked descriptions - so that for example, the above text would be displayed as "He is wearing a breastplate, leaving his arms bare. He is wearing a pair of trousers which come down to his bare feet."
However that still doesn't read so well, so then I tried combining sentences 2 and 3 in situations where both sentences were pretty short. Thus you'd have "He is wearing a breastplate, leaving his arms bare, and a pair of trousers which come down to his bare feet." I'm not entirely happy with that either, but I'm at a bit of a loss as to how I could improve it further.
Then start coming all the special cases, like trousers which can be tucked into boots (but not into shoes), skirts which can't be tucked in to anything, shifts which cover the body and groin (but leave the legs bare), dresses which cover the body, groin and legs, robes which also cover the arms, and so on. There are so many special cases that require sentences 2 and 3 to be merged that I'm wondering if they should just be generated as one chunk of text, even though it was originally easier to break them down into two parts.
I've not yet even started looking into things like belts, necklaces, wielded weapons and the like. The original plan was that they could be tacked on to the end of the description, or perhaps inserted at specific points. But I'm now worried that the descriptions could start becoming uncomfortably long.
Anyone have any (design) thoughts on this, or done something similar? There must be an easier way to break the description down into managable chunks.