Threaded Conversation extension needs testers

It uses Smarter Parser, but the bit that handles reparsing in Smarter Parser is fairly simple. I think Chris was already removing the dependency.

Here’s something you might like. I was finding the inform code way to verbose to be conductive to good writing, and the conversation builder too annoyingly thurough, so I threw together a compiler that takes this

[code]
supplies Gus
{
//The stolen hat conversation arc
@ where did you put my hat?
#comment “Gus, my hat is gone. I know you stuck it somewhere.”
#response Gus won’t look you in the eyes. “I didn’t touch it, swear to God.” You don’t believe him. You have it on good authority that he is, in fact, an athiest.

follows
{
	@ I saw you with it. 
	#comment "I saw you with my hat!" you shout. No point in hiding your anger from a thief.
	#response "Whoa whoa!" Gus says, holding his hands up before him. He's actually wearing your hat right now.
	
	follows
	{
		@ snatch the hat! 
		#comment You grab your hat from off Gus' ugly head.[perform now the hat is held by the player.]
		#response "Uh," Gus says. "You might want to check that for lice."
	}
}

}[/code]

And compiles it into this Inform7 code

[spoiler][Quips compiled by Conversation Compiler]

Quip0000 is a privately-named questioning quip.
The printed name is “where did you put my hat”.
Understand “where”, “did”, “you”, “put”, “my”, “hat” as Quip0000.
The comment is “‘Gus, my hat is gone. I know you stuck it somewhere.’”.
The response is “Gus won’t look you in the eyes. ‘I didn’t touch it, swear to God.’ You don’t believe him. You have it on good authority that he is, in fact, an athiest.”.
It quip-supplies Gus.

Quip0001 is an privately-named informative quip.
The printed name is “I saw you with it”.
Understand “I”, “saw”, “you”, “with”, “it” as Quip0001.
The comment is “‘I saw you with my hat!’ you shout. No point in hiding your anger from a thief.”.
The response is “‘Whoa whoa!’ Gus says, holding his hands up before him. He’s actually wearing your hat right now.”.
It quip-supplies Gus.
It indirectly-follows Quip0000.

Quip0002 is a privately-named performative quip.
The printed name is “snatch the hat”.
Understand “snatch”, “the”, “hat” as Quip0002.
The comment is “You grab your hat from off Gus’ ugly head.[perform now the hat is held by the player.]”.
The response is “‘Uh,’ Gus says. ‘You might want to check that for lice.’”.
It quip-supplies Gus.
It indirectly-follows Quip0001.[/spoiler]

It doesn’t seem like much, but compare this much larger conversation

[spoiler][code]supplies Gus
{
@ATTACK what happened to Sam?
# “What happened to Sam?” you ask. “Do you know where he is?’”.
# “Sorry Doc,” Gus says, through the crackle of radio interference. “You’re the first one who’se gotten on the radio since we were attacked.”

@ what happened to Ashley?
# "Have you seen Ashley? Is she alright?" you ask. You try not to let your worry show in your voice.
# "You're the first one I've gotten on the radio since the attack, Doc," Gus replies. "I haven't seen anyone."

follows
{
	@ I don't remember much of the attack.
	# "I don't remember much of what happened, Gus," you say. "I remember seeing some ships, and then.. I think I hit my head hard enough to forget some things."
	# "I'll fill you in then. We came out of the jump, right? There was already a firefight in front of us. A bunch of big Click ships and an Alliance cruiser. I think the cruiser clipped us. Anyway, it couldn't have known with all that chaos."
	#follows ATTACK
}

@ where are you now?
# "Where are you now, Gus?" you ask. "Is your air holding out?"
# "Got no air. Got a suit, though. I'm fine for now," Gus says. "I'm in the cockpit. Captain's up here too. Got a great view."

follows 
{
	@ what can you see from the cockpit?
	# [if immediately]"Yeah?[otherwise]You have a great view, huh?[end if] What can you see from there?"
	# "Nothing, mostly," Gus says. "We're in some kind of hanger. I think it's the Antioch, but stuff's not quite right. For example, none of the lights are on. It must have taken us on board."

	follows 
	{
		@ I've never heard of the Antioch.
		# "Antioch? I've never heard of it."
		# "Oh," Gus says, "She's that big cruiser we almost ran into when we entered the system. Big Alliance ship. Jupiter class."

		follows
		{
			@ what do you know about the Antioch?
			# "Can you tell me anything else about the Antioch?" you ask.
			# "Not much, no." Gus is momentarily lost in static. "She's Jupiter class, which means big. It's a military ship, of course. It's not like they give tours. I haven't heard anything specific about the Antioch, but Jupiter class ships are supposed to be fast. Well. For their size."

			follows
			{
				@ what makes a Jupiter class ship so fast?
				# "Jupiter-class ships are fast?" you ask. "What's unigue about their engines to make them so fast?"
				# "Oh, nothing," Gus says. "They're just too big. Take this bucket, for example. She has tiny engines for her size, so she's slow as hells balls. The Jupiter's have huge engines. Of course, they have that top-secret power plant to run them. All we've got is an ordinary fusion box."
			}

			@ Didn't the Antioch fire on the colony?
			# "I'm sure I saw the cruiser firing on the colony. Why would an Alliance ship do that?" 
			# "Beats me, Doc," Gus says. "Maybe she's not an Alliance ship anymore? I thought I saw her fire on the Clicks too."
		}
	}

	@ can I speak to the Captain?
	# [if immediately]"Alright Gus, can I talk to him?"[otherwise]"Do you mind if I talk to the Captain for a bit, Gus?"[end if] you ask.
	# "Oh, Captain's dead," gus says. "Probably should have mentioned that."

	follows
	{
		@ can anyone else fly this ship?
		# "Can anyone besides the Captain fly this ship?[if immediately] Not trying to be calous, but this is important.[end if]"
		# "I reckon I can. Sal has flown her before. Flying isn't hard, you know. You really just tell the computer where you want to go."

		@ how did the captain die?
		# [if immediately]"Oh, damn. How did he die?" you ask.[otherwise]"How did the Captain die, Gus?" you ask.[end if]
		# "Lost air pressure. I got into my suit in time. Captain wasn't so lucky."
	}
}

}[/code][/spoiler]

