Let us say you are trying to compare a hat to a helm (for simplicity of explaining). If you have the hat in your inventory and you're wearing the helm you simply have to type out compare hat. It will automatically compare it to the head piece you are currently wearing.
If you would like to compare a hat in your inventory to a helm in your inventory, you'll need to type compare hat helm. It will then compare the hat to the helm. (Note: if you have two items that have the same target name, you can compare hat 2.hat).
From
Help Compare:
Quote:
[Objects help] compare
Syntax: compare <object>
compare <object a> <object b>
Compare used with a single argument compares the object, which must be in
your inventory to the object of similar type currently being worn or wielded.
Compare used with two arguments compares the two objects, both of which must
be in your inventory.
Only armor and weapons can be compared. If the objects are armor, this will
report the one that provides the better protection. If the objects being
compared are weapons, compare will report three different aspects - the
weapon with the best accuracy, the best damage and the best speed. It
does not take into account any special modifiers on either object.
See also: weapons armor2
Compare only shows you if certain armor has better protection or certain values of a weapon. It will not take into consider enchantments. For this, you'll have to find a friendly magic user who can cast
identify.
Remember that your class will determine what type of armor you can wear. But material doesn't matter with shield, weapon, jewelry or about the body pieces. See
Help armor2.