Message-ID: <3B431DDE.780C05C1@ozemail.com.au>
From: maxandco@ozemail.com.au
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD snapN45b1  (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: rec.arts.int-fiction
Subject: Re: [Inform] memory in NPC conversation
References: <3B41C746.2C989BC0@ozemail.com.au> <9hsnni$ft9ud$1@ID-62041.news.dfncis.de> <9hst6m$55u$1@wiscnews.wiscnet.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 55
NNTP-Posting-Host: slmel75p49.ozemail.com.au
X-Trace: ozemail.com.au 994254420 203.108.127.177 (Wed, 04 Jul 2001 23:47:00 EST)
NNTP-Posting-Date: Wed, 04 Jul 2001 23:47:00 EST
Organization: OzEmail Ltd, Australia
Distribution: world
Date: Wed, 04 Jul 2001 23:45:02 +1000
Path: news.duke.edu!newsgate.duke.edu!nntp-out.monmouth.com!newspeer.monmouth.com!feeder.qis.net!feed2.news.rcn.net!rcn!newsfeed.cwix.com!news1.optus.net.au!optus!yorrell.saard.net!duster.adelaide.on.net!newsfeed.ozemail.com.au!ozemail.com.au!not-for-mail
Xref: news.duke.edu rec.arts.int-fiction:89498


"Dennis G. Jerz" wrote:

> "Roger Firth" <roger.firth@tesco.net> wrote in message
> news:9hsnni$ft9ud$1@ID-62041.news.dfncis.de...
> >
> >         life [;
> >         Ask: switch(second) {
> >             t_cloak: switch(t_cloak.number++) {
> >                 0: "~It'll be quite safe in here.~";
> >                 1: "~No really, it'll be safe, I promise.~";
> >                 2: "~I'll keep an eye on the bloody thing, alright!~";
> >                 default: print_ret (The) self, " pointedly ignores you.";
> >                 }
> >
> > but this hasn't been tested.
> >
> > Cheers, Roger
>
> This is a random note about the content of this example, rather than the
> coding.
>
> I find that I sometimes ask NPCs the same questions repeatedly because I'm
> trying to remember what I'm supposed to do with them, or I'm trying synonyms
> and related words, in order to sound out the depths of the NPC's
> conversational abilities.
>
> Perhaps NPCs might include a short-term memory, so that they could become
> quickly annoyed at pestering, and a long-term memory connected to a timer,
> so that after a certain number of turns the response to the cloak topic
> could be, "~Ready for your coat already?~ or even ~Here's your coat. I hope
> you enjoyed your visit, and have a pleasant trip home.~"

Your point about the need for short-term and long-term memory is something I've
considered. I'm fairly new to programming with Inform so I wanted to keep my
example simple to start with.

(Thank you for your help with the code Roger!)  I was able to write something
like it with a slight change to the code you posted. This leads me to my next
question- how can I generate an action of some kind in conjunction with a reply
being given by the NPC?

eg. Using the cloak example above, how would I get the NPC to accidently drop
the coat just after giving the second reply and, to make things more
complicated, the NPC will only give the third reply if the player is holding the
coat?

I can appreciate what logic/conditions need to be employed but whenever I
attempt these things I seem to get the syntax horribly wrong and my code will
not compile.

Thanks again,
-Michael