with the generated code

[spoiler][Quips compiled by Conversation Compiler]

Quip0000 is a privately-named questioning quip.
The printed name is “what happened to Sam”.
Understand “what”, “happened”, “to”, “Sam” as Quip0000.
The comment is “‘What happened to Sam?’ you ask. ‘Do you know where he is?’’.”.
The response is “‘Sorry Doc,’ Gus says, through the crackle of radio interference. ‘You’re the first one who’se gotten on the radio since we were attacked.’”.
It quip-supplies Gus.

Quip0001 is a privately-named questioning quip.
The printed name is “what happened to Ashley”.
Understand “what”, “happened”, “to”, “Ashley” as Quip0001.
The comment is “‘Have you seen Ashley? Is she alright?’ you ask. You try not to let your worry show in your voice.”.
The response is “‘You’re the first one I’ve gotten on the radio since the attack, Doc,’ Gus replies. ‘I haven’t seen anyone.’”.
It quip-supplies Gus.

Quip0002 is an privately-named informative quip.
The printed name is “I don’t remember much of the attack”.
Understand “I”, “don’t”, “remember”, “much”, “of”, “the”, “attack” as Quip0002.
The comment is “‘I don’t remember much of what happened, Gus,’ you say. ‘I remember seeing some ships, and then… I think I hit my head hard enough to forget some things.’”.
The response is “‘I’ll fill you in then. We came out of the jump, right? There was already a firefight in front of us. A bunch of big Click ships and an Alliance cruiser. I think the cruiser clipped us. Anyway, it couldn’t have known with all that chaos.’”.
It quip-supplies Gus.
It indirectly-follows Quip0001, Quip0000.

Quip0003 is a privately-named questioning quip.
The printed name is “where are you now”.
Understand “where”, “are”, “you”, “now” as Quip0003.
The comment is “‘Where are you now, Gus?’ you ask. ‘Is your air holding out?’”.
The response is “‘Got no air. Got a suit, though. I’m fine for now,’ Gus says. ‘I’m in the cockpit. Captain’s up here too. Got a great view.’”.
It quip-supplies Gus.

Quip0004 is a privately-named questioning quip.
The printed name is “what can you see from the cockpit”.
Understand “what”, “can”, “you”, “see”, “from”, “the”, “cockpit” as Quip0004.
The comment is “[if immediately]‘Yeah?[otherwise]You have a great view, huh?[end if] What can you see from there?’”.
The response is “‘Nothing, mostly,’ Gus says. ‘We’re in some kind of hanger. I think it’s the Antioch, but stuff’s not quite right. For example, none of the lights are on. It must have taken us on board.’”.
It quip-supplies Gus.
It indirectly-follows Quip0003.

Quip0005 is an privately-named informative quip.
The printed name is “I’ve never heard of the Antioch”.
Understand “I’ve”, “never”, “heard”, “of”, “the”, “Antioch” as Quip0005.
The comment is “‘Antioch? I’ve never heard of it.’”.
The response is “‘Oh,’ Gus says, ‘She’s that big cruiser we almost ran into when we entered the system. Big Alliance ship. Jupiter class.’”.
It quip-supplies Gus.
It indirectly-follows Quip0004.

