OOC:Amy and Sparta's Modified Player Parent
OOC |
This article is strictly OOC. Referencing anything in this article in-character |
Amy and Sparta's Modified Player Parent (object #1976 in the database) is a Jusenkyo-compatible multidescer (roughly multiple-description organization and auto-application tool, although if you don't intuitively understand the term multidescer, that probably didn't help).
It's also very old, and only cursorily maintained. If you want to use it anyway, type
@decompile me/describe @describe me @parent me=#1976
(The first line will print out your current description so you can save it off for future reference; the second will clear it.)
Contents |
Clothing System
One of the primary parts of the multidescer is the clothing system. Each outfit has an associated attribute &NAME_clothing
— for example:
&NAME_JEANS Sparta=a sweater and blue jeans &NAME_ROBE Sparta=a loose blue robe
With these attributes set, Sparta can change her outfit by typing change jeans or change robe, and an appropriate message will be generated, such as:
Sparta slips out of her clothes and puts on a loose blue robe.
An internal variable, &clothing
, will also be set as appropriate, to jeans
or robe
. Two possibilities are treated specially: if the attributes &NAME_NUDE
or &NAME_UNDERWEAR
are present, the messages produced by change nude and change underwear are different.
However, although this gives one the ability to easily manage a wardrobe, it does not automatically change one's description. This brings us to...
Variable descriptions
There are two ways to multidesc: using u(clothes)
, and using &MODULAR_LIST
.
To use u(clothes)
, simply insert the string [u(clothes)]
into your &NORMAL_DESC
and &curse_DESC
attributes. It will be replaced with a description of your clothing, which it will look for in an attribute named &CLOTHING_clothing
. This is useful if your descriptions will differ primarily in the clothes you're currently wearing: e.g., a paragraph about being a
voluptuous green-eyed rust-winged demoness (or whatever) followed by a description of the tight-fitting dress in a pattern of red and orange swirls (or whatever) you've currently got on.
TODO: insert example here
The slightly more complicated way is the attribute &MODULAR_LIST
. This extends the Jusenkyo &DESC_NORMAL
(et al.) system by adding additional variables.
OOC: Former? |
Well, yeah. It does get kind of unwieldy eventually. It's not so bad if you only have different outfits or only expect to have two forms. Sparta herself used it for a while; but as time went on and she got more descriptions, she went over to something involving more custom code crafted around her @descs.
That said, she still (as of 2009) uses it for the built-in commands -- unless you're doing something really left-fieldian, you still need to keep track of some number of state variables to use to make decisions about what to print, and wardrobe and dstate work reasonably well for that. ... also I was too lazy to write a proper sidebar so I swiped OOCBox. Sorry. |
For instance, Sparta's (former) &MODULAR_LIST
:
&MODULAR_LIST Sparta=clothing glasses_state
where &glasses_state
is either one of the text strings glasses
or noglasses
. Then Sparta (who has a custom curse, BUTTERFLYGIRL
) has the following &desc_*
attributes:
&DESC_BUTTERFLYGIRL_JEANS_GLASSES &DESC_BUTTERFLYGIRL_JEANS_NOGLASSES &DESC_BUTTERFLYGIRL_ROBE_GLASSES &DESC_BUTTERFLYGIRL_ROBE_NOGLASSES &DESC_NORMAL_JEANS_GLASSES &DESC_NORMAL_JEANS_NOGLASSES &DESC_NORMAL_ROBE_GLASSES &DESC_NORMAL_ROBE_NOGLASSES
This is important, as Sparta's description changes in many different and complicated ways: for example, she has compound eyes as a butterfly-girl, but ordinary blue eyes as a human, which are covered by her glasses in either case. Ordinarily, one would have to use nested embedded switch()
es, which are a pain to read, write, and update; this way, instead of writing code, she can simply copy old descriptions and change them to suit.
Attribute trees
If you set the special attribute &_quotemode
, you can use &NAME`clothing
and &DESC`clothing
instead of &NAME_clothing
and &DESC`clothing
— thus, e.g., &DESC`BUTTERFLYGIRL_JEANS_GLASSES
.
Omake
Some possibly-helpful commands included on #1976, and therefore accessible to its users, include:
- whatsin object
- Produces a nicely-formatted table of everything in the given object. Useful mostly for getting the dbrefs of objects you don't happen to own.
- getall
- Attempts to get all non-player objects in the room.
- dropall
- Drops everything in your inventory.
- @fe
- Rearranges the exits in your vicinity to the standard order, if they're compass directions.
- wardrobe
- Lists off the outfits you have. The one you're wearing is highlighted.
- dstate
- Lists your description variables (from
&MODULAR_LIST
) and their current contents.
- Lists your description variables (from