Object matching is the system by which, when you type something like "get book," you can end up with exactly the book that you intended to.
Generally, the matching system prioritizes like so:
- Items in your hands
- Other characters
- Items worn on your character
- Items in the room
- Items inside containers
In addition, object matching is a "first in, first out" system -- if you type "get book," you will retrieve the very first book that was placed in your vicinity, using the above priorities.
The matching system is robust, completely deterministic, and totally bug-free. However, it cannot read your mind. The matching system will grab the first item which matches what you typed -- no more and no less. This is always entirely predictable, and it's up to you to give the system enough to work with!
Here are some tips for getting the right object the first time:
- Type more letters! It's a regular occurrence that someone types "p a in t" and is shocked when a priceless heirloom is thereby placed into the trash. While the matching system deals fine with very short references, the fewer letters you type, the more often you will not match what you intended to. At least four letters is generally sufficient. More is better.
- Be specific when possible. If you know you're after a book which is in your backpack and not any of the books in your bag, type "get book from back" instead of leaving it to chance.
- Use descriptive aliases. If three trophies are before you and you know you're after the silver trophy, then just type "get silver trophy" instead of typing "get trophy" and hoping for success.
- Still not sure if you're going to grab the right item? Try using the LOOK command on it before you try to get it. The name of the object being matched will be the first thing shown to you. This is far less annoying to others than getting the wrong book out, putting it back, getting another wrong book out, putting it back, and so on.
- Use the VIEW command on containers and choose the category of item you're looking for. It will list them in order and even suggest aliases for each item.
- Because of the way the game's command system is structured, there can sometimes be difficulty matching names containing prepositions, like "in" or "for." If this happens, try an alternate alias.
There are modifiers you can add to the object name you're trying to match to make it far easier to get the right object the first time:
- other (or second), third, fourth, fifth, up to twentieth: Remember that "get book from bag" will match on the very first book ever placed into your bag. But what if you want the third book that was put in your bag? "get third book from bag" will grab the one you want.
- last: Do you know that the book you want is the last one you placed into your bag? "get last book from bag" will grab it.
- my: The "my" modifier matches only to things that you last held or otherwise appear to own. Has everybody got their workbenches out and you want to get yours? "get my workbench" will make sure you grab it.
There are also a few keywords you can use to refer directly to objects.
- me: Refers to yourself.
- it: Refers to the last object that you matched previously. For example, try 'get shirt from bag' followed by 'wear it'.
- him/her: Refers to the last player/NPC of that gender that you matched previously.
This matching system is consistent and universal for
look,
get,
put,
drop,
use,
read, all social commands, and nearly all other common commands.