msg01014.html

1998Q4/msg01014.html · 9.4 KB

From the archive 1998Q4.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: MUD Design doc (long) -->
<!--X-From-R13: Fenivf Qnfrl <rsvaqryNvb.pbz> -->
<!--X-Date: Fri, 18 Dec 1998 20:26:41 &#45;0800 -->
<!--X-Message-Id: 1889.981218#io,com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 367AD0A5.AC76B1E#ibm,net -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: MUD Design doc (long)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:efindel#io,com">
</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="msg01013.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01015.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01002.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01047.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01014">Author</A>
&nbsp;|&nbsp;<A HREF="#01014">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01014">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: MUD Design doc (long)</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: Mik Clarke &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] Re: MUD Design doc (long)</LI>
<LI><em>From</em>: Travis Casey &lt;<A HREF="mailto:efindel#io,com">efindel#io,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 18 Dec 1998 21:20:54 -0500</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Friday, December 18, 1998, Mik Clarke wrote:
&gt; Caliban Tiresias Darklock wrote:
&gt;&gt; From: Mik Clarke &lt;mikclrk#ibm,net&gt;

&gt;&gt; &gt;      if (!object-&gt;can_you_be(CMD_SNIFFED))
&gt;&gt; &gt;        send_to_char "It smells of nothing in particular."
&gt;&gt;
&gt;&gt; The usual smartass message I've seen is:
&gt;&gt;
&gt;&gt;   &gt; smell foo
&gt;&gt;   Smells like foo.
&gt;&gt;
&gt;&gt; While this is cute the first few times you see it, especially when it
&gt;&gt; recognises the command and not the objects in the room ("smell teen spirit",
&gt;&gt; huhuhuhu that was cool), it gets boring rapidly. Same thing with default
&gt;&gt; messages in general.

&gt; Well, fundamentally it's an error message: 'The target object does not
&gt; support the verb "smell".'  That really mucks the SoD up though, so it
&gt; gets replaced with an ingame message (sometimes of a margianlly humerous
&gt; nature).

And, of course, a message of some sort is needed, so the user realizes
that his/her command actually made it through.  You can, though, build
a little more intelligence into the routine, and/or vary the messages.
For example:

cmd_smell(string what) {
  if (!(object = find_object(what, LOCAL))) {
    send_to_char("There is no %s here for you to smell.", object);
    return;
  }
  if (object-&gt;smell_me(player())) return;
  message = choose_random_string( ({
    "The %o smells pretty much like you'd expect it to.",
    "You sniff the %o, but don't smell anything unusual.",
    ...
  }) );
  send_to_char(message, object);
}

&gt;&gt; Intuitive action is not always correct. It may also be intuitive, if the
&gt;&gt; flower is in a room with a bonfire, to throw the flower into the bonfire.
&gt;&gt; Does it need a "burn" handler? A "throw" handler? What if the flower is not
&gt;&gt; in a room with a bonfire, but can conceivably be put into one? Should the
&gt;&gt; "burn" handler be on the flower, or the bonfire? Is it a good idea to use
&gt;&gt; inheritance for this, and give the generic MUDObject type all these
&gt;&gt; handlers? Wouldn't you get stupid things like trees and doors with "throw"
&gt;&gt; handlers? Who the hell throws a tree? (Caber throwing notwithstanding.)

&gt; Well, that's why you need a good object hierarchy at the base.
&gt; Consider:

&gt;   Static Object
&gt;     +--- Door
&gt;     +--- Sign
&gt;     +--- Plant
&gt;     +--- Moving Object
&gt;            +--- Weapon
&gt;            +--- Armour

[snip]

&gt; In such a hierarchy you would have different throw methods on Static
&gt; Object (a don't be silly message), Moving Object (it gets thrown),
&gt; Pouch (thrown and spills some contents), Container (maybe comes open and
&gt; loses it's contents).

Another possibility, instead of giving every object a handler for the
action, is to be careful in how you define what the verb does if there
is no handler.  For example:

cmd_throw(string what) {
  flag = RANDOM_THROW;
  if (try_to_parse("OBJECT at OBJECT", object, target))
    flag = ATTACK;
  else if (try_to_parse("OBJECT to LIVING", object, target))
    flag = TOSS_TO;
  else if (!(object = find_object(what, INVENTORY))) {
    if (object = find_object(what, LOCAL)) {
      send_to_char("You'd have to pick up the %o first.", object);
      return;
    } else {
      send_to_char("There is no %s here.", what);
      return;
    }
  }
  if (object-&gt;throw_handler(object, target, flag) return;

  switch (flag) {
    case ATTACK:
      COMBAT_MODULE-&gt;attack(player, target, object, THROW);
      return;
    case TOSS_TO:
      if (!player()-&gt;skill_check(THROW, -(object-&gt;weight()))) {
        object-&gt;move_to(player()-&gt;environment());
        send_to_char("You miss %L badly.", target);
        return;
      }

 ... // I think that's enough for you all to get the idea.

}

--
       |\      _,,,---,,_        Travis S. Casey  &lt;efindel#io,com&gt;
 ZZzz  /,`.-'`'    -.  ;-;;,_   No one agrees with me.  Not even me.
      |,4-  ) )-,_..;\ (  `'-'
     '---''(_/--'  `-'\_)




</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="01002" HREF="msg01002.html">[MUD-Dev] Re: MUD Design doc (long)</A></STRONG>
<UL><LI><EM>From:</EM> Mik Clarke &lt;mikclrk#ibm,net&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01013.html">[MUD-Dev] Re: DIS: Client-Server vs Peer-to-Peer</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01015.html">[MUD-Dev] Re: Response (Was Re: MUD Design doc (long))</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01002.html">[MUD-Dev] Re: MUD Design doc (long)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01047.html">[MUD-Dev] Re: MUD Design doc (long)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01014"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01014"><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: MUD Design doc (long)</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00988" HREF="msg00988.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Thu 17 Dec 1998, 23:12 GMT
<UL>
<LI><strong><A NAME="00991" HREF="msg00991.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Thinus Barnard <a href="mailto:thinus_barnard#bigfoot,com">thinus_barnard#bigfoot,com</a>, Fri 18 Dec 1998, 12:57 GMT
<UL>
<LI><strong><A NAME="01003" HREF="msg01003.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Fri 18 Dec 1998, 23:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01002" HREF="msg01002.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Fri 18 Dec 1998, 22:56 GMT
<UL>
<LI><strong><A NAME="01014" HREF="msg01014.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Travis Casey <a href="mailto:efindel#io,com">efindel#io,com</a>, Sat 19 Dec 1998, 04:26 GMT
</LI>
<LI><strong><A NAME="01047" HREF="msg01047.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Wed 23 Dec 1998, 03:12 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00993" HREF="msg00993.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 18 Dec 1998, 12:58 GMT
<UL>
<LI><strong><A NAME="01004" HREF="msg01004.html">[MUD-Dev] Response (Was Re: MUD Design doc (long))</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Fri 18 Dec 1998, 23:20 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00994" HREF="msg00994.html">[MUD-Dev] Re: MUD Design doc (long)</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Fri 18 Dec 1998, 12:58 GMT
</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>

Site Stats

Snippets: 1791
Codebases: 571