ID:265119
 
Well, I'm still having trouble with my view swing algorithm for DitMUD (see [link]) so I'm moving on to its item identification system. So far, here's how it looks:

An item on the ground has a very bland name. For example, "Spear", "Blade", "Bow", "Club". When you pick it up, it checks to see if you can identify the item just by sight. If you can, it is identified. Otherwise, it will just show up as it did on the ground, though it will have the correct icon for the weapon it really is.

Any item bought from a vender is automatically identified and, when bought, is added to the items that the person can identify on sight. Let's say the person bought a LongSpear. They would have a fully identified LongSpear, though they may have never seen one before, and they can identify a longspear on sight. Now, let's say they had two other spears in their inventory. One of those happened to be a LongSpear also. So, when the LongSpear is bought, the other LongSpear is automatically identifed also. Now, the other spear must not be a LongSpear (it's a ShortSpear, but the player dosen't know that,) so when the two spears are measured in comparison (via tre Compare command) the result is that this other spear is shorter then the LongSpear, has a larger head, is rougher, and is certianly not a LongSpear. When and if a ShortSpear is bought, the ShortSpear in the inventory will be revealed to be a "Crude ShortSpear".

Another way for items to be identified is for the person to get them identified by another player who can identify the item by sight or by an NPC. NPC identifiers include tavern keepers who can identify an array of unspecialized items, as well as other basic equipment. A blacksmith on the other hand could identify more outlandish or uncommon weapons, if he makes or has seen them (he might pay players to share their knowledge of unknown weapons with him.) Then, there are wizard types and seer types of NPCs who can identify almost any item, regardless of what it is and where it came from. The highest level of identification, however, can come from the makers of the weapon itself. The most heavily enchanted weapon would only be able to be fully identified by its makers and enchanters, if no average NPC or wizard can tell what secrets the weapon holds. As soon as a weapon is fully identified, of course, the weapon is added to the weapons that can be identified on sight by the player.

One final way to identify items is to use them! When an unidentied weapon is used, it behaves just as if it were identified, though limited use spells and such that the weapon might be able to cast cannot be used. Over a period of time with use, and depending on the user's perceptiveness, the spear's special traits are revealed. This happens quicker if the maker has a fully identified weapon of the same sort that to compare the unidentified weapon to.

Once an item is fully identied, there is a process to be able to identify it on sight.
1) It must be in active use of the player for 2 game weeks
2) It must be improved by the player by at least 15% for regular items, 5% for magical items
This will identify a normal item, but for a weapon there is one more requirement:
3) It must be used once to fend off an attacking monster, and once to hunt for food.

-LoW