ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Understanding the Conversation Tab

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Understanding the Conversation Tab

Postby ElliotM » Tue Jan 26, 2016 10:55 pm

To understand the conversation tab, I will first go over the standard library conversation tasks but if you'd rather skip it then read the stuff below the quote box where I describe the first demo file.

ElliotM wrote:The standard library comes with tasks supporting SAY, ASK, and TELL.

Tasks with Direct Character References
adrift Code: Select all
Ask character about subject: ask %character% about %text%
Tell character about subject: tell %character% about %text%
Say something to character: say %text% to %character%

These tasks require the player to include a %character% reference in the command syntax. If you look at their restrictions, they require only that the player has seen the referenced character and that they are in the same location as that character. They all have a single conversation action in the Task Actions tab that passes the %text% to the conversation tab of the referenced character. All of the other conversation tasks are based on these three.


Tasks that assume that the character the player is trying to address is the one they are already in conversation with
adrift Code: Select all
Ask about subject: ask about %text%
Say something: say %text%

Being forced to constantly refer to a character by name when talking to them is annoying, and so that is why these tasks exist: They assume that if the player is already in conversation with a character that when a player asks or says something that they are continuing their conversation with that character. There is a special character reference called %convcharacter% that tracks who the player is currently talking to and these tasks use parameter passing to give that character reference to one of the original three direct reference tasks. Parameters match up with each %reference% in the task being executed, so %text% matches up with %text% and %convcharacter% matches up with %character% in the original tasks after they get passed over. Logically there could be a "Tell about subject" task but there isn't one in the standard library at the moment.


Tasks that guess who the player wants to talk when they aren't in conversation with any character
adrift Code: Select all
Say something (lazy): say %text%
Ask about (lazy): ask about %text%

These tasks cover the opposite situation when the player isn't in a conversation but asks or says something without specifying who they are talking to. These tasks require that the player not be in conversation with any character AND that they are alone with one character. There is another special reference called %AloneWithChar% which will return the character reference of whoever is alone with the player. Like the previous indirect tasks, the lazy versions call one of the original three direct tasks and pass %text% and %AloneWithChar% as the task references. Again, there logically could be a 'Tell about (lazy)' task but there isn't one at the moment.


The conversation tab in task actions has five settings with dropdown menus: Ask, Tell, Say, Enter Conversation, Leave Conversation. To get Referenced Character% to appear in those menus, the task must have the %character% reference in its command syntax.

In the demo below I created a pet dog that listens to commands for 'sit', 'lie down', 'stand up', 'play dead', and 'fetch'. When you open the dog character and look at the conversation tab you will see a conversation topic for each of those commands set to type 'General Command'. The conversation tab in task actions is great for situations where you want a task to trigger a reaction from a character. The 'play fetch' task is a shortcut for 'throw object' and 'say fetch to Barkley'. To play with the dog, the player will be using the 'say something' tasks from the standard library to trigger commands in the conversation tab that Barkley responds to and/or the 'play fetch' task.

Pet Dog - Character Commands.taf
Demo showing a pet dog that listens to commands.
(15.76 KiB) Downloaded 74 times


I used the following macro when I was testing. Macros are a feature of the runner that lets you execute multiple tasks at once. If you don't use macros, then just consider this as a 'walkthrough'.
adrift Code: Select all
look
say sit
say sit
look
say lie down
say lie down
look
say stand up
say stand up
look
say play dead
say play dead
look
say fetch
throw ball
look
say fetch
play fetch
look
Last edited by ElliotM on Wed Jan 27, 2016 5:33 am, edited 3 times in total.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ElliotM » Wed Jan 27, 2016 12:31 am

The conversation tab in task actions has five settings with dropdown menus: Ask, Tell, Say, Enter Conversation, Leave Conversation. To get Referenced Character% to appear in those menus, the task must have the %character% reference in its command syntax.

The demo attached to this post has a custom conversation task called 'Greet Character' that uses the conversation task actions 'Enter Conversation' and 'Say'. Leaving out 'Enter Conversation' will cause the intro question to fail with an 'ignores you' response when the player responds with yes or no. See transcript for where 'say hi' produces this ignore response for the intro question, which I feel is a bug.

This demo shows off the Introduction, Ask, and Farewell conversation topics. Active introductions/farewells are also of type general command so that you can include keywords that imply introducing yourself, such as hi or hello. Passive introductions/farewells are triggered by any action that causes the conversation to end, such as leaving the room.

Conversation Testing.taf
Conversation testing. There is a small bug with the character ignoring you. If you greet them first using my custom task, it doesn't happen. If you instead greet a character manually using 'say hi', then you aren't able to answer the question the character is asking when you introduce yourself.
(16.12 KiB) Downloaded 70 times


