ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Trying to find a game or a demo or something....

This forum is the place to discuss the older ADRIFT versions 3.9 and 4.0.

Please refer to the ADRIFT 4 Manual for more information.

Postby Chilli » Sat Nov 13, 2010 11:55 pm

Hi all:

I've been discussing elsewhere the ability to have a controlled chat with an NPC by starting the conversation with something like "TALK TO npc" which would produce a response from the NPC and then a list of possible follow-up responses from the Player.

It was recommended to me that I look at the code in "Choices" by David Whyld, but I cannot seem to find a game, demo, or anything by that name and that author here.

Can someone recommend a good example of this type of Player/NPC interaction to me, especially one where I can check out the code behind the scenes? Links to these items would be an added plus. ;)

Thanks a heap!

Sincerely,

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Albaniua » Sun Nov 14, 2010 7:46 am

Here is my version...just finished it. Its in the demo section of adrift.org.uk

tell me what you think.

http://www.adrift.org.uk/cgi/new/download.cgi?1204




Edited By Albaniua on 1289720857
Honk if you've played Escape from Rungistan.
User avatar
Albaniua
 
Posts: 87
Joined: Tue Sep 30, 2008 8:55 pm
Location: Las Vegas, NV

Postby Chilli » Sun Nov 14, 2010 5:41 pm

Hi Albaniua:

Albaniua wrote:Here is my version...just finished it. Its in the demo section of adrift.org.uk

tell me what you think.

http://www.adrift.org.uk/cgi/new/download.cgi?1204

Well....

I downloaded your demo and tried to open it. I didn't get anything in ADRIFT4. I then tried ADRIFT5 and got a Living Room and Player but nothing else. It ran and showed the instructions but, when I tried "talk to bob" it came back with "I don't know what you mean."

What should I have used to open this demo? I was hoping for a demo that would work in ADRIFT4 since v5 isn't officially available for release yet. Would your technique work in both versions?

Sincerely,

"Chilli"

EDIT:

Dunno what happened, but, I tried opening it again with ADRIFT4 and it worked like a champ. Must have been a loose screw behind the keyboard that first time I tried it.

(I also learned that a new version of ADRIFT5 had been released; I just haven't tried it in that yet.)

I see what you're doing in your code and, while it looks like a maintenance nightmare, it's fairly clear and understandable. Thanks for shedding some light onto this issue.

NOW, I have ANOTHER question -- is there a good way to "lock" the Player into the conversation until an "End Conversation" choice is made? It would be nice to be able to ensure that the Player doesn't wander off midway through a conversation.

Thanks again for your help!

Sincerely,

"Chilli"




Edited By Chilli on 1289757971
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Duncan_B » Sun Nov 14, 2010 7:17 pm

Use a variable or task or something that will signify when the player is in conversation. All of the dialog options should have a restriction linked to either that completed task or variable number or whatever. In the list of tasks you use for dialog options, put a * task underneath them all with the same restriction, with a response like, "Please choose an appropriate dialog option." If you don't put it under all of the choices, you could end up screwing up the conversation (tasks written under it meeting the same restriction will not execute).
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby Albaniua » Mon Nov 15, 2010 6:11 pm

yes, just what duncan said..


variable

in_conversation = 0

your "talk to bob" task also turns in_conversation = 1

make a * task that ONLY runs if in_conversation = 1 (as a restriction) make sure you put this task after all of the conversation tasks.

Also make sure that the task at the end of each conversation line switches in_conversation = 0 or you will be stuck in conversation mode forever.
Honk if you've played Escape from Rungistan.
User avatar
Albaniua
 
Posts: 87
Joined: Tue Sep 30, 2008 8:55 pm
Location: Las Vegas, NV

Postby KFAdrift » Mon Nov 15, 2010 9:20 pm

Chilli wrote:It was recommended to me that I look at the code in "Choices" by David Whyld, but I cannot seem to find a game, demo, or anything by that name and that author here.

Just to warn you that Choices is an adult game and is also passworded. I just download it from here
KF
Staring harder at the screen doesn't give any more inspiration
User avatar
KFAdrift
Site Admin
 
Posts: 4884
Joined: Sun Jun 23, 2002 4:42 pm
Location: Surrey, southern England

Postby David Whyld » Mon Nov 15, 2010 10:52 pm

If you're interested, the password for the game is the first name of one of the game's main characters.
David Whyld
 
Posts: 6866
Joined: Sat Dec 18, 2004 5:15 pm
Location: United Kingdom
Points: 35

Postby Chilli » Tue Nov 16, 2010 4:31 am

Hi all:

Thanks for the great responses, and for the link (and password hint, David) to "Choices."

The notion of including a task override that way had not occurred to me. (Big surprise! I've only been coding with ADRIFT 4 for slightly over a month now.) I'm assuming from the hints included with using this type of override that tasks are executed from first to last as displayed in task window, correct?

I also liked the notion of including (when possible) optional text in braces at the end of tasks to provide the developer with a visual cue of which task is being executed when there are multiple tasks with the same "name" (for lack of a better term). Thanks for that tip, too!

Sincerely,

"Chilli"
Chilli
 
Posts: 22
Joined: Mon Sep 27, 2010 6:13 pm
Location: Illinois

Postby Duncan_B » Wed Nov 17, 2010 12:50 am

There are a couple of conversation tutorials on Shadowvault (here) if you need some further reference or guidance or whatever.
User avatar
Duncan_B
 
Posts: 1219
Joined: Fri Apr 01, 2005 8:26 pm
Location: Chicago, Illinois
Points: 11

Postby revgiblet » Wed Nov 17, 2010 11:08 pm

I was working on a system like this for a couple of my games (works in progress = games I'm not working on).

Last year's Intro Comp (or was it the year before that?) had the beginnings of a game called 'Apokalupsis'. It uses a conversation system like the one you're describing.

Unfortunately there's only one conversation in the game, and it's fairly short. Still, you're welcome to have a look. I don't think that the game is password protected, and the one conversation included should be helpful to you.

The Intro Comp entries should be able to be downloaded as a package from this website.

Just in case you can't find the game, the way that I made it work was to have the instruction "Talk to NPC" move the character to a new room. Then I would disable all commands from that room (by using a task) except the numeric responses to the conversation. This means that once you are in a conversation you can't do anything (like check you inventory or move) until you have left finished the conversation.

Just remember to move the character back to the room they were in once they finish the conversation! This might be tricky if your NPC is mobile, but you can make it work with variables and the ALR.

I have started another game called 'I Will Ruin Strawberries For You' which uses the same system. This was further on in development, so has a few working conversations in it. I could upload it to the site, or send it to you for you to have a look if you wanted.
"He who lives only to benefit himself confers on the world a benefit when he dies."

Tertullian

In Progress:- Watch This Space...
User avatar
revgiblet
 
Posts: 444
Joined: Sat Aug 05, 2006 9:11 pm
Location: Canowindra, NSW


Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: No registered users and 4 guests

cron