How do you display the topic you can ask to a person?

I want my player to know the questions they can ask to a person in the game. I have made a table of response. This has topics(questions) and responses the computer will give once you ask. I want the player to know what they can ask to the program, in order to get a response.


Topics can’t be printed out. (A topic can include a lot of messy variants, and you wouldn’t want to print out “gold/golden ring”.) The best option is to add a third column to the table which contains printable text.

1 Like

Try using Conversation Package by Eric Eve (you can find the source for this extension on the internet - just search up “inform 7 conversation package eric eve” and it’ll probably come up). It includes a handy-dandy system for suggesting things like that.

(Note: You’ll also have to download Conversation Framework, Conversation Nodes, Conversation Responses, Conversation Suggestions, and Conversational Defaults. They’re also by Eric Eve.)


Hi Desiree…this should get you started.

"test" by Ade

Library is a room.
Kitchen is a room.

A person can be chatty or silent. A person is usually chatty.

Gorden is a person in the Library. 
Sandra is a person in the Library.
Bill is a person in the Library. Bill is silent.

Table of Gorden responses
topic	PrintedTopic	Response
"library"	"library"	"It's over in the west wing of the building"
"kitchen/kitchenette"	"kitchen"	"That right on the other side of the building"

Table of Sandra Responses
topic	PrintedTopic	Response
"lounge"	"lounge"	"I'm not sure"
"hat/cap"	"hat"	"Ooh, I do like a hat"
"dog"	"dog"	"I don't know where my little dog is"

Instead of asking somebody about a topic:
	let conv be a Table name;
	if the noun is silent or the noun is the player:
		say "There's nothing you can ask [the noun] about.";
		If the noun is Gorden:
			let conv be the Table of Gorden Responses;
		if the noun is Sandra:
			let conv be the Table of Sandra Responses;			
		if the topic understood is a topic listed in conv:
			say “[Response entry].”;
			say "[list-topics conv].".

To say list-topics (T - a table name):
	let N be the number of rows in T;
	if N is 1:
		say "You can ask [the noun] about the [PrintedTopic in row 1 of T]";
		say "You can ask [the noun] about ";
		repeat with X running from 1 to N minus 1:
			say "[PrintedTopic in row X of T], ";
		say "and [PrintedTopic in row N of T]".

There’s loads of ways of doing this (of which is one) but it should get you going with Inform syntax…