Macro I used for testing: Consider this as a walkthrough if you don't use them.
adrift Code: Select all
north
greet man
say no
say goodbye
south
north
say hi to man
say yes
south
north
say hi
say no
ask about politics
south
north
ask about weather
say yes
say goodbye
ask about politics


There are some rough edges currently. When using my 'Greet Character' task, which uses the Enter Conversation with Character task action in the conversation tab for task actions, the ignoring bug doesn't happen. If you 'say hi' directly, then you aren't able to answer the question because of the ignore bug.

If you get the "I'm not sure who you are referring to.' response, then your 'ask about (lazy)' task has a lower priority than your 'ask about subject' task (see this bug report). After I adjusted my 'ask about (lazy)' task to have a higher priority than the 'ask about subject' task this problem went away.

If you experience either bug please upvote them please (see links above).
Last edited by ElliotM on Wed Jan 27, 2016 5:29 am, edited 6 times in total.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ElliotM » Wed Jan 27, 2016 12:57 am

Here are some transcript snippets showing what can be done with the different topic types from the previous demo.
Active Intro off of the Greet Character Task:
adrift Code: Select all
Conservatory
Mr. Yes/No is here.  An exit leads south.
 
> greet man
"Hello there", you say.
 
Mr. Yes/No looks towards you. "Oh hello there. Do you have any questions for me?"
 
> say no
"I don't have any questions for you right now", you say.
 
"Alright then."
 
> say goodbye
"Well, I gotta get going. Bye for now."
 
"Alright then, bye for now". Mr. Yes/No goes back to idly standing around.
 
> south
You move south.

As you can see from the output, the Active Intro topic for Mr. Yes/No is a question that the player can answer with a yes or a no. We also see the Active Farewell, as we say goodbye before leaving.

Intro Topic Ignore Bug when using say hello
adrift Code: Select all
Conservatory
Mr. Yes/No is here.  An exit leads south.
 
> say hi to man
"Hello there", you say.
 
Mr. Yes/No looks towards you. "Oh hello there. Do you have any questions for me?"
 
> say yes
Mr. Yes/No ignores you.

Here we see the ignore bug. The standard library task didn't keep track of our place in the conversation tree, so typing yes or no produced the ignore response.

adrift Code: Select all
Conservatory
Mr. Yes/No is here.  An exit leads south.
 
> say hi
(to Mr. Yes/No)
"Hello there", you say.
 
He looks towards you. "Oh hello there. Do you have any questions for me?"
 
> say no
Mr. Yes/No ignores you.

No difference, still ignored.

Passive Farewell Output
adrift Code: Select all
> ask about politics
"What do you think about politics?" you ask.
 
"Dreadful but fascinating. They're changing lots of things lately." Mr. Yes/No looks rather animated.
 
> south
Mr. Yes/No goes back to idly standing around.  You move south.

Here we see the output of the passive farewell, as we left without saying goodbye to trigger the active goodbye, and so the our passive farewell triggers.

Passive Intro into Yes/No Question Topic
adrift Code: Select all
Conservatory
Mr. Yes/No is here.  An exit leads south.
 
> ask about weather
(Mr. Yes/No)
He looks towards you as you begin to speak.   "What do you think of today's weather?", you say.
 
"I'd rather be indoors any day, wouldn't you agree?" He doesn't look like the camping or 'outdoorsey' type.
 
> say yes
"I think it's rather awful out today", you reply.
 
"Isn't it? A great day to be having this conversation indoors." Mr. Yes/No looks pleased with your response.

Here we see a passive introduction - we didn't introduce ourselves before speaking by saying hi or hello, but start talking first. The weather topic also shows how to make a question. Fortunately it is not affected by the same bug as the intro topic question.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ParadoxGames » Wed Jan 27, 2016 2:05 pm

Thanks for this. I was never able to get the conversations started. Now I think I can.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Understanding the Conversation Tab

Postby ElliotM » Thu Jan 28, 2016 8:10 pm

What is a "conversation tree"?

A conversation tree is a term used to describe the relation between topics and subtopics. If you were to graph it as a flowchart, with the first topic on top with the subtopics below it, you would get something that looks like a tree to some people.

ElliotM wrote:Here is another way of thinking about the behavior of topics and subtopics. Think of quincunx or Galton box bean machines or the plinko falling ball game. To play plinko you have to put the ball in at the top, you can't start halfway down or jump to the bottom bin of your choice. Conversation topics that have been grouped under another topic are called subtopics and are like the other pegs in the middle or the bins at the bottom of a game of plinko - you can't reach them without first starting at the top. Unlike a game of plinko, you get to choose which way the ball goes when it reaches a peg. However, if you were to walk away from a conversation and come back, you wouldn't get to pick up where you left off and would have to start over, whereas a plinko ball would have kept going.