Quip0006 is a privately-named questioning quip.
The printed name is “what do you know about the Antioch”.
Understand “what”, “do”, “you”, “know”, “about”, “the”, “Antioch” as Quip0006.
The comment is “‘Can you tell me anything else about the Antioch?’ you ask.”.
The response is “‘Not much, no.’ Gus is momentarily lost in static. ‘She’s Jupiter class, which means big. It’s a military ship, of course. It’s not like they give tours. I haven’t heard anything specific about the Antioch, but Jupiter class ships are supposed to be fast. Well. For their size.’”.
It quip-supplies Gus.
It indirectly-follows Quip0005.

Quip0007 is a privately-named questioning quip.
The printed name is “what makes a Jupiter class ship so fast”.
Understand “what”, “makes”, “a”, “Jupiter”, “class”, “ship”, “so”, “fast” as Quip0007.
The comment is “‘Jupiter-class ships are fast?’ you ask. ‘What’s unigue about their engines to make them so fast?’”.
The response is “‘Oh, nothing,’ Gus says. ‘They’re just too big. Take this bucket, for example. She has tiny engines for her size, so she’s slow as hells balls. The Jupiter’s have huge engines. Of course, they have that top-secret power plant to run them. All we’ve got is an ordinary fusion box.’”.
It quip-supplies Gus.
It indirectly-follows Quip0006.

Quip0008 is a privately-named questioning quip.
The printed name is “Didn’t the Antioch fire on the colony”.
Understand “Didn’t”, “the”, “Antioch”, “fire”, “on”, “the”, “colony” as Quip0008.
The comment is “‘I’m sure I saw the cruiser firing on the colony. Why would an Alliance ship do that?’”.
The response is “‘Beats me, Doc,’ Gus says. ‘Maybe she’s not an Alliance ship anymore? I thought I saw her fire on the Clicks too.’”.
It quip-supplies Gus.
It indirectly-follows Quip0005.

Quip0009 is a privately-named questioning quip.
The printed name is “can I speak to the Captain”.
Understand “can”, “I”, “speak”, “to”, “the”, “Captain” as Quip0009.
The comment is “[if immediately]‘Alright Gus, can I talk to him?’[otherwise]‘Do you mind if I talk to the Captain for a bit, Gus?’[end if] you ask.”.
The response is “‘Oh, Captain’s dead,’ gus says. ‘Probably should have mentioned that.’”.
It quip-supplies Gus.
It indirectly-follows Quip0003.

Quip0010 is a privately-named questioning quip.
The printed name is “can anyone else fly this ship”.
Understand “can”, “anyone”, “else”, “fly”, “this”, “ship” as Quip0010.
The comment is “‘Can anyone besides the Captain fly this ship?[if immediately] Not trying to be calous, but this is important.[end if]’”.
The response is “‘I reckon I can. Sal has flown her before. Flying isn’t hard, you know. You really just tell the computer where you want to go.’”.
It quip-supplies Gus.
It indirectly-follows Quip0009.

Quip0011 is a privately-named questioning quip.
The printed name is “how did the captain die”.
Understand “how”, “did”, “the”, “captain”, “die” as Quip0011.
The comment is “[if immediately]‘Oh, damn. How did he die?’ you ask.[otherwise]‘How did the Captain die, Gus?’ you ask.[end if]”.
The response is “‘Lost air pressure. I got into my suit in time. Captain wasn’t so lucky.’”.
It quip-supplies Gus.
It indirectly-follows Quip0009.[/spoiler]

Well, I’m not quite sure why it wouldn’t before, but somehow making that last change to “about” this time made it all work. Thanks again for all your help, Blecki!

That does look like an interesting tool, though some CB features are missing – especially the lack of escaping of trouble quip names will be problematic. Wait, you’re not using quip names. Keeping track of quips, then, seems like it could become a nightmare – I’d at least add comments to every line that mentions another, "It indirectly-follows Quip0009. [can I speak to the Captain] " etc.

Is this similar to the system she used for City of Secrets? If so, I’ll definitely test it on my project. I have 5 characters, and a variety of topics that each one can talk about, and am dreading sticking the player with a “guess the noun/verb” game.

Hi Chris–

this sounds like precisely what I need.

I’m working on a game with 5 interactive characters, and I want the player to be able to engage them in conversation about topics.

I created a dozen tables of topics/replies, and realized that the player may not be able to think of all topics/ask engaging questions without either insane levels of specificity on my part, or an hour of “guess the verb/noun” nonsense. I’d rather implement something like Emily Short’s City of Secrets (a set of topics the player can guess at/infer, with specific conversation branches).

It seems like your plugin does much of that–? If so, I’d love to beta test it. Am I accurate in my assessment of it?

Yeah, that seems right. I haven’t actually played City of Secrets but I’ll check it out. More recently, she used the system in Alabaster and Counterfeit Monkey.

