Objects and Inventories

This page will cover some of the more recondite topics dealing with objects and inventories. By now you should be able to access the help files. If you haven't already, check out help topics and peruse the files listed under the "inventories" category. Of particular use are the put|drop, take|get, give, i, wield, unwield, wear, and remove commands.

Ordinal references
Wielded references

Ordinal References

It is important to know that you can refer to objects ordinally. If you are carrying four swords, you can wield the first, second, third or fourth sword. Making no ordinal reference defaults to the first one. It is worth remembering that the first item in your inventory will be the one most recently added. Last in, first out, so to speak. So if you have four swords, and you type wield sword, then you will wield the one you most recently picked up.

The command syntaxes for dealing with objects are quite robust. You can pluralize objects, so that exa swords will examine all the swords. The first sword listed when you enter that command will be the first sword according to the command syntax. So if there are six dirty swords in a room and one clean one, and you can't figure out how to distinguish the clean sword from the dirty ones, just exa swords. This will give you the descriptions of every sword. If the clean sword is listed fourth, then you can pick it up by typing get fourth sword. Of course, if the clean sword is well-coded you could just type get clean sword, but it sometimes happens that the sensible solution does not work for one reason or another.

This order of inventories works for any command that affects objects. Problems do arise when you have some swords in your inventory and there are some swords in the room. Which one does exa second sword examine, the second sword in the room or the second sword in your inventory? If anybody knows for sure (i.e. has tested it thoroughly and can provide reliable and repeatable proof), let me know.

Note that this works on anything in a room, including characters. The first elf is the elf who entered most recently, and so forth.

To the top of this page


Wielded References

A little known but quite useful fact: a character can refer to the weapon he is wielding exclusive of all others, by adding the adjective wielded. So appraise wielded sword will appraise the sword the character is wielding. If the character is wielding two swords, then it will appraise the one which most recently entered his inventory (see Ordinal References above).

To the top of this page


To the menu page

Want to comment? Be my guest.

©1997 to Michael A. Laux.