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-Dev] Re: MUD Design doc (long) -->
<!--X-From-R13: Fenivf Qnfrl <rsvaqryNvb.pbz> -->
<!--X-Date: Fri, 18 Dec 1998 20:26:41 -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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg01013.html">Previous</a>
| <a href="msg01015.html">Next</a>
]
Thread:
[ <a href="msg01002.html">Previous</a>
| <a href="msg01047.html">Next</a>
]
Index:
[ <A HREF="author.html#01014">Author</A>
| <A HREF="#01014">Date</A>
| <A HREF="thread.html#01014">Thread</A>
]
<!--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 <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: MUD Design doc (long)</LI>
<LI><em>From</em>: Travis Casey <<A HREF="mailto:efindel#io,com">efindel#io,com</A>></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:
> Caliban Tiresias Darklock wrote:
>> From: Mik Clarke <mikclrk#ibm,net>
>> > if (!object->can_you_be(CMD_SNIFFED))
>> > send_to_char "It smells of nothing in particular."
>>
>> The usual smartass message I've seen is:
>>
>> > smell foo
>> Smells like foo.
>>
>> While this is cute the first few times you see it, especially when it
>> recognises the command and not the objects in the room ("smell teen spirit",
>> huhuhuhu that was cool), it gets boring rapidly. Same thing with default
>> messages in general.
> Well, fundamentally it's an error message: 'The target object does not
> support the verb "smell".' That really mucks the SoD up though, so it
> gets replaced with an ingame message (sometimes of a margianlly humerous
> 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->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);
}
>> Intuitive action is not always correct. It may also be intuitive, if the
>> flower is in a room with a bonfire, to throw the flower into the bonfire.
>> Does it need a "burn" handler? A "throw" handler? What if the flower is not
>> in a room with a bonfire, but can conceivably be put into one? Should the
>> "burn" handler be on the flower, or the bonfire? Is it a good idea to use
>> inheritance for this, and give the generic MUDObject type all these
>> handlers? Wouldn't you get stupid things like trees and doors with "throw"
>> handlers? Who the hell throws a tree? (Caber throwing notwithstanding.)
> Well, that's why you need a good object hierarchy at the base.
> Consider:
> Static Object
> +--- Door
> +--- Sign
> +--- Plant
> +--- Moving Object
> +--- Weapon
> +--- Armour
[snip]
> In such a hierarchy you would have different throw methods on Static
> Object (a don't be silly message), Moving Object (it gets thrown),
> Pouch (thrown and spills some contents), Container (maybe comes open and
> 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->throw_handler(object, target, flag) return;
switch (flag) {
case ATTACK:
COMBAT_MODULE->attack(player, target, object, THROW);
return;
case TOSS_TO:
if (!player()->skill_check(THROW, -(object->weight()))) {
object->move_to(player()->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 <efindel#io,com>
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 <mikclrk#ibm,net></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>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>