Menu based conversations

I’m just ready to get started on conversations and am having a bit of trouble finding a good menu based conversation extension. My conversations are going to be quiet complex and branching so I was wondering if there are any suggestions? I would prefer something with a graphical interface but I know that’s probably too much to ask.

I’m really getting into Eric Eve’s conversation extensions, but they aren’t graphical. You can find them on the Inform7 site:

http://inform7.com/extensions/authors/#Eric_Eve

quip based conversation provides a menu to choose from.

“Simple Chat by Mark Tilford”, on the Inform Extension page, provides a menu-based conversation system. I rewrote the system as “Activity Based Simple Chat”, which you can find here: pastebin.com/CrrHxXVy - it’s functionally the same, but by using activities instead of actions, I was able to simplify the process of writing the necessary rules to set up conversations.

As mentioned, “Quip-based Conversation by Michael Martin”, also from the official extension page, is another menu-based chat system. This method uses tables to define conversations (not my preferred method, as I find editing Inform tables with lots of text to be tedious and error-prone).

I tried simple chat but it seems too well… simple. The problem I’m having is I need full control over what conversation choices lead where and to have the flow of the conversation modify certain variables.

I’ll second the recommendation of Michael Martin’s quips extensions. His example included with the extension is illustrative and amusing, too.

Why wouldn’t that be possible with Simple Chat? Its conversations are built up out of rules, and you can put absolutely any code you want in those rules.

Well maybe it’s just how it’s programmed. Maybe a table based system would be better? I really wish I had something visual I could work with when writing out the conversations… because what I’m planning is very interwoven.

Complex conversations can definitely be a challenge. Standard text editors often do not lend well to displaying the nodes in a way that makes total sense.

If using tables is good enough, you could try storing your conversation content in them. It should be compatible with most existing conversation systems. You would have to use something like “say content in row 5 of table of jamesconv” to take text from the table. This way, you can separate the code from the bodies of text. That’s just one way to keep things a little cleaner.

I’ve always felt the table-based systems offer less control over what choices are available and where they lead, because the tables are usually difficult to alter dynamically. (Whereas both versions of Simple Chat use a rulebook to set up choices, so you can specify exactly what you want in any given situation.)

If you’re looking for a visual way to edit the conversation, though, that’s well beyond the scope of any possible extension - it would have to be a separate app outside the IDE.

Depending on what the non-conversational parts of your game require, perhaps you could go all the way to a choose-your-own-adventure format? Twine features a visual editor that lets you see how the nodes are structured.

Soooo… I don’t think I quiet understand how simple chat works, the documentation isn’t very clear… any one mind writing up a quick tutorial?

A comprehensive tutorial is a bit much to ask, I think. What are you trying to do and which part is it that you don’t know how to make?

Here’s a quick example. First I’ll just paste over the whole thing, then go over the important points.

Talking to is an action applying to one thing.
Understand "talk to [something]" as talking to.
Carry out talking to: say "We've got nothing to talk about."

Jimmyhello, jimmychat1 are chat nodes.
jimmychat2 is a sc-once chat node.

Instead of talking to jimmy, run a conversation from jimmyhello.

Report giving text for jimmyhello: say "You exchange some pleasant greetings with Jimmy." instead.
Carry out finding responses to jimmyhello: link to jimmychat1; link to jimmychat2.

Report giving link to jimmychat1: say "Insult Jimmy! " instead.
Report giving text for jimmychat1: say "'You're a real DWEEB, Jimmy! Heh heh!' you say to him.[paragraph break]Jimmy doesn't seem to care." instead.

Report giving link to jimmychat2: say "Ask how he's doing lately. " instead.
Report giving text for jimmychat2: say "'How's it hanging, Jimmy my man?' you ask him.[paragraph break]'I'm just trying to write my great American novel,' he replies." instead.
Carry out finding responses to jimmychat2: link to jimmychat1.

