Man identify

From LSWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 11:45, 11 June 2007 (edit)
Laine (Talk | contribs)

← Previous diff
Current revision (12:05, 11 June 2007) (edit)
Laine (Talk | contribs)
(See Also)
 
Line 86: Line 86:
==See Also== ==See Also==
-set_code(lfun), set_names(lfun), set_proper(lfun), set_long(lfun),+[[man set code|set_code(lfun)]], [[man set names|set_names(lfun)]], [[man set proper|set_proper(lfun)]], [[man set long|set_long(lfun)]],
-set_short(lfun), set_id(lfun), attack.types(build)+[[man set short|set_short(lfun)]], [[man set id|set_id(lfun)]], [[man attack types|attack.types(build)]]

Current revision

identify - description of the Ain Soph identification mechanism

Contents

Synopsis

Ain Soph uses a topic-oriented knowledge tracking system integrated with the core descriptive functions to provide the ability to vary the appearance of objects according to the viewer's knowledge of them.

Files

   /mod/basic/identity.c
   /mod/basic/description.c
   /mod/effect/chaos.c
   /std/incarnos.c
   /std/autonomon.c
   /lib/identify.h
   /lib/magic_items.h

Description

The Ain Soph identification allows the descriptions of objects to vary according to whether the viewer "knows" them. The central basis of this mechanism is the concept of "identification codes". This is a descriptive string which denotes a specific topic of knowledge.

Examples:

  • An individual character "Jack Sprat"
  • An artifact "Heavensfire"
  • A type of item "rings of fire warding"
  • A substance "melange"

These codes are associated with items through the function set_code(). This specifies the identification code which allows the viewer to see the item's "known version" descriptions.

These descriptions are specified through the standard descriptive functions, which generally are capable of taking two sets of arguments. The first is the value to use for people who do not have knowledge of the item's identification code, and the second is for those who do. Functions with this capability include set_names(), set_proper(), set_id(), set_short(), and set_long().


To determine whether a viewer has knowledge of the identification code, the function query_known() is called in the viewer, and is passed the identification code in question. It returns true for knowledge and false for ignorance.

In incarnoi, there are two levels of knowledge: familiarity and memorization. Both of these cause query_known() to return true for the code in question. See the help files for 'memorize' and 'forget'.

To cause an incarnos to become familiar with a code, call the function add_known() in the incarnos, passing as an argument either the code or an object associated with the code.

In addition, an adjutant mechanism allows a code to be defined in a fashion such that specified levels in one or more skills will cause a viewer to have knowledge of it. To use this mechanism, call:

   set_identify_skills(([
       Skill_One : level,
       Skill_Two : level,
   ]));

A further extension of this mechanism associates certain predefined skill levels in various magickal skills with the basic damage types. This is essentially for use with enchanted items that have a strong relationship to a damage type. To use this, do

   #include <magic_items.h>

and then, AFTER calling set_code(), do ONE of the following, ONCE:

   Setup_Identify("damage type");
   OR
   Setup_Multi_Identify("damage type", "skill", level);

The latter defines the specified skill-level relationship in addition to that associated with the damage type. Use of these mechanisms is mutually exclusive with use of those from identify.h; you may only do ONE setup from ONE set of capabilities. Also note that the skill level relationships defined by both mechanisms are associated with the item's IDENTIFICATION CODE, not the individual item itself.

See Also

set_code(lfun), set_names(lfun), set_proper(lfun), set_long(lfun), set_short(lfun), set_id(lfun), attack.types(build)

Personal tools