This is an old revision of the document!
Apparel in LibEcho is defined as anything that a Person can wear. This includes clothing, jewelry, and perhaps even naughty toys in some cases.
The Apparel system also provides the Wardrobe and WornApparel classes, which is a special subclasses of GeneralInventory that only deal with Apparel. Wardrobe is a lightly modified GeneralInventory that modifies the sorting implementation to make it more clothing-specific (although it can still contain any PersistentObject, non Apparel objects will all be lumped into the “Other” category). WornApparel is used by the Person classes to track what a Person is wearing, and provides the auto-removal functionality mentioned above.
In general, you may use a Wardrobe interchangeably with a GeneralInventory with the InventoryUI macro. For the wearing and removing of Apparel by a Person, however, a modified version (ApparelUI) is provided. The left-hand inventory provided to ApparelUI should always be a Person (not a WornApparel, but the higher-level Person object that is dressing/undressing). The right-hand inventory should always be a Wardrobe.
: Document how WornApparel and Wardrobe interact as far as items technically remaining in the Wardrobe while they are worn by a Person.
An article of Apparel may occupy one or more ClothingSlots. This prevents a character from wearing a dozen coats at the same time, for example. A shirt would occupy ClothingSlot.TORSO and a pair of pants would occupy ClothingSlot.LEGS. A dress would occupy both ClothingSlot.TORSO and ClothingSlot.LEGS. The ClothingSlots occupied by an article of clothing are baked into the GenericApparel subclasses, but you may derive your own subclasses to define new types of Apparel, or override the default ClothingSlots in your object defaults JS file.
When a Person wears a particular article of Apparel, any currently worn articles that occupy the same ClothingSlots are removed. This prevents the player from equipping, say, 10 pairs of underpants at the same time.
Certain ClothingSlots can cover other ClothingSlots, concealing them. This allows a Person to, for example, hide some racy underpants under their normal clothes, or a whole racy outfit under a long coat. The details of what covers what and how are below.
In general, you probably needn't ever worry about ClothingSlots. If you just define your specific articles of Apparel using the various Apparel subclasses, all of the ClothingSlot magic will be taken care of for you well, magically.
ClothingSlot is an enumeration that describes what “slots” an article of Apparel occupies on a Person when worn. Only one article of Apparel may occupy a particular ClothingSlot.
Boxers, briefs, panties, etc.
Bras and such; T-shirts should use TORSO.
Socks and hosiery.
Shirts and tops.
Pants, skirts, and bottoms; Socks and hosiery should use UNDERLEGS
Shoes. Socks and hosiery should use UNDERLEGS.
Coats and shawls.
Gloves.
Hats and helmets.
Earrings. Something like earmuffs probably should use HEAD.
Necklaces and ties.
Bracelets, watches.
Rings.
Apparel.GenericApparel provides the barebones base class from which all other Apparel types are derived. GenericApparel is generally unisex. GenericMenswear and GenericWomenswear derive from GenericApparel and provide barebones base classes for masculine and feminine apparel (currently mostly unimplemented).
Several specific apparel types are also provided, deriving from GenericApparel, GenericMenswear, and GenericWomenswear, which offer defaults for ClothingSlots, genericName, and other properties in some cases. These are the classes that you generally want to use in your defaults JS when you define objects.
Articles of Apparel may have various properties. Some specific apparel types implement some properties, as listed later on. All properties may be set in your defaults JS when you define objects. Even those provided by the specific apparel types may be overridden.
The “long” and/or “tall” properties interact with the ClothingSlots, providing additional concealment. For example, a turtleneck sweater might be “tall”, concealing the neck as well as anything worn beneath it on the torso. A “long” coat occupying ClothingSlot.OVER would conceal the legs as well as the torso.
The “low” property currently only applies to items occupying ClothingSlot.TORSO, and will reveal what is worn on ClothingSlot.UNDERSHIRT, unless that item is also “low”. A low-cut off-shoulder top revealing a tank top or bra worn beneath it, for example.
The “transparent” property will cause an article of Apparel to reveal whatever is worn beneath it regardless. A fishnet top or translucent wraparound, for example.
The “thin” property is used to denote tight-fitting articles of Apparel made with thin fabric. A tight-fitting t-shirt, for example. The articles of apparel worn below will “show an outline” through this article of Apparel, and will be listed with their genericName when looking at a Person, without showing the specific details of the item below. For example, wearing a “pink polka-dot bra” beneath a “tight red t-shirt” will list in descriptions as “a tight red t-shirt and a bra (printing through the tight red t-shirt),” rather than specifically as a “pink polka-dot bra”.
The generic name of an object, printed when it is obvious what the item is but no details can be seen. The most obvious example would be a bra printing through a tight tshirt being referred to as just a “bra” (its genericName) rather than a “lacy purple bra”.
The specific Apparel types all implement this property, but you may override it in defaults.
The specific name of the apparel, printed when the apparel can be plainly seen. “A green peacoat” or “a long floral print skirt,” for example.
An array of the ClothingSlots that the object occupies. Only one article of apparel my occupy a particular ClothingSlot at a time (see above). Setting this to an empty array will allow the article of apparel to be worn without occupying any ClothingSlots.
The category into which InventoryUI sorts the object. If this property is omitted, it will be sorted into the “Other” category.
The category into which ApparelUI sorts the object. If this property is omitted, it will be sorted into the “Other” category.
If this property is true, the article of apparel will be considered “long”. Knee length long skirts and pants. Trenchcoats. Etc. See the section on ClothingSlots for more details.
If this property is true, the article of apparel will be considered “short”. Crop tops. Booty shorts. Minidresses. Etc. See the section on ClothingSlots for more details.
If this property is true, the article of apparel will be considered “high”. Turtleneck shirts. High-top shoes and boots. Etc. See the section on ClothingSlots for more details.
If this property is true, the article of apparel will be considered “low”. Off-shoulder and swoop tops. Low-rise jeans. Etc. See the section on ClothingSlots for more details.
A couple of generic Apparel types are provided. GenericApparel provides a bare-bones Apparel implementation from which which all other Apparel types are derived. GenericMenswear and GenericWomenswear provide implementations which reference the potential wearer's femininity stat to determine whether or not they can be worn, and provide some default adjustments to that stat (currently unimplemented).
Unless you are actually extending the library, you probably don't need to use any of these GenericApparel classes. If you are just using the library in your game, you're probably better off using the specific Apparel classes.
However, if you need to create an article of Apparel that does not easily fit into any of the specific types, one of the generic types may be useful to you.
This is the generic Apparel type from which all other Apparel is derived. Objects that specify this type in their defaults must also explicitly provide a ClothingSlots field and all genericName properties.
This is a generic Apparel type that will at some point provide defaults that associate it with masculine People. Depending on the type of Transformations that are enabled, People with too much femininity might not be able to equip this type of Apparel, and/or equipping it may gradually cause the Person to transform towards being more masculine.
At the current time, however, none of this is implemented, as the Transformation mechanics are still being worked on.
As with GenericApparel, objects that specify this type in their defaults must also explicitly provide a ClothingSlots field and all genericName properties.
Inherits from: GenericApparel
This is a generic Apparel type that will at some point provide defaults that associate it with feminine People. Depending on the type of Transformations that are enabled, People with too much masculinity might not be able to equip this type of Apparel, and/or equipping it may gradually cause the Person to transform towards being more feminine.
At the current time, however, none of this is implemented, as the Transformation mechanics are still being worked on.
As with GenericApparel, objects that specify this type in their defaults must also explicitly provide a ClothingSlots field and all genericName properties.
Inherits from: GenericApparel
Several specific Apparel types are provided, which ought to cover most use-cases, simplifying the structure of the defaults files. Unisex apparel has no specific masculine or feminine bent; it can be worn by anyone. Menswear and Womenswear are gender-specific clothing types and may be restricted accordingly depending on game settings and/or transformation level. Currently, all Jewelry is considered unisex, but this needs to be fixed .
Unisex short coats, jackets, etc. need to implement LongCoat.
Unisex headgear.
Unisex long pants.
Unisex shirt.
Unisex low-top shoes.
Unisex high-top shoes and boots.
Unisex shorts.
Unisex socks.
Men's boxers.
Men's briefs.
Women's bra.
Women's short or mid-length dress (does not cover all the way down to feet).
Women's long dress (goes all the way down to feet).
Women's panties.
Women's long pants and slacks.
Women's shirts and blouses.
Women's low-top shoes.
Women's high-top shoes and boots.
Women's shorts, capris, stc.
Women's short or mid-length skirt (does not cover all the way down to feet).
Women's long skirt (goes all the way down to feet).
Women's stockings and hoisery.