CONCEPT
	attributes

UPDATE
	Mateese, 07-Jun-94 - 20:30 MET

DESCRIPTION
	Attributes are a special kind of properties.
	Normal properties aren't saved if an save_object() is issued,
	attributes are. Furthermore, it is possible to query and set
	all attributes at once, even the builtin ones (normal
	properties can't do this).
	Attributes are normally used for livings to store sensitive
	data (like stats), but can be used otherwise as well.

	On code level, attributes are a extension of the properties.
	All official attributes are listed in /sys/attributes.h, with
	symbolic names starting with 'A_' instead of the properties'
	'P_'.
	As properties, attributes can be "built in" as well as simply
	stored. The naming for the functions of "built in" attributes
	is the same as for "built in" properties, so an overlap
	between the both worlds exists.

	These additional functions used for attributes are:

	  mixed SetAttr (string attribute_name, mixed arg, void|int sc)
	    Sets or changes the attribute <attribute_name> to
	    <value>. Returns the actually set attribute value
	    If it is a standard attribute as defined in
	    <attributess.h>, you should use the A_<NAME> notation
	    instead of the attribute name string.
	    If <sc> is true, the function doesn't look for a
	    Set<Name>(), but instead treats it as true soft attribute.


	  mixed QueryAttr (string attribute_name, void|int sc)
	    Returns the value of attribute <attribute_name>.
	    If <sc> is true, the function doesn't look for a
	    Query<Name>(), but instead treats it as true soft
	    attribute.
	

	  mapping QueryAttrs()
	    Returns a mapping containing all attributes of the object,
	    "built in" as well as soft ones.
	    This function is very costly.


	  mapping SetAttrs (mapping attributes)
	    The function sets the attributes of the object to the
	    values in the given <attributes> mapping. Builtin and soft
	    attributes are properly handled.
	    Result is a mapping with the values actually set.

	To change attributes in a way modeling natural learning, this
	function can be used:

	  int LearnAttr (string name, int max_value, int decr, void|int sc)
	    The value of attribute <name> (if <sc> is nonzero: the
	    value of the soft attribute) is changed in a way that it
	    approaches <max_value>. The change is derived from <decr>
	    which denotes the decrease in approach.
	    Result is the new attribute value, which is set by the
	    function as well.

	  int ApproxValue (int steps, int value, int max_value, int decr)
	    This auxiliary function estimates the effective value for
	    <value> after <steps> iteration steps using the formula of
	    LearnAttr(). <max_value> and <decr> go into the formula.
	    Result is the estimated value.

IMPORTANT
	Refer to properties(C).

SEE ALSO
	properties(C), living(S)
