Dinner at the Long Branch Saloon — 27 of 27

Publysher

Release 1

Section 3 - The Instructional Rules

Before reading a command when tutorial mode is true (this is the offer new prompt rule):

if the player's command does not include "[meta]":

follow the instructional rules.

Definition: a thing is non-player if it is not the player.

A thing can be previously-mentioned. A thing is usually not previously-mentioned.

Before printing the name of something (called the target):

now the target is previously-mentioned.

The instructional rules are a rulebook.

An instructional rule (this is the teach looking rule):

if the teach looking rule is listed in the completed instruction list, make no decision;

say "[italic type]You can review your surroundings at any time by typing LOOK. Try it -- type LOOK now. (Or, if you don't need instructions, you can turn the tutorial off by typing TUTORIAL MODE OFF.)[roman type][paragraph break]";

now the expected command is "look";

now the held rule is the teach looking rule;

rule succeeds.

An instructional rule (this is the teach examining rule):

if the teach examining rule is listed in the completed instruction list, make no decision;

if the player can see a previously-mentioned non-player thing (called target):

let N be indexed text;

let N be "[pictures]";

say "[italic type]Individual objects have descriptions, too. You can find out more by examining them, as in EXAMINE [N in upper case].[roman type][paragraph break]";

now the expected command is "examine [N]";

now the held rule is the teach examining rule;

rule succeeds;

otherwise:

make no decision.

An instructional rule (this is the teach inventory rule):

if the teach inventory rule is listed in the completed instruction list, make no decision;

if the player carries nothing, make no decision;

say "[italic type]Now, it turns out that you're holding something. To find out what, try typing INVENTORY.[roman type][paragraph break]";

now the expected command is "inventory";

now the held rule is the teach inventory rule;

rule succeeds.

An instructional rule (this is the teach dropping rule):

if the teach dropping rule is listed in the completed instruction list, make no decision;

if the player carries nothing, make no decision;

let N be indexed text;

let N be "[the gun]";

say "[italic type]If you want to get rid of something that you're holding you can always drop it, like this: DROP [N in upper case].[roman type][paragraph break]";

now the expected command is "drop [N]";

now the held rule is the teach dropping rule;

rule succeeds.

An instructional rule (this is the teach taking rule):

if the teach taking rule is listed in the completed instruction list, make no decision;

if the player can see a portable non-player thing (called target item):

let N be indexed text;

let N be "[gun]";

say "[italic type]You can pick things up when you see them, like this: TAKE [N in upper case].[roman type][paragraph break]";

now the expected command is "take [N]";

now the held rule is the teach taking rule;

rule succeeds;

otherwise:

make no decision.

An instructional rule (this is the teach conversation rule):

if the teach conversation rule is listed in the completed instruction list, make no decision;

if the player can see the barman:

let N be indexed text;

let N be "[barman]";

let M be indexed text;

let M be "[dinner]";

say "[italic type]You can also converse with other people, like this: ASK [N in upper case] ABOUT [M in upper case].[roman type][paragraph break]";

now the expected command is "ask [N] about [M]";

now the held rule is the teach conversation rule;

rule succeeds;

otherwise:

make no decision.

[An instructional rule (this is the teach compass directions rule):

if the teach compass directions rule is listed in the completed instruction list, make no decision;

let N be indexed text;

if a room (called goal) is adjacent:

let way be the best route from the location to the goal;

[changes here]

let N be "[way]";

otherwise if the player can see an open door (called portal):

let far side be the other side of the portal;

let way be the best route from the location to the far side;

[changes here]

let N be "[way]";

otherwise:

make no decision;

say "[italic type]To move from place to place, you can use the compass directions (NORTH, SOUTH, EAST, WEST, as well as NORTHEAST, NORTHWEST, etc.) [paragraph break]From here, try [N in upper case].[roman type]";

now the expected command is "[N]";

now the held rule is the teach compass directions rule;

rule succeeds.]

A last instructional rule (this is the teach meta-features rule):

if the teach meta-features rule is listed in the completed instruction list, make no decision;

say "[italic type]And that covers most of what you need to know! There are lots of other verbs you can type as you go along, but you'll likely be able to guess them from context. Don't be afraid to experiment with new actions.[paragraph break]To stop the game, type QUIT; to save your current position, type SAVE. RESTORE allows you to bring back a game you have previously saved, and RESTART starts the game over again at the beginning.[roman type][paragraph break]You're on your own now.";

add the teach meta-features rule to the completed instruction list;

rule succeeds.

Table of Instruction Followups

selectorfollowup
teach looking rule"Excellent -- LOOK will print a description of your environment, like so:"
teach examining rule"Very good. Since you're likely to examine things frequently, you can also abbreviate this command as X, as in X [the menu]."
teach inventory rule"Right! In the future, you can also shorten this command to INV or just I. As you see, it will print out a description of what you've got:"
teach dropping rule"Dropping things will move them into your environment, like this:"
teach taking rule"Well done. Now you'll get a message to tell you whether you succeeded in picking up something:"
teach conversation rule"Well spoken. If you asked about something sensible, you will get a reply."