Pondering how to do conversation…

Hybrid Choices does. It’s based on (gamebook) pages, and rules can be set to fire for any given page.

Some code for HC
include hybrid choices by aw freyr.


lab is a room.
egg is a thing.
key is a thing.

instead of looking for the first time:
	switch to cyoa at gremlin.
	
gremlin is a page.
"The gremlin smiles wickedly. 'So. Will you take the key or the plover's egg?'"

pEgg is a page. it is a dead-end. it is a one-off. it is for gremlin.
the cdesc is "Plover's Egg".
"'I thought you might say that,' it titters. 'Here, it's yours.'".

a page-toggle for pEgg:
	now the player holds the egg;
	now the current page is next page.

pkey is a page. it is dead-end. it is a one-off. it is for gremlin.
the cdesc is "Shiny Key".
"'I thought you might say that,' it titters. 'Here, it's yours.'".

a page-toggle for pkey:
	now the player holds the key;
	now the current page is next page.
	
next page is a page. it is an end-page.
"The gremilin smiles. 'I hope you do not regret your choice!' He disappears with a laugh.".

The pages approach could get unwieldy in an elaborate system tracking (considering what has been mentioned and the like). I do some of that in my project. It’s fine, but I’m not sure how far I’d want to take that. Hybrid Choices isn’t necessarily built for it.

2 Likes

Other extensions might work better for you, so I’m definitely not trying to sell you on QBC or anything, but disabling the other character-interaction verbs isn’t a critical part of the extension by any means - if you need the ordering-NPCs around functionality, you can just comment out a single line of code and get it back.

And yeah, breaking up the table with “continued” so the pieces are more workable is exactly what I did; given the way Inform treats tables it’s almost indistinguishable from using discrete ones.

I assume by “comment out” you mean The reject commanding for talking rule is not listed in any rulebook..

I’m even contemplating using Reactable Quips without QBC. Still considering the details, but I have a half-formed vague idea that involves fusing Reactable Quips with Eric Eve’s Conversation Responses.

1 Like

That would be the cleaner way to do it, but I just meant directly editing the extension code (which is not a best practice of course, but I am not a very good programmer!)

Ah, I basically don’t edit extensions unless they’re my own or there’s updating required (though if there’s an update required I’d first seek one from Friends of Inform). Even if I find a bug I’ll usually use static assertions (sometimes a section replacement) to patch it.

1 Like

I was actually surprised how powerful and flexible Hybrid Choices is. I used it for conversations and complicated interactions (bookselling and haggling in Fair). The main hurdle is it works slightly backwards from what you expect - instead of creating a page (akin to “passage” in Twine) and setting the choices there that lead to other pages, you specify in the destination pages that there is a link there from another page.

The “it is for gremlin” line says “this page is linked to from the gremlin page” so the cdesc (“choice description”) will show up on the gremlin page with the numbered text “Plover’s Egg”. You could specify a page is for multiple pages (which will insert its choice link into all of them) for all pages (Like an inventory link so they can choose it from any CYOA page) or “it is for outdoor pages” where you’ve made a kind of “outdoor page” with multiples.

This is how you switch back and forth between pages with numbered choices and normal parsing. In this case the initial “look” in the first room will immediately show the gremlin page and offer its choices. I found myself doing things like “Instead of doing anything to the complicated machine: switch to cyoa at compmachine.” so instead of the guess-the-verb-ing the complicated machines, I could present menu choices like “start the machine” “change the oil” “fibber the ungot gear”…

A page-toggle rule changes the world state when the player reads a page.

Dead-end pages jump back to the previous page and let the player choose again.
End-page sends the player back to normal parsing.
Pages can cancel each other to remove their choices from play, or activate and deactivate other pages.

A choice-switch rule for the banana page:
		unless the player carries a banana:
			rule fails.

choice-switch lets there be rule-logic whether a choice is displayed or not. Any pages the “banana page is for” will not show the menu option for the banana page anywhere unless the player carries a banana.

The thing I really found freeing is you can use normal Inform 7 text variation to make the choices less repetitive.

The cdesc is "[one of]You should pick up that sock.[or]That sock you forgot is still lying here.[or]Your roommate is gonna get really mad if they see that sock hasn't moved.[cycling]".

