1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] MUD mentation system -->
<!--X-From-R13: "[nggurj D. Eurnuna" <punbfNpelfgny.cnynpr.arg> -->
<!--X-Date: Sun, 10 May 1998 07:11:05 &#45;0700 -->
<!--X-Message-Id: 199805101409.KAA12623#crystal,palace.net -->
<!--X-Content-Type: text -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] MUD mentation system</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:chaos#crystal,palace.net">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00486.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00488.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00723.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00486.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00487">Author</A>
&nbsp;|&nbsp;<A HREF="#00487">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00487">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] MUD mentation system</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] MUD mentation system</LI>
<LI><em>From</em>: "Matthew R. Sheahan" &lt;<A HREF="mailto:chaos#crystal,palace.net">chaos#crystal,palace.net</A>&gt;</LI>
<LI><em>Date</em>: Sun, 10 May 1998 10:09:16 -0400 (EDT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: "Petidomo List Agent -- Kanga.Nu version" &lt;<A HREF="mailto:petidomo#kanga,nu">petidomo#kanga,nu</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
recently, due to various factors, many related to the pressures exerted
by porting an add_action() using Amylaar mudlib to a pure centralized
command system under MudOS, it came to be that i and several other coders
developed a system for tracking character thought in an in-character
fashion, primarily for the purpose of actuating game processes like item
use on the basis of thought.

the more we developed this system, the more enthusiatic we became about
it, and we wound up porting it from the MudOS development site back onto
the production Amylaar site.  as far as any of us have been able to
discern from our knowledge of what other people have done, the approach is
a genuine innovation, and so i thought it my duty to share it with the
mud-dev list.  enclosed is our man page explaining the overall mentation
mechanism.  if there are any points which people would like to have
clarified, please let me know.

								chiaroscuro

mentation - description of the Ain Soph mentation mechanism

SYNOPSIS
    Ain Soph enables the handling of game functionality actuated by
    in-character mental processes; e.g. a helm which projects flames when
    you think a command word, a gem that heals you when you visualize a
    cadeceus.

FILES
    /std/module/character/mind.c
    /lib/thought.h
    /daemon/command/character/believe.c
    /daemon/command/character/concentrate.c
    /daemon/command/character/disbelieve.c
    /daemon/command/character/imagine.c
    /daemon/command/character/subvocalize.c
    /daemon/command/character/think.c
    /daemon/command/character/visualize.c
    /daemon/command/character/will.c

DESCRIPTION
    The mentation mechanism enables wizards to implement character abilities
    which are actuated by thought processes.  Many items and organizations add
    various capabilities to players by using add_action() to create arbitrary
    command structures.  Many of these capabilities are better handled through
    speech or thought actuation; this system covers the latter.

    Thought-actuated events, or simply "thoughts", are created using the
    function add_thought(), which exists in all living objects.  Its syntax
    is as follows:

    mapping add_thought(mixed tag, string arg, int flags, int activity,
	closure fcan, closure fdo);

    'tag' is a string or array of strings which the thought 'keys' on, or 0
    to key on any string.  For example, if you wanted your thought to activate
    when someone thought of trees, you might send a value of "trees" for 'tag'.
    If you wanted it to activate when they thought of either trees or bushes,
    you could send ({ "trees", "bushes" }).  It's recommended that both
    specific and less specific tags be provided; e.g. you could have a power
    key on both "visualize a triangle" and "visualize a point-up silver
    triangle", possibly triggering somewhat different versions of the power.
    This allows the possibility of ambiguity with other powers which also
    involve the visualization of triangles, but also lets characters who wish
    to be careful in their use of thought-actuated powers avoid trouble.

    'arg' can be used for thoughts which take arguments, e.g. if you wanted
    people to be able to do "concentrate on harming &lt;target&gt;".  In that case
    you would pass "%s" as 'arg', meaning a string argument following the tag
    value.  You can also use "%d", meaning an integer argument following the
    tag value.

    'flags' indicates the types of mentation which the thought will key on.
    These are defined by the macros in /lib/thought.h, and are:

	TF_Believe		thought confirming the reality of a thing or
				idea
	TF_Concentrate		concentration on an concept
	TF_Disbelieve		thought denying the reality of a thing or idea
	TF_Imagine		thought about a sensory impression, real or
				constructed
	TF_Subvocalize		mind-internal verbalization, "thinking words"
	TF_Think		thinking about a concept, like concentrate but
				less intensive
	TF_Visualize		thought about a visual sensory impression,
				real or constructed
	TF_Will			thought oriented toward a desired effect

    You can send one of these flags as your 'flags' value to key only on that
    type, send several joined by bitwise ORs (e.g. TF_Think|TF_Will), or use
    the macro TF_Any to key on any mentation type.  Note that the mentation
    types have different default activity costs ('concentrate' takes more time
    thank 'think', for example) and different conditional requirements (you
    cannot 'concentrate' while berserk).

    'activity' is the activity cost of actuating this thought.  Only the
    highest activity cost from all thoughts triggered at once is used.  If no
    triggered thoughts specify an activity cost, the activity cost will be the
    default value for the type of mentation used (in general, 2 for think,
    subvocalize and will, 15 for the rest).

    'fcan' is the function checked for whether the thought can be actuated.
    It is passed the following arguments:

	object who		The person performing the mentation.
	mixed val		The value obtained for the thought's arguments,
				if any.
	string what		The string value given by the player to the
				mentation command; e.g. for both "think about
				beer" and "visualize beer", this value will be
				"beer".
	int total		The total number of thoughts which are having
				their 'fcan' functions checked for this
				mentation event, including this one.
	int type		The appropriate thought.h macro for the type
				of mentation actually being performed.

    The return value from the 'fcan' closure may be:

	1			Success; allow the thought to be actuated.
	0			Failure; do not actuate this thought.
	a string		Failure; do not actuate this thought.  The
				string returned will be shown to the person
				performing the mentation, as an error message.
	an array		Success; allow the thought to be actuated.
				Pass the array given to the 'fdo' function.
	a mapping		Success; allow the thought to be actuated.
				Pass the mapping given to the 'fdo' function.

    'fdo' is the function called when the thought has been successfully
    cleared for actuation; all actual game effects should be contained in
    this function, while status checks and so forth should be contained in the
    'fcan' function.  It is passed the following arguments:

	object who		The person performing the mentation.
	mixed val		The value obtained for the thought's arguments,
				if any.
	mixed inf		If 'fcan' returned an array or mapping value,
				this is it.
	string what		The string value given by the player to the
				mentation command; e.g. for both "think about
				beer" and "visualize beer", this value will be
				"beer".
	int total		The total number of thoughts which have had
				their 'fcan' functions checked and are now
				being actuated via 'fdo' functions, including
				this one.
	int type		The appropriate thought.h macro for the type
				of mentation actually being performed.

    Example of setting up a thought:

	thought = character-&gt;add_thought(
	  ({ "a triangle", "a point-up silver triangle" }),
	  0,
	  TF_Visualize,
	  0,
	  #'can_use_healing_power,
	  #'do_use_healing_power
	);

    The return value of add_thought() is a mapping which contains the thought
    information as used internally by mind.c.  You should not change the data
    in this mapping.  What you should do with it is store it for when you want
    to remove the thought from the character, which is done like so:

	character-&gt;remove_thought(thought);

    where 'thought' is the mapping passed back to you by add_thought().

    This documentation is for the Amylaar driver version of the mentation code.
    The MudOS version will have some mostly cosmetic differences, such as the
    use of a class for tracking thoughts rather than a mapping.  There is
    support for "thought monitoring", but this is mostly useless under the
    Amylaar version of Ain Soph and so will not be covered until we have moved
    to MudOS.

DEVELOPMENT CREDITS

    Ubiquitous
	Seed crystal idea: "actually, the Nexus rune bonds ought to work
	from thought rather than speech"

    Vii
	Conceptual development: the believe and disbelieve commands

    Ambidexter
	Conceptual development: most of the mentation commands, miscellaneous
	ideas; technical development: the MudOS to Amylaar port

    Chaos
	Technical development: the rest of the grunt work

-- 
MUD-Dev: Advancing an unrealised future.

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00486.html">[MUD-Dev] CGDC, a summary</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00488.html">[MUD-Dev] Re: regulating player-created objects</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00723.html">[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00486.html">[MUD-Dev] CGDC, a summary</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00487"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00487"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00601" HREF="msg00601.html">[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Fri 15 May 1998, 06:45 GMT
<UL>
<LI><strong><A NAME="00701" HREF="msg00701.html">[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 19 May 1998, 17:40 GMT
<UL>
<LI><strong><A NAME="00720" HREF="msg00720.html">[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</A></strong>, 
Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Tue 19 May 1998, 22:18 GMT
</LI>
<LI><strong><A NAME="00723" HREF="msg00723.html">[MUD-Dev] Re: How to handle log-outs in a totally dynamic world.</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 20 May 1998, 05:17 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00487" HREF="msg00487.html">[MUD-Dev] MUD mentation system</A></strong>, 
Matthew R. Sheahan <a href="mailto:chaos#crystal,palace.net">chaos#crystal,palace.net</a>, Sun 10 May 1998, 14:11 GMT
<LI><strong><A NAME="00486" HREF="msg00486.html">[MUD-Dev] CGDC, a summary</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Sun 10 May 1998, 07:15 GMT
<UL>
<LI><strong><A NAME="00589" HREF="msg00589.html">[MUD-Dev] Re: CGDC, a summary</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 14 May 1998, 23:30 GMT
<UL>
<LI><strong><A NAME="00607" HREF="msg00607.html">[MUD-Dev] Re: CGDC, a summary</A></strong>, 
Mike Sellers <a href="mailto:mike#bignetwork,com">mike#bignetwork,com</a>, Fri 15 May 1998, 15:28 GMT
<UL>
<LI><strong><A NAME="00705" HREF="msg00705.html">[MUD-Dev] Re: CGDC, a summary</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 19 May 1998, 18:49 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>