If you want to have a topic where the player is expected to answer with a yes or no, in order to keep the context you need to drag the yes and no subtopics underneath the topic they are responding to, otherwise the player could accidently jump to the yes or no subtopic first without the context of the topic with the question. Look at the weather topic in the second demo for a working example. You start at the top with the subject of weather, then you have a choice for continuing the conversation by answering yes or no. You can make longer chains of topics if you want, but mistakes can bump a player off a tree, forcing them to start over.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ElliotM » Mon Feb 01, 2016 1:39 am

The one part I haven't really addressed yet in this thread is what an "implicit introduction" is from the example in the wiki, which is just the name Campbell came up with for the topic that contained the bit of text he wanted to use to narrate the start of a new conversation if the player hadn't greeted the character first.

My second demo above has something similar but I called it a passive introduction. It's a good way of getting the description of the start of a conversation to show up at the right time when you don't know if the player will try a greeting first or if you don't know the order in which the player will try the different topics.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ParadoxGames » Tue Mar 08, 2016 2:45 pm

I never could get the conversations trees to work- ever. I read your article and I have enough programming skill to understand the concept of what yuo're saying, but this ignore bug you're referring to- I always encounter it. Is there a way around it? In the .TAF file, why does "greet Mr. Yes/No" activate the conversation tree correctly while "say hello to Mr. Yes/No" doesn't? Is there a way around the bug with, "say hello to [character]"? I'm never "lazy" in my commands, always addressing the person in the room even if the person is the only one at the same location as the player character.

I'm sorry, but I am the slowest learner, so please be patient with me. Let me say what I think happens and tell me if I'm right. In the .TAF file that supplimented your tutorial, when the task, "greet character" is activated, the character enters conversation mode, and pefroms the "hello" action as well. This triggers the response to "hello" in the character's conversation tab as the player enters conversation mode with the character. Somehow, this method bypasses the ignore bug, and conversation may progress normally. Is that right?

I'm currently at the juncture of my game development where I want to create my first conversation tree, and it's a major plot element. Before making a new attempt, I want to be sure that the above is correct, and I understand what is happening behind the ADRIFT interface.

Thank you much!
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Understanding the Conversation Tab

Postby ElliotM » Tue Mar 08, 2016 6:23 pm

ParadoxGames wrote:Is that right?

The teacher in me wants to ask you to try it out in a new file before I tell you the answer, but I believe the theory you stated is the one I had arrived at. My greet task did something that the standard library didn't, and that was the enter conversation task action. However, this method wasn't without problems because my fix to the standard library actions created a different bug. I believe the new bug was that implicit introductions or conversation topics with only the introduction checkbox checked would not run. At any rate, try it in a new file and if you don't come across the secondary bug than my fix is perfectly fine for your game. See this other thread for the details and how to make the fix: viewtopic.php?f=14&t=11386
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ParadoxGames » Wed Mar 09, 2016 3:14 pm

I need that bug patch. thanks
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Understanding the Conversation Tab

Postby ElliotM » Wed Mar 09, 2016 5:51 pm

Did you find it in that thread or are you still looking for it? It is the file named "Fix for Bug 19072.zip", which is a module you should be able to just import. Do it in a new file or a copy first, just in case the bug it makes affects your project.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ParadoxGames » Sat Mar 12, 2016 2:39 pm

I did find the patch a while ago. The patch didn't do what I wanted it to. I actually found a different way to accomplish what I wanted to do in the meantime, however.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Understanding the Conversation Tab

Postby ElliotM » Sat Mar 12, 2016 4:23 pm

I'd be interested in hearing why it didn't work for what you wanted. Did the secondary bug stop you from doing other things you wanted, or did it not fix the first problem?
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Understanding the Conversation Tab

Postby ParadoxGames » Mon Mar 14, 2016 7:43 pm

No, I was wrong. It did work. i forgot to implement something.
ParadoxGames
 
Posts: 161
Joined: Sat Sep 05, 2015 2:33 am
Points: 10

Re: Understanding the Conversation Tab

Postby Campbell » Thu Mar 17, 2016 11:38 am

The ignore bug should be fixed in the next release.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: Understanding the Conversation Tab

Postby ElliotM » Thu Mar 17, 2016 4:03 pm

What was the cause? Were we on the right track with the work around that it had to do needing to add Enter Conversation with Character or was it something in the VB.net code?
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Next

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests