intfiction.org

The Interactive Fiction Community Forum
It is currently Wed May 22, 2013 7:21 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed May 30, 2012 4:58 pm 
Offline

Joined: Wed May 30, 2012 4:53 pm
Posts: 21
Hi all! First post here, please be gentle. :P

I embarked upon my initial Inform project a while ago, which to get me acquainted with the program was a recreation of Day of the Tentacle in text adventure form. When I first started I found a wonderful tutorial for LucasArts-style conversations with NPCs, where your dialogue options were displayed in the status bar so they wouldn't interrupt the narrative. This worked perfectly for my needs and I actually got pretty far with it, but eventually stopped working on it due to time constraints.

Now that I've got more time to do so, I've decided to pick it back up again. However, I no longer have the original project file and I can't find the tutorial I used for the conversation system anywhere! There are some extensions for similar things, but none of them seem to use the status bar for the options like my original one did. I'd really like to implement this again and if nothing else works I'll just see if I can recreate it myself (and then post the tutorial since I can't find it any more) but I was wondering if anyone else knew where to find it or how to do what I'm trying to.

Thanks in advance for any help you can offer.


Top
 Profile Send private message  
 
PostPosted: Wed May 30, 2012 5:40 pm 
Offline
User avatar

Joined: Mon Oct 03, 2011 12:03 pm
Posts: 636
Location: Stoke Barehills
You may find useful this discussion on the possibility and merits of putting menu conversation in the status line.

If it were me, I'd use the Reactable Quips extension for the conversation framework, and using a window rather than the status bar for the conversation (using, for instance, Flexible Windows).


Top
 Profile Send private message  
 
PostPosted: Wed May 30, 2012 7:07 pm 
Offline

Joined: Thu Oct 22, 2009 4:31 pm
Posts: 1137
I agree with Joey about using Flexible Windows rather than the status bar for this. City of Secrets is an example of a game that uses this approach.

_________________
Glimmr: Advanced Graphics for I7
blog | download | bug-tracker


Top
 Profile Send private message  
 
PostPosted: Wed May 30, 2012 8:13 pm 
Offline

Joined: Wed May 30, 2012 4:53 pm
Posts: 21
Thanks for the replies. I'd wanted something I could learn to do myself without using someone else's extension, but that sounds pretty much exactly like what I need so I'd be silly not to check it out. ^_^


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 12:26 am 
Offline

Joined: Wed May 30, 2012 4:53 pm
Posts: 21
Okay, I've been playing around with the Reactable Quips extension and have pretty much got this now, but there are a few things I still need help with:

1. Although I can set up quip followups to emulate the menu-based conversations from DotT, sometimes multiple options lead to the same follow-ups and available options disappear as you select them. Is it possible to recreate this using the extension?

2. How can I have the menu options appear in a window created with the flexible windows extension?

Thanks again for all your help so far.


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 8:39 am 
Offline
User avatar

Joined: Mon Oct 03, 2011 12:03 pm
Posts: 636
Location: Stoke Barehills
Thinking about it, you may actually be better off with Quip-based Conversation by Michael Martin: the follow-up to Reactable Quips. This allows you to more easily eliminate different menu options, though in both it is easy for different quips to go to the same place. e.g.:
Code:
Table of Quip Followups (continued)
quip               option      result
greeting            "Hello!"      greeting2
greeting            "Good Day!"   greeting2


As for flexible windows, have a look at this variant I just wrote up of the example in Reactable Quips:

Spoiler: show
Code:
"Joe Schmoe Revisited"

The story headline is "An Interactive Revisiting of the phtalkoo.h Test".
Include Quip-Based Conversation by Michael Martin.
Include Flexible Windows by Jon Ingold.

The talk-window is a bordered g-window spawned by the main-window.

The position of the talk-window is g-placebelow.

Window-drawing rule for the talk-window (this is the construct talk rule):
move focus to talk-window, clearing the window;
continue the action;   
return to main screen.


When play begins:
open up the talk-window;
move focus to the main-window.

Before quipping:
follow the window-drawing rules for the talk-window.

Check requesting a recap:
follow the window-drawing rules for the talk-window.

Before talking to:
follow the window-drawing rules for the talk-window.