The “talking to” action is not strictly required by simple chat. To actually start the conversation, we need to trigger the line ‘run a conversation from’, which can be caused by nearly any action, text token, or phrase.

Now simple chat needs chat nodes which act as the waypoints in the conversations. In my example, there are three nodes of two different types. A regular “chat node” will always remain active until your code manually tells it to become inactive. A “sc-once chat node” will automatically become inactive after the player chooses it. (There is also sc-shown-once but you probably won’t use that very much.)

Now the rules that describe the behavior of the chat nodes themselves is where it gets a little complicated. Each chat node needs two or three specific rules depending on where it is in the conversation tree.

  1. “Report giving link” rule. This will appear as the menu text presented to the player when this node can be chosen.

  2. “Report giving text for” rule. This is where the content of the conversation plays out when it is chosen. You can also insert other code before or after the ‘say’ to control the activation of nodes and other things. Good for those instances where a decisive conversation choice can effect the world in some way.

  3. “Carry out finding responses to” rule: This defines the player’s possible choices to continue the conversation from this node. If you do not link to any other chat nodes, the conversation will end.

Note how some of the rules for the chat nodes have “instead” in them. These insteads are necessary because without them, simple chat will print unnecessary errors.

Thank you, that was very helpful.

Here’s the same conversation in my version of the extension (Activity-based Simple Chat here: pastebin.com/CrrHxXVy )

"My Simple Chat" by Shadow Wolf

Include Activity-based Simple Chat by Shadow Wolf.

Talking to is an action applying to one visible thing.
Understand "talk to [someone]" as talking to.
Report talking to: say "You have nothing to say.".


The Apartment is a room. Jimmy is a man in the Apartment.

Instead of talking to Jimmy, start a conversation with jimmy-hello.

Jimmy-hello is a chat node. "You exchange some pleasant greetings with Jimmy."

Rule for finding responses to jimmy-hello:
	link to jimmy-chat-1; link to jimmy-chat-2.
	
jimmy-chat-1 is a chat node with quip "Insult Jimmy! ". 
"'You're a real DWEEB, Jimmy! Heh heh.' you say to him.[paragraph break]Jimmy doesn't seem to care."

jimmy-chat-2 is a choose-once chat node with quip "Ask how he's doing lately. ".
"'How's it hanging, Jimmy my man?' you ask him.[paragraph break]'I'm just trying to write my Great American Novel,' he replies."

Rule for finding responses to jimmy-chat-2:
	link to jimmy-chat-1.

Things to note:

Chat nodes are things rather than values. This allows us to assign properties to chat nodes. In particular, the “quip” property is what will (usually) be printed as a menu choice, and the “initial appearance” property contains the response. Inform automatically assigns a plain double-quoted string as the initial appearance of the most recently created thing. So for most simple quip-response nodes, you don’t need to write rules to print the text.

“Finding responses to” is an activity rather than an action. So you don’t have to worry about instead/check/carry out/report rules. You can just write a simple “rule for”, and you can put any code you need in that rule (e.g. allow some choices and not others based on the game world state or previous choices.)

“Giving text for” is an activity as well. The default rule is to print the initial appearance. You can either override this by providing a more specific “rule for giving text” (if the text is going to vary based on the game state), or write before/after rules (if all you want to do is change some flags or whatever).

If the quip’s text is going to change based on game state, you can add rules to the “Showing the link to” activity.

Because these are activities rather than actions, there is no need to include the “instead” keyword in every rule. (Activities execute only the most specific “rule for”, actions execute all applicable “carry out” rules, hence the need for “instead” to override that.)

There are some additional features as well - you can customize the prompt (on a per-node basis, even!), and you can define a followup for a node that’s immediately executed, without showing a menu.

(Additionally, since chat nodes are things, you can define more specialized kinds of chat nodes with additional rules, which could be useful.)

I really like your activity based chat (now that I know how to work it :stuck_out_tongue:), very simple syntax makes me happy.