Editing obituary

Hey, gang. I’m trying to edit the “obituary” of my game by removing UNDO and adding CREDITS. I’m trying to follow the Recipe Book’s “§11.6. Ending The Story”, but it doesn’t give an explicit example I can follow of how to do this. Removing UNDO is working, but adding the CREDITS is not. (CREDITS works as an action just fine.)

I’ve tried a mashup of different bits of code from the recipe book and the below (invalid code) is where I now sit.

[setting up credits]
Requesting credits is an action out of world.
Understand "credits" and "about" and "crediting" as requesting credits.

Report requesting credits: say "these are the credits".


[the problem code]

When play begins:
	choose row with a final response rule of immediately undo rule in the Table of Final Question Options;
	blank out the final question wording entry;

Rule for crediting a victorious player:
	report requesting credits.

Table of Final Question Options (continued)
final question wording	only if victorious	topic	final response rule	final response activity
"CREDITS"	false	"CREDITS"	--	crediting a victorious player	
1 Like

I got this to work, again by mimicing different parts of the code. I’m not sure what the difference is between ‘this is the … rule’ and ‘rule for …’, but that’s one change I made.

Since you had a rule and not an activity I put it in the rule column and not the activity column. Since you had a crediting action, in the crediting rule I did ‘try requesting credits’ instead of report requesting credits.

[setting up credits]
Requesting credits is an action out of world.
Understand "credits" and "about" and "crediting" as requesting credits.

Report requesting credits: say "these are the credits".


[the problem code]

When play begins:
	choose row with a final response rule of immediately undo rule in the Table of Final Question Options;
	blank out the final question wording entry;

This is the crediting a victorious player rule:
	try requesting credits.

Table of Final Question Options (continued)
final question wording	only if victorious	topic	final response rule	final response activity
"CREDITS"	false	"CREDITS"	crediting a victorious player rule	--

4 Likes

Yep, it’s a bit confusing, but the final question doesn’t actually go through the parser! After all, the player shouldn’t be able to put in arbitrary commands there. This means your CREDITS command doesn’t have to be an action (unless you want players to be able to use it in play as well).

Instead, for the final question, it needs to be either a rule or an activity. If you want it to be a rule, you need to name that rule, so you can reference it in the table:

Report requesting credits (this is the print credits rule):

And if you want it to be an activity, you have to declare it as such:

Printing the credits is an activity.
Rule for printing the credits: try requesting credits.

Then just put the name of your rule or activity in the appropriate column (“final response rule” or “final response activity”).

In your original code, you haven’t declared “crediting a victorious player” as an activity, so I believe Inform just takes your rule as a generic one that’s not tied to anything else.

3 Likes

The former creates a named rule that is not in any rulebook.

The latter creates an anonymous rule in the for rulebook for an activity (crediting a victorious player in the OP).

3 Likes