Referring to object from its description

I have a new kind of container called the Mon Capsule in my project. The idea is that I want the description of a Capsule to list its contents, but I have no idea how to refer to it from its description. “A list of things contained” doesn’t work, nor “a list of things inside”. Can anyone enlighten me with the proper syntax?

Both of those work, you just need to add “item described” to refer to the actual thing itself:[code]Lab is a room.

The capsule is a container in the Lab. The description is “The capsule contains [a list of things inside the item described].”

A box is a kind of container. The description is usually “[The item described] contains [a list of things contained by the item described].”

A box called the mysterious box is in the capsule. A ball and a bat are in the mysterious box.

test me with “x capsule / x box / get bat / put it in capsule / x capsule”.[/code]As you see from the above, this works both for individual containers and for new kinds of containers (if you indeed need more than one). Also “[item described]” by itself will print the name of the object.

Okay, nice. Thanks for your help.

Another question: what’s the syntax for a rule that triggers when printing the description of a kind of thing? I’m trying to do this:

Before printing the description of a mon (called the victim): let the type index be the type corresponding to an index of the species of the victim in the Table of Mon Stats; say "[bold type][nickname][roman type] / [name corresponding to an index of the species of the victim in the Table of Mon Stats][line break]Level [level][paragraph break][name corresponding to an index of the type index in the Table of Mon Types]"; stop.

But it doesn’t quite work.

Without seeing your table, it’s hard for me to tell what you’re doing wrong. Are you actually using the table to define the objects (as described in ch 15.16 of the docs)? If so, then you don’t need that corresponding syntax anyway, you can just use “[species of the victim].”

Oops, I didn’t read that quite right. Do you want something to print in the room description of a mon or in the actual description of a mon (i.e. the thing that’s printed when a player types “examine”). If it’s the latter, there isn’t an activity which governs the behavior. You can, however, add a “to say” phrase for this if you like:[code]The description of a mon is usually “[mondesc of item described]”

To say mondesc of (m - a mon):
say “[The m] is [level of m] … etc.”.
[/code]… or you can piggy back on (or replace) the examining action which triggers the description. This will append info after the description:After examining a mon: say "It's a level [level of noun] mon."

I meant the latter, and yes, I am defining the tables correctly. I’ll be sure to use your method; thanks for your help!