Use no scoring and no deprecated features.

Chapter 1 - The Setup

When play begins, say "Joe Schmoe is your frend!"

Joe Schmoe's Place is a room. "You are in Joe Schmoe's place."

Joe Schmoe is a man in Joe Schmoe's Place. The description is "This is Joe. It's your frend!" The litany of Joe Schmoe is the Table of Joe Comments.

The greeting of yourself is selftalk.

Casting Xyzzy is an action applying to nothing. Understand "xyzzy" as casting xyzzy. Carry out casting xyzzy: deliver the xyzzy quip; run a conversation on the Table of Magic Followups.


Chapter 2 - The Script

Section 1 - The Text

Table of Quip Texts (continued)
quip   quiptext
selftalk   "Talking to yourself is not particularly fun."
who-am-i   "'My name is Joe Schmoe and Inform hates me.'"
why-hate   "'I tried to compile a game and it gave me 40 Problem messages.'"
yay-inform   "'Thanks so much! You're the greatest!'"
hate-you   "'I hate you!'[paragraph break] Joe kills you."
hate-you-2   "'I hate you!'[paragraph break] Joe kills you."
hate-you-3   "'I hate you!'[paragraph break] Joe kills you."
hate-pedants   "'I hate pedants!'[paragraph break] Joe kills you."
yay-monkeys   "'Of course I like monkeys.'"
yay-you   "'Now we can be friends!'"
say-nothing   "You decide not to say anything after all."
ehn-apes   "'Apes are OK, I guess.'"
ehn-lemurs   "'I don't really have an opinion on lemurs.'"
xyzzy   "What's the other magic word?"

Table of Joe Comments
prompt   response   enabled
"Who are you?"   who-am-i   1
"Why does Inform hate you?"   why-hate   0
"You probably just left out a semi-colon."   yay-inform   0
"I don't care."   hate-you   0
"Ha, ha. Inform hates you."   hate-you-2   0
"Do you like a monkey?"   yay-monkeys   1
"Only crazy people like monkeys."   hate-you-3   0
"No, I said 'a monkey', not 'monkeys'."   hate-pedants   0
"I like monkeys too."   yay-you   0
"Say nothing"   say-nothing   1

Table of Quip Followups (continued)
quip   option   result
yay-monkeys   "What about apes?"   ehn-apes
yay-monkeys   "What about lemurs?"   ehn-lemurs

Table of Magic Followups
prompt   response   enabled
"PLUGH"   yay-you   1
"There are at least two; which one?"   hate-pedants   1

Section 2 - Dialogue affects itself

After quipping when the current quip is who-am-i:
   enable the why-hate quip;
   enable the hate-you quip.

After quipping when the current quip is why-hate:
   disable the hate-you quip;
   enable the hate-you-2 quip;
   enable the yay-inform quip.

After quipping when the current quip is yay-monkeys:
   enable the hate-you-3 quip;
   enable the hate-pedants quip;
   enable the yay-you quip.

After quipping when the current quip is say-nothing:
   enable the say-nothing quip;
   terminate the conversation.

Section 3 - Dialogue affects the game

After quipping when the current quip is hate-you: end the story saying "You have died".
After quipping when the current quip is hate-you-2: end the story saying "You have died".
After quipping when the current quip is hate-you-3: end the story saying "You have died".
After quipping when the current quip is hate-pedants: end the story saying "You have died".
After quipping when the current quip is yay-inform: end the story finally saying "You have won".
After quipping when the current quip is yay-you: end the story finally saying "You have won".

Section 4 - Tests

test me with "talk to me / x joe / talk to joe / 1 / x me / 1 / repeat / 3 / x me / 1 / 1".
test xyzzy with "xyzzy / 1".



As you'll see, you make the window using something like:

Code:
The talk-window is a bordered g-window spawned by the main-window.

The position of the talk-window is g-placebelow.

Window-drawing rule for the talk-window (this is the construct talk rule):
move focus to talk-window, clearing the window;
continue the action;   
return to main screen.


This creates a window- you can change the size and border, background colour etc. The window-drawing rule is the rule is there to put output for certain actions in the bottom window. To choose these actions (in this case, talking) we use rules like:

