Reply-To: "Kent Tessman" <kent@remove-to-reply.generalcoffee.com>
From: "Kent Tessman" <kent@remove-to-reply.generalcoffee.com>
Newsgroups: rec.arts.int-fiction
References: <65sh9uk0qp2m9m5n8nu4njsci8jtbap6u2@4ax.com>
Subject: Re: [HUGO] Help with referencing two chairs in a room please
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <HF6m8.17679$Ff3.1735293@news20.bellglobal.com>
Date: Wed, 20 Mar 2002 15:53:58 -0500
NNTP-Posting-Host: 64.231.205.170
X-Complaints-To: abuse@sympatico.ca
X-Trace: news20.bellglobal.com 1016657639 64.231.205.170 (Wed, 20 Mar 2002 15:53:59 EST)
NNTP-Posting-Date: Wed, 20 Mar 2002 15:53:59 EST
Organization: Bell Sympatico
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.cwix.com!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail
Xref: news.duke.edu rec.arts.int-fiction:102000

The problem is that you have two objects that may both be properly referred
to as "my chair" (in that "my" and "chair" are an adjective and noun,
respectively, for each).

The simplest solution would be to add the property:

    parse_rank 1

to the dl_mychair object.  Objects with higher parse_ranks get preferred in
disambiguation.

You can make parse_rank more complicated, if need be.  Making it a routine
like:

    parse_rank
    {
        return dl_datechair.parse_rank + 1
    }

will ensure that it always gets ranked over dl_datechair in the event of any
ambiguity even if you change dl_datechair's parse_rank.  Or, you can write a
parse_rank routine that is dependent on other variables in the game.

Hope that helps.

--Kent

"Dana Clarke" <joeynipp@bellsouth.net> wrote in message
news:65sh9uk0qp2m9m5n8nu4njsci8jtbap6u2@4ax.com...
> I will preface this problem with "my problem may be due to some
> inherent non-understanding of basic HUGO workings".  If this is so,
> please feel free to tell me so (and point to where I should look) -
> you won't hurt my feelings.
>
> The scene:
> The PC is in a room with a table, 2 chairs and a waiter (npc).  My
> problem is when the player tries to examine the chairs, I am having
> difficulty getting them be referenced properly with simple linguistics
> that a player is likely to use (without forcing the player too much
> OOC).  Below is the code for the two chairs.
>
> chair dl_mychair "chair"
> {
> in dl_diningroom
> size 300
> capacity 300
> noun "chair"
> adjectives "dining", "my"
> article "my"
> long_desc {"Your dining chair is identical to all the other chairs in
> the dining room.  It is high backed with ornate carvings in the wood,
> heavy and very, very comfortable."}
> }
>
> chair dl_datechair "date's chair"
> {
> in dl_diningroom
> size 300
> capacity 300
> noun "chair"
> adjectives "her", "date's", "date", "my"
> article "your"
> long_desc {"Your date's dining chair is identical to yours."}
> }
>
> It seems fairly likely to me that the player (when desiring to
> reference any action to the chairs) is likely to use phraseology such
> as:
>
> Look at my chair (meaning the chair the PC will be sitting in)
>
> Look at my date's chair. or Look at her chair. (meaning the chair his
> npc date will be sitting in)
>
>
> When the player types one of the two aforementioned phrases to look at
> his date's chair - everything works just fine.
>
> However, when the player types "Look at my chair." HUGO comes back
> with "Do you mean the chair or the date's chair?"  If the player then
> types "the date's chair" everything is fine.  However, if the player
> subsequently types "the chair", HUGO basically barfs out (I forget the
> precise message - but it isn't all that pleasant and certainly doesn't
> illicit the correct long description).
>
> What is wrong and how can I correct it.  Seemingly I have tried
> everything - certainly everything I can think of and have come up
> empty handed.
>
> Please help if you can.
>
> Thanks
> Dana
>