The page text itself can be manipulated with all the usual Inform tools.

2 Likes

The syntax feels a little awkward, but it’s probably worth trying it out.

I agree, that’s why it’s a bit of a hurdle at first until you sort out the mechanic in your brain. Most choice engines have you specify links out of a passage, where with Hybrid Choices you’re creating rules about how the player links in to individual pages, so each page is potentially valid to be linked to from anywhere. This becomes really helpful if you’re creating a system or an entire game that leans QBN instead of branching choices.

For example, a card-battle system where each page is a monster card could have a “cast ‘growth’ on this monster” cdesc that appears on every other monster card and resolves the spell via another page with a page-toggle.

Come to think of it, the new dialogue system being added to Inform was sort of like that… it’s too bad I can’t use it (unless I want to build Inform myself which I’d prefer not to do).

Hmm? But, wait a second. There isn’t any actual difference between specifying a link “in” and a link “out”, is there? It’s just the inverse relation. If Hybrid Choices says To be for means the linking relation., then you could surely write To lead to means the reversed linking relation. and then write gremlin leads to pEgg. instead of pEgg is for gremlin… right?

I actually helped test and contributed documentation for Hybrid Choices, and that’s the way we always did it, but I suppose if the relation has an inverse you could do it that way as well.

I’ve looked at 3 options (Reactable Quips, Hybrid Choices, and Threaded Conversation) in some detail (by which I mean, reading through the documentation). I’m still unsure what’s best though.

  • Hybrid Choices and Reactable Quips can give numbered choices, which seems good for more complex responses… though, the way Threaded Conversation can handle complex responses also isn’t too bad.
  • Hybrid Choices by default locks you in when a page is active, so you have to pick a choice. It looks like disabling that can be a bit of work, depending on the details[1].
  • From what I can tell, Reactable Quips can either lock you in or not – it’s just a matter of whether the quip has a followup. I think it can leave choices available to be picked even if you’re not locked into giving a response; not sure how that compares to Hybrid Choices.
  • Reactable Quips seems to be the simplest to set up, but is a bit too table-based for my liking. Though the Table of Quip Texts could easily be ignored (as it’s never referenced) and quips could instead be defined by assertions, the Table of Quip Followups and the table of Ask Results and the Table of Tell Results can’t be.
  • Threaded Conversation has a ton of stuff in it, which makes it seem like a great option if conversation is a central point of the game. I think it would probably be the best choice for the other game I left on the back burner, as that one requires you to talk to people and locate all the clues; but I’m not so sure if it’s a good fit for the game I’m currently working on. It’s pretty overwhelming.
  • Threaded Conversation also has a Table of All Known Facts, but as with Reactable Quip’s Table of Quip Texts, it would be easy to ignore it and define facts via assertions instead, as the source never actually references the table.
  • Conversation Responses is simple, but maybe a little too simple. Every possible thing you can ask about is a separate rule. It’s probably good for a game where conversation is more of an afterthought, but I don’t think that describes my game. There may be barely any conversation now, but there are a bunch of stubs where conversation needs to be filled in.

The two instances of conversation that already exist are “sidekick wakes up and asks what’s going on” and “sidekick found something interesting while exploring another room”. There’s also an instance of someone thanking you for returning a lost item, and though none of these are implemented yet, there are several shops. It doesn’t seem like all the bells and whistles of Threaded Conversation would be needed for any of that. Though they also wouldn’t hurt.

I think the most important question now would be, “do I want numbered choices?”. But as of yet I can’t think of any strong reason to want them, nor any strong reason to want to avoid them.


  1. There’s a rulebook to determine what commands are allowed while a choice is active. If you want to be very restrictive and just whitelist a few more, or if you want to be super permissive and allow everything, both would be easy. Though I don’t know if the latter would cause issues. ↩︎

1 Like

If you want to highlight key words as a cue for the player to type them, Aaron Reed has a keywords extension that does that. So you can do something akin to a Twine game, where the game text says,

The giant mouse says, “Should I should wear the red tie or the green tie?”

And the player, seeing that “red tie” and “green tie” are highlighted as key words, can type just