Code:
Before quipping:
follow the window-drawing rules for the talk-window.


Uh, this may need a bit of polishing, but should get you started.


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 12:07 pm 
Offline

Joined: Wed May 30, 2012 4:53 pm
Posts: 21
Dohcakes! The before rule was the link I was missing when I was running through it in my head. Thanks!

(Also I actually was using Quip-based Conversation, which I agree is a lot better for my purposes. I just got the names mixed up)

Edit: Using the method you outlined, I now have the options in a separate window...but the quip replies go in said window also. Is there a way I can put -only- the options in the window and have the responses in the main one?


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 3:22 pm 
Offline
User avatar

Joined: Mon Oct 03, 2011 12:03 pm
Posts: 636
Location: Stoke Barehills
You'll need to replace some of the rules in Michael Martin's extensions, so that the focus goes to the talk-window at the points when you want. You can do these from within your main source code like so:

Code:
Carry out QBC responding with (this is the new perform talking rule):
   let qbc_index be 0;
   repeat through the qbc_litany:
      if the enabled entry is 1:
         increase qbc_index by 1;
         if qbc_index is the number understood:
            now the enabled entry is 0;
            deliver the response entry quip;
            display the QBC options;
            rule succeeds;
   follow the RQ out of range rules for qbc_index;
   move focus to the talk-window, clearing the window.

The perform talking rule is not listed in any rulebook.

Carry out responding with [when the pertinent quip is not quip_null] (this is the new perform responding rule):
   let rq_index be 0;
   move focus to talk-window, clearing the window;
   repeat through Table of Quip Followups:
      if the quip entry is the pertinent quip:
         increase rq_index by 1;
         if rq_index is the number understood:
            deliver the result entry quip;
            rule succeeds;
   follow the RQ out of range rules for rq_index;
   move focus to main-window.

The perform responding rule is not listed in any rulebook.


However, I may be wrong, but I think you'll need to wholesale replace in the extension the 'to display the QBC options' phrase with this:

Code:
To display the QBC options:
   if the story has ended, stop;
   if RQ is active, stop;
   let qbc_index be 0;
   move focus to talk-window, clearing the window;
   repeat through qbc_litany:
      if the enabled entry is 1:
         increase qbc_index by 1;
         say "[bracket][qbc_index][close bracket] [prompt entry][line break]";
   if qbc_index is not 0, now the number understood is 0;
   otherwise terminate the conversation;
   move focus to main-window.


I've got these to work with the Joe Shmoe example, so it should work with your project, but either way hopefully you can see the principal involved: put a pair of 'move focus' lines around any section that you want to fire in another window.