After trying CoS, yes, the system is similar. It’s all text-based in a single window though, but it should be possible enough to put into a menu-based system, for example.

Thanks, but I actually think the system is ready for release. I submitted it to the I7 site a week ago but apparently the maintainer is on vacation? Anyway you can download Threaded Conversation from my site in the mean time. Let me know how it goes for you!

The thing I enjoyed about this extension is it also included a “Conversation Builder” helper extension which allows you to play the game and type in natural lines of dialog which would prompt the game to ask you some questions and then spit out the code to include that exchange in the game. Is that still part of it?

EDIT: Yes it is. I may give these another whirl.

Yes, it is the last link on that page. Not quite as extensively tested – I don’t have the I6-fu to know why the external file writing isn’t – but it otherwise works as intended.

The examples don’t seem to be working. Is something wrong?
For example in “Not So Simple”:

[code]A wanderer in grubby trousers slouches at the seat nearest the fire.

test me
(Testing.)

[1] talk to the wanderer
You say hello to the wanderer.

You could ask whether the rumors tell truly.

[2] ask him about the rumors
You’re not talking to the wanderer.

[3] ask what he knows
That doesn’t seem to be a topic of conversation at the moment.

[4] g
That doesn’t seem to be a topic of conversation at the moment.

[5] g
That doesn’t seem to be a topic of conversation at the moment.

[6] g
That doesn’t seem to be a topic of conversation at the moment.

[7] ask whether i may see the miniature
That doesn’t seem to be a topic of conversation at the moment.[/code]

Try asking him about rumors, but not about THE rumors.

That’s the TEST ME command!

Hmm, I’m not able to reproduce that, Hanon. Are you using any other extensions?

Alternately, I think I might have uploaded an old version of TC to the site – try the link now.

I started playing Counterfeit Monkey to see how the system works there–it is good, and I think it will work for me. (Also, Counterfeit Monkey is amazing. I can’t believe I never played this before.)

Thanks for your hard work! I’ll try out the extension.

Oh dear. I’ve had so much trouble with ‘the’ that I just strip it from input in all cases now. Thought it might be that sort of problem.

I just wanted to tell Chris that this extension is simply SUPREME (thanks to Emily and the rest, too, ofc!).
And the Conversation Builder is an act of genius.

Thanks a lot.

I don’t know if this has been found before. It’s a bit late here, and I’m not in the mood to search all this loooong thread, so:

I think TC is fighting with Custom Library Messages by David Fisher.

Following the error I get:

[code]This is the report produced by Inform 7 (build 6G60) on its most recent run through:

In Book 3 - Greeting Protocols, Chapter 2 - Saying Goodbye in the extension Conversation Framework by Eric Eve:

Problem. You wrote ‘now the current interlocutor is nothing’ , but although ‘current interlocutor is nothing’ is a condition which it is legal to test with ‘if’, ‘when’, and so forth, it is not something I can arrange to happen on request. Whether it is true or not depends on current circumstances: so to make it true, you will need to adjust those circumstances.
See the manual: 8.11 > Now…
I was trying to match this phrase:

(current interlocutor - object) is nothing
This was what I found out:

current interlocutor = a non-temporary variable, holding an object[/code]

I remove the inclusion of CLM and the game compiles.
Hope this helps.

Hmm, no. I haven’t used Fisher’s Custom Library Messages, but I wonder if it creates some new syntax for defining truth states, much like Ron Newcomb’s The Parser does?

In any case, it’s years out of date; I believe Newcomb has taken over that extension and his version is much more memory-efficient, to boot. I’d try replacing that with Newcomb’s version and see if it still conflicts.

I think the culprit is this line from Custom Library Messages:

To decide whether (x_ - an object) is nothing: (- {x_} == nothing -).

That seems like it probably eats any attempt to use “is nothing” in a “now” phrase.

In any case, ChrisC is correct that Fisher’s extension is out of date; I noticed that it uses the “change… to…” syntax, which is deprecated. So it won’t compile at all in the next update.

Great, people. Thanks a lot!

I go check the other Extension and will report back.

[edit]

…Aaaaaand it compiles!

Thanks a lot a sorry wasting your time.

I’m having trouble with a subject that I can’t seem to resolve.

I have a backdrop called “some music”. At one point I had a quip made with conversation builder where I said it mentioned “the music”, and it spit this out as a subject to add. I added it, and naturally it clashed with “some music”. So I’ve been through the quips and changed any references to “the music” the subject to “some music” the backdrop object in the game. Unfortunately now, whenever I run the game, it always first says “The music is a subject.” prompting me to add it. I can’t add it since it clashes with the other music object, and he quips all work fine without it. Is there any way to…I don’t know, flush this from the cache somehow of subjects it wants to add?

That’s not asking you to add it. It’s just listing all the declared subjects. It should not appear when releasing.