How do I see my changed rule responses?

I can’t figure out to display the changed rule responses in Inform 7.

I type this code:

can't eat unless edible rule response (A) is "foobar".

I test the command in the game:

>eat me
foobar

Then, I go to the index and look at the eating action so I can see the action checking rule response. This is what it shows:


The (A) response shown here is still the original text. So, where can I go to confirm that I changed the response text and see what the text is? Is this even possible?

The behavior in the game is the ultimate truth.

You’re right that the index doesn’t show the new text, even though it’s set at compile time. This may be a bug in the index generation code, or it may be intended to show the original (standard rules) response for some reason.

You can also check by typing “responses 1” in the story tab of the IDE. It shows all the responses in the standard rules, but if you scroll through them, I can confirm that the new coded response is there.

1 Like

You can see the response text that’s actually happening in the game with the “responses” debugging command–type “responses” at the command prompt and you will be given a menu of things to select from. (If you haven’t defined anything else, the responses for rules defined in the Standard Text will be got by typing “responses 1”.)

Unfortunately this dumps all the responses for rules that are part of the Standard Rules, so you’ll probably have to ctrl-F to find the one you want.

I suspect that the Index may be supposed to show the original response even when you’ve changed it. One thing is that you can change the responses dynamically, and this will be reflected in the “responses” command, but the Index can’t change.

What I mean by dynamic definition, and how it’s reflected by the responses command, can be seen by this source text:

Lab is a room. 

Boinging is an action applying to nothing.

Understand "boing" as boinging.

Report boinging (this is the standard report boinging rule): say "Boing." (A).

Carry out boinging: now the standard report boinging rule response (A) is the substituted form of "[text of standard report boinging rule response (A)] Boing." 

which yields this output:

click here to see output

Lab

responses
→ The following sets of responses are available:
RESPONSES ALL
RESPONSES 1: source text
RESPONSES 2: Standard Rules

responses 1
source text:
standard report boinging rule response (A): “Boing.”

boing
Boing. Boing.

responses 1
source text:
standard report boinging rule response (A): Boing. Boing.

boing
Boing. Boing. Boing.

responses 1
source text:
standard report boinging rule response (A): Boing. Boing. Boing.

1 Like

Thanks to everyone for their replies. They confirm that I am not missing an obvious answer lurking somewhere in the Inform 7 UI.

I ended up going down this rabbit hole while I was trying to come up with an idiomatic way to change the general style of action responses to match the style of my PC and game. I have been waffling between using Instead rules and changing the text of responses.

Instead rules are predominant in a lot of the game source I have reviewed. Instead rules are also useful for defining how an action should behave in specific circumstances. But when those circumstances are more generalized, for example, if the PC is an old man, and you want all of the general responses to sound like they are coming from a cantankerous curmudgeon, which of the following is a better idiom and why?

Instead of jumping:
	say "What are you trying to do, break your other hip?".

Or…

Report jumping rule response (A) is "What are you trying to do, break your other hip?".

The second suggestion feels like the better one, because I am only changing content and I am not avoiding most of the action rule books for jumping.

Any thoughts on this?

Yes. It won’t always be a factor, but if the game does include a jumping mechanic of some sort the INSTEAD rule is going to circumvent anything else. Changing the response is likely the better course in a larger game.

But there are times when there’s nothing wrong with a quick-and-dirty INSTEAD rule.

1 Like

As Hanon says. If you are adding a new mechanic like jumping, then Check-Carry Out-Report is the way to go. But if you’re just reflavoring messages, then you might want to look at a extension like Object Response Tests by Juhana Leinonen, which tries all actions on a given noun, or all nouns with a given action, or both, so you can scan through all the current responses and make sure you haven’t missed any. This has the benefit of being both exhaustive and real-time, so it catches any changes that happen in the course of play.

2 Likes