(Also I hope you're proud: you inspired me to play through the entirety of Day of the Tentacle today. Still as good as I remembered!)


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 5:02 pm 
Offline

Joined: Wed May 30, 2012 4:53 pm
Posts: 21
I got it by putting follow the window-drawing rules for the talk-window; before the quip delivery in both extensions (had to edit Reactable Quips as well for when I had reactions set up). Works like a charm.

Also I am proud! DotT is an awesome game.

Edit: check out this monster! I am way too dedicated to perfectly preserving the order of quip activation from the source game.

Code:
The sleeping conventioneer is a man in the conventioneer's room. The greeting of the conventioneer is cv-greeting. The litany of the sleeping conventioneer is the Table of Conventioneer Comments. The conventioneer can be lying, hanging or fallen. The conventioneer is lying.

To say snore:
   say "[one of]The resulting snore tells you nothing[or]The snores sound a little deeper[or]The snores sound unimpressed[or]You[']re met with snores[or]He[']s just as talkative as ever[or]The wall might make a better conversation partner[purely at random]."
   
To say give up:
   say "[one of]You give up on the conversation[or]You abandon your line of questioning[or]It[']s clear you won[']t get much out of him, so you stop[or]He doesn[']t seem to mind[purely at random]."
   
To disable all quips:
   disable the cv-menu quip;
   disable the cv-end quip;
   disable the cv-tentacle quip;
   disable the cv-battery quip;
   disable the cv-niceroom quip;
   disable the cv-uncle quip;
   disable the cv-end2 quip;
   disable the cv-thanks quip.
   
Usedquips is a container. Exhaustedquips is a container. Uncle and niceroom are things.
      
Table of Quip Texts (continued)
quip         quiptext
cv-greeting      "'Ahem...' you begin."
cv-menu      "[snore]"
cv-end         "[snore]"
cv-tentacle      "[snore]"
cv-battery      "[snore]"
cv-niceroom      "[snore]"
cv-uncle      "[snore]"
cv-end2         "[snore]"
cv-thanks      "[snore]"
cv-snore      "[snore]"

Table of Quip Followups (continued)
quip      option                                          result
cv-battery   "Nah, didn[']t think so."                              cv-snore
cv-battery   "I wonder where Dr. Fred could have put them?"               cv-snore
cv-battery   "I bet they[']re someplace obvious."                        cv-snore
cv-battery   "Oh, well."                                       cv-snore
cv-niceroom   "It reminds me of a greeting card store I used to work at."         cv-snore
cv-niceroom   "It reminds me of a pack of cards I was very fond of."            cv-snore
cv-niceroom   "Where on Earth do you BUY furnishings this color?"            cv-snore
cv-niceroom   "I[']d better be going now."                           cv-end
cv-uncle   "The steel works next door complained about the noise."         cv-snore
cv-uncle   "He lived in California until he was declared an earthquake hazard."   cv-snore
cv-uncle   "Once he inhaled a pillow."                           cv-snore
cv-uncle   "I[']d better be going now."                           cv-end

Table of Conventioneer Comments
prompt                                             response      enabled
"Late night?"                                          cv-menu      1
"Do you ever inhale flies when you snore like that?"               cv-menu      1
"Are you interested in particle physics?"                        cv-menu      1
"Oh, never mind."                                    cv-end         1
"I[']m trying to save the world from a nasty tentacle."               cv-tentacle      0
"You haven[']t seen any plans for a super-battery around, have you?"   cv-battery      0
"Nice room you[']ve got here."                              cv-niceroom      0
"I had an uncle who snored as loud as you do."                  cv-uncle      0
"Well, never mind."                                    cv-end2         0
"Well, thanks, you[']ve been really helpful."                     cv-thanks      0

After quipping when the current quip is cv-menu:
   disable all quips;
   enable the cv-tentacle quip;
   enable the cv-battery quip;
   if a random chance of 1 in 2 succeeds:
      if uncle is not in exhaustedquips:
         enable the cv-uncle quip;
      otherwise:
         if niceroom is not in exhaustedquips:
            enable the cv-niceroom quip;
   otherwise:
      if niceroom is not in exhaustedquips:
         enable the cv-niceroom quip;
      otherwise:
         if uncle is not in exhaustedquips:
            enable the cv-uncle quip;
   enable the cv-end2 quip.
   
After quipping when current quip is cv-tentacle or current quip is cv-battery or current quip is cv-niceroom or current quip is cv-uncle:
   if something is in usedquips:
      disable the cv-end2 quip;
      enable the cv-thanks quip.
   
After quipping when the current quip is cv-uncle:
   move uncle to usedquips;
   if niceroom is not in usedquips and niceroom is not in exhaustedquips, enable the cv-niceroom quip.
   
After quipping when the current quip is cv-niceroom:
   move niceroom to usedquips;
   if uncle is not in usedquips and uncle is not in exhaustedquips, enable the cv-uncle quip.
   
After quipping when current quip is cv-end or current quip is cv-end2 or current quip is cv-thanks:
   disable all quips;
   if uncle is in usedquips, move uncle to exhaustedquips;
   if niceroom is in usedquips, move niceroom to exhaustedquips;
   repeat with item running through things in usedquips:
      remove the item from play;
   enable the cv-menu quip;
   enable the cv-end quip;
   terminate the conversation.


Top
 Profile Send private message  
 
PostPosted: Sat Jun 02, 2012 5:23 pm 
Offline
User avatar

Joined: Mon Oct 03, 2011 12:03 pm
Posts: 636
Location: Stoke Barehills
It's looking good! Will you be limiting commands to the 9 verbs that DOTT uses? Also, have you considered putting the inventory in a side window?


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group