Redefining built-in text

I’m very new to Inform 7, and I was wondering if there is any way to redefine built-in text? For example, is there way to get the game to say “You have” instead of “You are carrying”?

Much thanks, in advance, for your assistance!

Cheers,
C. Scott Davis

2 Likes

The text in question comes from a pair of Standard Rules:

Carry out taking inventory (this is the print empty inventory rule):
	if the first thing held by the player is nothing,
		say "[We] [are] carrying nothing." (A) instead.

Carry out taking inventory (this is the print standard inventory rule):
	say "[We] [are] carrying:[line break]" (A);
	list the contents of the player, with newlines, indented, including contents,
		giving inventory information, with extra indentation.

The text can most easily be changed by modifying the responses for these rules. See WWI 14.11 Changing the text of responses for details (online at WI 14. Adaptive Text and Responses or 14.11. Changing the text of responses).

6 Likes

Besides the technique in 14.11 of assigning a new value to the rule response:

    now the print empty inventory rule response (A) is "Your hands ...";

issuing the response text of something is an activity, so for more complicated cases one could make an activity rule to replace the output instead:

For issuing the response text of the report jumping rule response (A):
  say "foo"

Obviously that one’s not actually a more complicated case. One could even set up before and after rules…

(I’ve never felt a need to use the activity like this – just replacing the rule response has always been adequate. But I like keeping in mind what the options are!)

3 Likes

Thanks for the help!

1 Like