green tie

without having to type “say” or “ask about.”

I’m pretty sure you’d have to combine it with a conversation extension.

Actually, I saw the keyword highlighting in Counterfeit Monkey and thought it seemed like a great idea. I’ll try out that extension too.

Doesn’t really help much with the question of how conversation is handled though.

I think questions that might help you pick are:

  • How does your intended audience expect conversation to happen?
  • How much of the work you put into the system will be visible or enjoyable to the player?

I recently played a game where you were intended to unlock new content by sitting on a pew in a cathedral and praying. In normal Inform, ‘sit on’ and ‘enter’ are synonyms. I typed ‘enter pew’ and prayed and it said ‘nothing happens’.

It turns out the author used Postures by Emily Short which distinguishes sitting and standing, and they didn’t code any special response for standing. I’m sure in their mind they thought, “I’m making the game more realistic!” but they didn’t communicate that to the player. So not only does no one have any idea how clever the code was (it’s all invisible anyway), it introduced new problems.

You can’t guess how people will react, so you might as well see. Why not make a version of the game with Threaded Conversations, have someone play it, and see if they like it? Or a Hybrid Choices version and see if that’s fun? Will someone even want to stop in the middle of a conversation, take an action, and return to the conversation afterwards?

Here’s a more specific question I have, unrelated to the above: are you the kind of author who gives 5 options but wants people to read all of them? Like:
1)tell me about the butler
2)tell me about the cook,
etc.
6)I’m done with this conversation.

Or are you the kind of author who wants to do a branching conversation where people pick how to react? i.e.

  1. Curse you, Dr Livingstone!
  2. Perhaps we can come to an agreement

Or do you want people to learn about magic words? Like:
>Ask Superman about Martha
“How did you know that name? Tell me!”

Because each of these systems is tailored more towards one of this type of conversation than the others.

Edit:
Looking back at what you posted earlier, if you have several shops, then it sounds like you’ll want Conversation Style #1 for that. To me, that sounds like Hybrid Choices is probably the strongest option.

4 Likes

(Hmmm, what game might have caused you to sit on a pew to pray.)

This thread has caused me to think about how conversation is used in IF… IMHO, you want to use the minimum of conversational complexity necessary to accomplish what you want the conversation to accomplish. This is only because I think more complex conversational constructs pull me out of the game… I like to stay immersed in the fiction (be it a book, a movie, or an IF)… so if you need a more advanced choice based system to help handle a shop, then sure, do that… but if the interaction is more to pass along some minor info, standard simple IF tools may suffice. I could see you using different types of conversation in a very large game since some interactions require it, and others don’t… (although perhaps that would get confusing to the player)…

Just my two cents,

Greg

2 Likes

Do I really have to have an intended audience? I really haven’t thought about who might want to play it.

This is a good question, but a really hard one to answer…

Oh, that’s something I’ll have to be careful of too, since I’m using that extension. I’m pretty sure they could’ve made that interaction seamlessly work by adding one little extra assertion to make the pews default to sitting, but… I guess they just forgot to do that.

This is definitely a thing I’ve been considering doing – try integrating each plugin into the “wakes up and asks what’s going on conversation” and see how it plays. The amount of work in integrating one of them is putting me off a little, but… I think I am going to do it.

Well, this depends on exactly what the words you’ve said mean.

There will definitely be places where the player will want to (or rather, is expected to) take a command in the middle of conversation. For example, showing the person a particular item. I haven’t decided how shops work yet, but buy <item> is one possible way, so that also works out to potentially a command in the middle of conversation. On the other hand, this is limited to a few specific commands. Will the player want to pick up random items in the room and then return to conversation? Though not impossible, it seems unlikely.

Hmm. I think I’d want to throw in some unimportant options that they don’t need to pick, so I guess that’s a “no”?

I don’t have any specific ideas in mind that would require a one-time choice, but it seems like something that would be good to have available.

Not too fond of the magic words method. It might be okay for one or two puzzles, I suppose.

Hmm, so you’re implying that shops are best done with numbered choices, is that correct? Can you explain why the existence of several shops makes Hybrid Choices the strongest option?

1 Like

Strangely enough, I did wonder whether I should mix ask/tell for more minor interactions with menu-based for bigger conversations. But as you say, that might be a little confusing…?

1 Like

The reason I thought of number options for shops is because I’ve seen something like it in a few games, where there are a lot of items you could potentially buy, so you have a numbered menu that you return to often where you can select things. This isn’t the best example of that, but here’s a game with a menu-based shop from an IFComp-winning game:

I thought of Hybrid Choices because I’ve seen it recommended a lot in recent years, and one author put out two IFComp winning games with it (Steph Cherrywell). It looks like Taco Fiction above though was written with Reactable Quips and Quip-based Conversation, so I may just not know what I’m talking about.

Here is Rogue of the Multiverse, one of my top 20 favorite games of all times and a 2nd place IFComp game (screenshot from a club floyd transcript):

It’s in TADS, so that won’t help much.

(BTW I’m emphasizing high-placing games because that’s something I value. You may not value that at all, and that’s okay!)

Even games that don’t use menus still have shops that manage to feel fairly menu-based:

(I should mention that I was intimidated by conversation systems and extensions and ended up making my own from scratch just so I could avoid having to learn anyone else’s. It’s not too hard to make your own, if that’s something you’re interested in. It just needs thorough testing if you do do it.)

2 Likes

So, I managed to script the same conversation using both Reactable Quips and Hybrid Choices. It was easier to make it work with Reactable Quips – I couldn’t get Hybrid Choices to remove a no-longer-relevant choice as part of a rule triggered by another action. It would remove it on the next turn, but that still left the choice that should be dead there for one extra turn. If not for that, the exact same sequence of commands would be able to get me through both the RQ and HC versions of the conversation.

Debating whether to try scripting it with Threaded Conversations or Conversation Responses for comparison purposes.

Actually considering this. Both RQ and HC feel a little clumsy in the setup – RQ because of all the tables, HC because of some unnatural wording it forces on you. sidekick-fired-up is an end-page page is quite the strange thing to be saying (why is end-page a property and not a kind of page), and The cdesc of is just awful (why couldn’t they just call it the choice description or prompt or something like that?).

When it comes to allowing commands in the middle of conversation, it’s easier to do with RQ. The reason for this is that HC blocks commands at the parser stage, when the action is not yet known. In contrast, RQ blocks them in the Before stage, after parsing has finished. So, in HC, I would practically need to duplicate my Understand rules for the custom action, which is kinda awful.

On the other hand, x is a page. "This is what the person says." is pretty much the ideal way of setting up the conversation. I think Threaded Conversation also uses a similar method though.

Anyway, the point is, I am seriously considering building my own that takes the best parts of RQ and HC. Though that’s assuming I don’t try out Threaded Conversation and immediately love it, or something.

2 Likes

I scripted up the conversation with Eric Eve’s Conversation Responses and was getting started on scripting it in Chris Conley’s Threaded Conversation when I ran into some weird adjective conflicts.

Somehow, these two definitions in two different extensions are considered to be in conflict:

Definition: a person is other if it is not the player.

Definition: a person is other if he is not the player.

They remain in conflict even if the “it” or “he” is changed so that they both match.

And these two are also considered to be in conflict, even though they apply to completely different kinds:

Definition: a quip is viable if it is in the quip-repository.

Definition: a direction (called thataway) is viable if thataway from the location is viable for the player.

(thataway from the location is viable for the player is a custom To phrase that I defined.)

Not sure how I’m supposed to proceed from here…

EDIT: Oh, right, I should probably post the error message?

Problem. You wrote ‘a direction (called thataway) is viable if thataway from the location is viable for the player’, but ‘thataway’ is a temporary name for a quip (created by ‘let’ or ‘repeat’), whereas I was expecting to find a direction there.

I was trying to match this phrase:

(thataway - direction) from (location - room) is viable for (player - person) :cross_mark:

I recognised:

thataway = a temporary named value, holding a quip
location = a non-temporary variable, holding an object
player = a non-temporary variable, holding a person

So in summary, somehow the existence of the other definition leads Inform to think that the variable I declared to be a direction is, in fact, actually a quip.

1 Like