Inform 7 Home Page / Documentation
§11.3. Helping and Hinting
IF is difficult to play: often harder than the writer ever suspects. Players are held up by what is "obvious", and they stumble into unforeseen combinations, or spend inordinate amounts of time working on the "wrong" problems. Too much of this and they give up, or post questions on online forums. Against this, many IF authors like to include in-story hints.
There are many approaches, which differ on two main issues.
First: do we spontaneously offer help to the player? The difficulty here is detecting the player's need: Y ask Y? tries to spot aimlessness, while Solitude has a novice mode where it is reasonable to assume that help is almost always needed. On the other hand, suppose we require that the initiative come from the player. Will a novice know to type HELP? Query shows how to redirect any attempt to ask a direct question into a HELP request. At the other end of the scale, wearily experienced players may type HELP all the time, out of habit, cheating themselves of the fun of frustration: if so, Real Adventurers Need No Help provides the nicotine patch against this addiction.
Second: how do we decide what help is needed? Normally the player only types HELP, which is unspecific. The simplest approach offers a menu, diagnosing the player's problem by obliging him to make choices: see Food Network Interactive. Listing all the possible problems in the story may give away too much, though, since players may not have reached the puzzles in question yet; so some authors prefer to create menus that adapt to the current state of the story (commonly called "adaptive hints").
Failing this, we can also try to parse commands like HELP ABOUT MICRODOT, as in Ish. Trieste takes a similar tack, except that instead of offering hints about puzzles, it offers help on story features (such as how to save), and lists all the available topics if the player types simply HELP.
Finally, and perhaps most stylishly, we can try to deduce what the player is stuck on from his immediate circumstances and from what is not yet solved: this needs a powerful adaptive hints system like the one in The Unexamined Life.
See Getting Started with Conversation for a way to redirect a player using the wrong conversation commands
See Footnotes for another medium by which hints could perhaps be transmitted
Start of Chapter 11: Out Of World Actions and Effects | |
Back to §11.2. Saving and Undoing | |
Onward to §11.4. Scoring |
ExampleY ask Y? |
Suppose we'd like to watch for signs that the player is floundering, and if we see them, recommend that he try the hints. There are probably more sophisticated diagnostics, but as a first cut, let's assume that a player who repeatedly reviews descriptions of objects he's already seen, looks around the room, and takes inventory, is at a loss for more productive activities. So then...
A thing can be examined or unexamined. A thing is usually unexamined. Carry out examining something: now the noun is examined.
Taking inventory is acting confused. Looking is acting confused. Examining an examined thing is acting confused.
After acting confused for the sixth turn:
say "(If you are feeling lost, try typing HELP for suggestions.)"
And now we write a scenario which will, alas, rather encourage even a deft and clueful player to play as though he were hopelessly confused:
The description of a thing is usually "Hm. [The item described] reminds you quite a lot of [a random visible thing which is not the item described]."
Food is a kind of thing. Food is always edible. In the Yurt are a yam and a dish of yakitori. The yam and the yakitori are food. The description of food is "Well, at least it's not [a random edible thing which is not the item described]."
Every turn:
if a random chance of 1 in 2 succeeds and something is examined:
say "Your eye is attracted by some kind of surreptitious movement from [the random examined thing].";
otherwise if the player carries something and a random chance of 1 in 3 succeeds:
say "[The random thing carried by the player] tries to slip from your grasp."
Test me with "x yam / x yam / look / x yam / i / look / i / help / quit".
And finally a little dollop of perversity from a later chapter:
Check quitting the game:
say "You're sure? ";
if player consents, say "[line break]You were getting close to a breakthrough, you know.[line break]";
otherwise stop the action.
Understand "help" as a mistake ("You're doing fine! Just keep at what you're doing now.").
ExampleFood Network Interactive |
"Basic Help Menu" is an extension that uses tables to provide a menu of instructions. Suppose we wanted to include this menu in our own game, but add a few custom menu items of our own:
Include Basic Screen Effects by Emily Short. Include Menus by Emily Short. Include Basic Help Menu by Emily Short.
title |
subtable |
description |
toggle |
"Recipes in This Game" |
Table of Recipes |
-- |
-- |
"Contacting the Author" |
-- |
"If you have any difficulties with [story title], please contact me at fakeaddress@gmail.com." |
-- |
This table is one that is pre-defined by the extension. By continuing it, we add a few additional items to the list.
And since we've promised a sub-menu of recipes:
title |
subtable |
description |
toggle |
"Salmon Tartare" |
-- |
"First, be sure to buy extremely fresh salmon. Raw fish should be served on the day it was caught, if possible. To guarantee this, visit an Asian supermarket or specialty store, and buy salmon marked 'sashimi grade'..." |
-- |
"Pecan Brownies" |
-- |
"Begin by shelling half a pound of pecans..." |
-- |
To test it, type HELP and then experiment.
ExampleIsh. |
Ichiro's Dubious Sushi Hut is a room. "Despite the allure of the dusty plastic sushi models in the window, you're beginning to have second thoughts about the selection of this particular restaurant for your rendezvous with Agent Fowler. There are no other patrons, for one thing. Afternoon sunlight filters lazily through the window and illuminates a number of empty glass-topped tables, at each of which is a chopstick dispenser (in form of cute ceramic cat) and a pitcher of soy sauce (sticky).
The sushi bar itself is what gives the most pause, however. Behind it sits an angry-looking Japanese woman, aggressively eating a Quarter Pounder with Cheese."
We can, when necessary, accept any text at all as a token:
Understand "help [text]" or "help about [text]" as getting help about. Understand the commands "instructions" or "hint" or "hints" or "menu" or "info" or "about" as "help".
After that, we can use "the topic understood" to refer to the text we read:
Carry out getting help about:
if the topic understood is a topic listed in the Table of Standard Help:
say "[explanation entry][paragraph break]";
otherwise:
say "You're out of ideas."
topic |
title |
summary |
explanation |
"sushi" |
"sushi" |
"Really it's just vinegary rice" |
"Popular misconception says that sushi inevitably entails raw fish, but it is in fact just rice with rice vinegar on it. It's just that the really good kinds have raw fish in." |
"cucumber roll" or "cucumber" |
"Cucumber roll" |
"Sushi for people who are afraid of sushi" |
"It is just rice and slivers of cucumber in the middle, and as long as you don't go too crazy with the wasabi, all should be well." |
"california roll" or "california" |
"California roll" |
"Travesty of the sushi concept" |
"It's. Fake. Crab." |
"monkfish liver" |
"monkfish liver" |
"Expert eaters only" |
"The odds of Ichiro's having this unusual delicacy is near zero." |
"microdot" |
"microdot" |
"What you came here to deliver" |
"There'll be time enough for that later. If Fowler ever turns up. Where is she, anyway?" |
Since the player may not know what all the help options are, we might as well let him get an overview, as well.
Understand "help" as summoning help. Summoning help is an action applying to nothing.
Carry out summoning help:
say "Help is available about the following topics. Typing HELP followed by the name of a topic will give further information.[paragraph break]";
repeat through the Table of Standard Help:
say " [title entry]: [summary entry][line break]".
Test me with "help / help about microdot / help cucumber / help california roll".
ExampleQuery |
First, we create a single "[query]" token so that we can capture all instances of such sentences in a single line:
Understand "who" or "what" or "when" or "where" or "why" or "how" or "who's" or "what's" or "when's" or "where's" or "why's" or "how's" as "[query]".
Understand "[query] [text]" as a mistake ("[story title] understands commands, such as '[command prompt]examine [a random thing that can be seen by the player]', but not questions. For more instructions, type HELP.").
Test me with "who am I? / who are you? / where is this place?".
Now the game will respond to all questions novice players might type with this reminder to look for help information.
ExampleTrieste |
Suppose we are using an extension in which another author has defined some help topics for the player, and we want to amend them for our game.
We'll start with the portion of the text that we have inherited from the extension:
A help-topic is a kind of value. Some help-topics are defined by the Table of Standard Instructions.
help-topic |
reply |
commands |
"This game recognizes 150 common commands for forms of military attack. These include..." |
saving |
"To save the game, type SAVE. You will be prompted to supply a file-name for your saved game. If you'd like to return to play at that point again later, RESTORE the saved game." |
Understand "help [help-topic]" as asking for help about. Asking for help about is an action out of world, applying to one help-topic.
Understand "help" or "help [text]" as a mistake ("Help is available on the following topics: [help-topics list]").
To say help-topics list:
repeat through the Table of Standard Instructions:
say "[line break] [help-topic entry]";
Carry out asking for help about:
repeat through the Table of Standard Instructions:
if the help-topic understood is the help-topic entry:
say "[reply entry][paragraph break]";
break.
Now, let's imagine our game is a special one in which only a very limited supply of moves are allowed. In that case, we'll want to replace the information on commands:
help-topic |
reply |
commands |
"The only commands this game recognizes are HOLD, MOVE, CONVOY, SUPPORT MOVE, and SUPPORT HOLD. No others are necessary." |
Board Room is a room. Mark is a man in the Board Room. "Russia (played by Mark) is also hovering over the board."
Guest Bathroom is south of Board Room. Lena and Rob are in the Guest Bathroom. Lena is a woman. Rob is a man.
Rule for writing a paragraph about Lena when Lena is in the Guest Bathroom and Rob is in the Guest Bathroom:
say "[Lena] (Italy) and [Rob] (Great Britain) are having a hushed conversation while leaning against your good towels. They stop and stare at you when you come in."
ExampleSolitude |
Observation of novice IF players suggests that they often have a hard time figuring out how to get started, especially if they are encountering the game in a context where they don't have time to settle in and read instructions. Here we provide some training wheels to help them learn to communicate.
This is divided into several parts. The first part is the system of rules for general guidance, which could be excerpted and used anywhere. The second part is a scenario using these rules.
When play begins:
say "Have you played interactive fiction before? >";
now novice mode is whether or not the player consents.
The rationale for asking the question this way, and not another, is that novices asked whether they would like instructions very often say no, even if they need them.
Novice mode is a truth state that varies. Novice mode is true.
Stopping novice mode is an action out of world.
Starting novice mode is an action out of world.
Understand "novice mode off" or "novice off" as stopping novice mode.
Understand "novice mode on" or "novice on" as starting novice mode.
Carry out stopping novice mode: now novice mode is false.
Carry out starting novice mode: now novice mode is true.
Report stopping novice mode: say "Novice mode is now off."
Report starting novice mode: say "Novice mode is now on."
Before reading a command when novice mode is true:
say "[line break]Some options to try:[line break]";
follow the novice suggestion rules.
A novice suggestion rule (this is the suggestion that he look rule):
if not looking and not going, say " [bold type]look[roman type]".
A novice suggestion rule (this is the suggestion that he check inventory rule):
if the player carries something and we are not taking inventory, say " [bold type]inventory[roman type] (I)".
A novice suggestion rule (this is the suggestion that he put things on rule):
if the player carries something and a free-standing supporter is relevant, say " [bold type]put[roman type] something [bold type]on[roman type] [the list of relevant supporters]".
A novice suggestion rule (this is the suggestion that he take things rule):
if a gettable thing is relevant, say " [bold type]take[roman type] [the list of gettable relevant things]".
A novice suggestion rule (this is the suggestion that he examine things rule):
if an unexamined thing is relevant, say " [bold type]examine[roman type] (X) [the list of unexamined relevant things]".
A novice suggestion rule (this is the suggestion that he enter things rule):
if a relevant thing is worth entering, say " [bold type]enter[roman type] [the list of worth entering relevant things], or [bold type]get out[roman type]".
A novice suggestion rule (this is the suggestion that he open things rule):
if an unlocked openable thing is relevant, say " [bold type]open[roman type] or [bold type]close[roman type] [the list of unlocked openable relevant things]".
A novice suggestion rule (this is the suggestion that he lock things rule):
if a closed lockable thing is relevant, say " [bold type]lock[roman type] or [bold type]unlock[roman type] [the list of closed lockable relevant things]".
A novice suggestion rule (this is the suggestion that he eat things rule):
if the player carries an edible relevant thing, say " [bold type]eat[roman type] [the list of edible relevant things carried by the player]".
A novice suggestion rule (this is the suggestion that he wear things rule):
if the player carries a wearable relevant thing, say " [bold type]wear[roman type] [the list of wearable relevant things carried by the player]".
A novice suggestion rule (this is the suggestion that he turn things on rule):
if a device is relevant, say " [bold type]turn on[roman type] or [bold type]turn off[roman type] [the list of relevant devices]".
A novice suggestion rule (this is the suggestion that he go places rule):
if a room is adjacent, say " [bold type]go[roman type][exit list][if in darkness] or try other directions in the dark[otherwise]".
A novice suggestion rule (this is the suggestion that he enter doors rule):
if an open door is relevant, say " [bold type]go through[roman type] [the list of relevant open doors]".
A novice suggestion rule (this is the suggestion that he interact with people rule):
if another person is relevant, say " [bold type]kiss[roman type] or [bold type]wake[roman type] [the list of relevant other people][if the player carries something], or [bold type]give[roman type] things [bold type]to[roman type] someone[end if]".
A novice suggestion rule (this is the suggestion that he ask for help rule):
say " [bold type]help[roman type] to see a more complete set of instructions".
A novice suggestion rule (this is the suggestion that he turn off help rule):
say " [bold type]novice mode off[roman type] to turn off this guidance".
The suggestion about asking for help is no good unless we provide some. This might take any of a number of forms, but for the sake of example we'll use an easy way out:
Include Basic Screen Effects by Emily Short. Include Menus by Emily Short. Include Basic Help Menu by Emily Short.
After taking inventory when novice mode is true: say "To get rid of any of these objects, [bold type]drop[roman type] it."
A thing can be examined or unexamined. Carry out examining something: now the noun is examined.
Definition: a thing is relevant if it is seen and it is visible. Before printing the name of something (called the target): now the target is seen; if novice mode is true, say "[bold type]". After printing the name of something: say "[roman type]".
Definition: a supporter is worth entering:
if the player carries it, no;
if it is enterable, yes.
Definition: a container is worth entering:
if the player carries it, no;
if it is enterable and it is open, yes.
Definition: a person is other if it is not the player. Definition: a person is another if it is other.
To say exit list:
let place be location;
let count be 0;
repeat with way running through directions:
let place be the room way from the location;
if place is a room:
increment count;
say "[if count is greater than 1] or[end if] [bold type][way][roman type]".
Definition: a thing is gettable:
if it is scenery, no;
if it is fixed in place, no;
if it is a person, no;
if the player is carrying it, no;
if the player is wearing it, no;
yes.
Antarctic Research Station is a room. "Though not always the most stimulating of environments, the station is far from your ex-wife and most of the things in the world that annoy you, namely the other 6+ billion people. There is a second room to the south." The station contains a radio. The radio is a device. It is fixed in place.
South of the Station is Sitting Room. The description of the Sitting Room is "Just big enough for a very [comfortable chair]." The Sitting Room contains an enterable supporter called a comfortable chair. The chair is scenery. A monograph about penguins is in the Sitting Room.
Blistering Cold is a room. "It is white out here and very very very cold." The white door is a door. "[The white door] leads to [the other side of the white door]." It is west of the Blistering Cold and east of the Antarctic Research Station.
Test me with "i / x radio / x door / s / i / x chair / x monograph / sit in chair / get up / n / open door / enter door".
ExampleReal Adventurers Need No Help |
Suppose we have an action called "asking for help" that gives the player some hints on request. We've also made it possible to turn this feature off, if the player would like to discourage himself from using the hints too much. Now we need a value that varies to keep track of whether hints are currently permitted or currently not permitted. So we might write:
A permission is a kind of value. The permissions are allowed and denied.
Hint usage is a permission that varies. Hint usage is allowed.
And under the right circumstances, we change hint usage to denied:
Check asking for help for the first time:
say "Sometimes the temptation to rely on hints becomes overwhelming, and you may prefer to turn off hints now. If you do so, your further requests for guidance will be unavailing. Turn off hints? >";
if player consents:
now hint usage is denied;
say "[line break]Truly, a real adventurer does not need hints." instead.
Then we can refer back to this value later to decide whether we want to display the hint menu or not:
Check asking for help:
if hint usage is denied, say "You have chosen to eschew hints in this game. Be strong! Persevere!" instead.
Asking for help is an action out of world. Understand "help" or "hint" or "hints" as asking for help.
Carry out asking for help:
say "Fine, since you're weak enough to ask: here is a complete walkthrough: GET EGG. PEEL EGG. SMELL EGG. DIVIDE YOLK INTO THREE PORTIONS. GIVE THE SMALLEST PORTION OF YOLK TO THE GOLDEN GOOSE. ASK THE GOOSE ABOUT WHETHER THE SWAN IS TO BE TRUSTED. GIVE THE LARGEST PORTION OF YOLK TO THE SWAN. DANCE CONGA. EAT MEDIUM PORTION. STAND ON HEAD. WEST."
Note that it would probably be kinder to offer the player some intermediate level of help, in the actual event.
ExampleThe Unexamined Life |
Hint systems in IF come in a variety of flavors: some are a static, prewritten set of guidelines (which might exist in a menu or outside the game entirely); others are built in as part of the program, and attempt to adapt to the situation the player currently faces. Adaptive hints have the advantage that they are less likely to reveal information for which the player is not ready, and the disadvantage that they are more work for the author.
The exercise here is to write an adaptive hint system that will both respond in agile ways to the state of the world model and require a minimum of authorial fussing. We also want the player to be able to ask for a hint about any object he encounters in the game world: this will let him be specific and avoid accidentally receiving hints about the wrong puzzles.
Our baseline assumption is that a player may find a puzzle unsolvable for one of two reasons: he either hasn't seen the relevant clue, or he hasn't got the relevant equipment. If these are true, then he should be given hints about how to find this information, and then once he has it, more specific hints about the puzzle itself -- ending, as a last resort, with the exact command(s) he will need to use in order to bring about the solution.
In practice, there are other possibilities, but this will do for an example.
We begin by defining our relations:
Explaining relates one thing to various things. The verb to explain means the explaining relation.
Instead of hinting about something when something unexamined (called the clue) explains the noun:
say "You're still missing some information that might be useful to understanding the problem. [More]";
if player consents, try hinting about the clue.
Requiring relates one thing to various things. The verb to require means the requiring relation.
Instead of hinting about something when the noun requires something (called the implement) which is not carried by the player:
say "You're missing an object that might be useful to resolving this problem. [More]";
if player consents, try hinting about the implement.
Hinting about is an action applying to one visible thing. Understand "hint about [any thing]" as hinting about.
This allows us to create the most absolutely generic sort of hint -- boring, perhaps, but in practice the player often just needs a nudge about what part of the game world he should be examining for a solution:
Carry out hinting about:
if something explains the noun, say "You might want to review [the list of things which explain the noun]. ";
if the noun requires something:
say "You should be sure that you have [the list of things required by the noun]. ";
otherwise:
say "Sorry, I can't advise you further on that.".
These things cover hinting about objects that are themselves puzzles. But what if the player asks for hints about a tool or piece of information because he doesn't know how to apply it yet? We might want to give some guidance there, as well.
Carry out hinting about something which explains something (called target):
if target is unseen, say "[The noun] might prove useful information, sooner or later." instead;
otherwise say "You could examine [the noun]." instead.
Carry out hinting about something which is required by something:
say "[The noun] might be useful to have. [More]";
if player consents:
if a seen thing requires the noun, say "[The noun] may help with [the list of seen things which require the noun]." instead;
otherwise say "There are [number of things which require the noun in words] problems for which [the noun] might come in handy." instead.
Now we have these general hints written, but we want to pre-empt them if the player has not yet fulfilled all the prerequisites.
Instead of hinting about something unseen:
if the noun is visible:
now the noun is seen;
continue the action;
say "Perhaps you should explore further. ";
if the ultimate location of the noun is an unvisited room:
try hinting about the ultimate location of the noun;
otherwise:
if the ultimate location of the noun is the location:
say "You're in the correct room right now[if the visible shell of the noun is a thing]. Try further exploring [the visible shell of the noun][end if].";
otherwise:
try hinting about the ultimate location of the noun.
Instead of hinting about a visited room:
say "There's a room you've visited, but you haven't exhausted all there is to see there. [More]";
if player consents:
say "Try going back to [the noun]. [More]";
if player consents, direct player to the noun.
Instead of hinting about an unvisited room:
say "There's a room you haven't yet visited. [More]";
if player consents, direct player to the noun.
To direct player to (goal - a room):
let way be the best route from location to the goal, using even locked doors;
if way is a direction, say "Try going [way] to start your explorations.";
otherwise say "Sorry, the route is an indirect one.".
Instead of hinting about a portable seen thing which is not visible:
if the noun is scenery, continue the action;
say "You have seen the item you need to solve this problem, but it's not in sight at the moment. [More]";
if player consents:
try hinting about the ultimate location of the noun.
And this business of "seen" things requires, of course, that we keep track:
A thing can be seen or unseen. A thing is usually unseen. The player is seen. After printing the name of something (called target): now the target is seen.
That "After printing..." rule means that as soon as the game automatically prints the name of an object, it tags that object as having been "seen" by the player. This requires just a little care on our part, that we never mention an object without using the game's printing rules. Still, it is much easier than most other possible forms of bookkeeping.
We also need to deal with the question of whether the player has examined an object, for those objects whose descriptions carry vital information:
A thing can be examined or unexamined. A thing is usually unexamined. Carry out examining something: now the noun is examined.
In practice, there might be other ways of getting vital facts, and in a more sophisticated puzzle game we might need a more sophisticated model to track this. But examined or unexamined will do for now.
To decide what room is the ultimate location of (item - a thing):
let place be the holder of the item;
while the place is a thing:
let the place be the holder of the place;
if the place is a room, decide on the place.
To decide what thing is the visible shell of (item - a thing):
if item is visible, decide on the item;
let place be the holder of the item;
while place is a thing and place is not visible:
let place be the holder of the place;
if the place is visible, decide on the place.
That covers most of the generic hints, but let's also add some slightly more precise hints about a few kinds of objects that are especially important in the model world. These hints will probably not be very interesting to a seasoned IF veteran, but a novice player who does not know the wording or cannot guess what something might be for may still find them useful:
Carry out hinting about a locked lockable thing:
say "You could unlock [the noun] with [the matching key of the noun]." instead.
Instead of hinting about a locked thing when the matching key of the noun is not carried by the player:
if the player can see the matching key of the noun:
say "Perhaps [the matching key of the noun] would help.";
otherwise:
say "[The noun] is locked. There must be a key around somewhere. [More]";
if player consents, try hinting about the matching key of the noun.
Carry out hinting about a closed openable unlocked thing:
say "You could open [the noun]." instead.
Carry out hinting about an open door:
say "You could enter [the noun]." instead.
Carry out hinting about an unexamined thing:
say "You might find out something if you examine [the noun]." instead.
Carry out hinting about an edible thing:
say "You could eat [the noun]." instead.
Carry out hinting about a wearable thing:
say "You could wear [the noun]." instead.
Carry out hinting about a pushable between rooms thing:
say "You could push [the noun] some direction." instead.
Now to the actual objects in the game:
The Crypt is a room. "This squat, barrel-vaulted chamber runs roughly north-south. Along either side are the graves of Saxon kings and early bishops of the church long since gone to dust -- one [tomb] in particular looks undisturbed."
Notice that we used the bracketed tomb here: the tomb is scenery, and if we do not use the name-printing function, Inform will not register that we have mentioned it to the player.
The tomb is scenery in the Crypt. The tomb is openable and closed. The silver dagger is a thing in the tomb. Understand "tombs" as the tomb. The description of the silver dagger is "Gleaming in a soft light all its own. Its blade is figured with running deer and its hilt is made of horn." The wight requires the silver dagger. The tomb requires the pry bar.
Instead of opening the tomb when the player does not carry the pry bar:
say "The lids are stone, too heavy for you to raise without some implement."
Now we can add specific hints to replace the generic ones:
Carry out hinting about the tomb:
say "The lids are heavy, but you can open them when you carry the pry bar."
The rest of the hint system ensures that the player will not see this final suggestion until he has the pry bar, since the tomb "requires" the pry bar. Having the hint there doesn't excuse us from providing some alternate wording in case the player solves this not-very-difficult conundrum on his own, though:
Understand "pry [something] with [something preferably held]" as unlocking it with. Understand the commands "lever" or "prise" as "pry".
Instead of unlocking something with the pry bar, try opening the noun.
The wight is a man in the Crypt. "[The wight] lurks near the south exit." The description of wight is "Old English [italic type]wiht[roman type]: a thing, a creature. It is little more than the memory of a life ill-lived, but it lingers here." Understand "wiht" or "creature" or "ghost" as the wight.
Instead of going south in the presence of wight:
say "The wight breathes chill into your face.
Your head swims, and you are aware that you no longer have the willpower to go in that direction."
After going to Fresh Air:
increment the score;
say "Congratulations, you have escaped!";
end the story finally.
The inscription is fixed in place in the Crypt. "Someone has painstakingly carved [an inscription] into the wall above the door." The description is "Squinting, you decipher the Latin text: [italic type]Silver causes harm to those that live though dead[roman type]." The inscription explains wight.
The Treasure Chamber is north of the Crypt. "The walls are thick, the high windows promisingly barred with iron. But for all this there is no hint of any valuable stores remaining."
The pry bar is in the Treasure Chamber. "One of the window bars, rusted from its place, lies in a puddle of water." Understand "window" or "bars" as the pry bar. The description of the pry bar is "A few feet long, and not entirely rusted into uselessness yet."
Instead of giving the dagger to wight:
say "The wight recoils, appalled."
Carry out hinting about wight:
say "You will have to find some way to get wight to come in physical contact with the silver dagger, which he will certainly not do willingly. [More]";
if player consents, say "You could, for instance, throw it at him." instead;
otherwise stop the action.
Understand "touch [something] with [something]" as putting it on (with nouns reversed). Understand "hit [someone] with [something]" as putting it on (with nouns reversed).
Instead of attacking the wight:
say "You can't force yourself to approach close enough for hand to hand combat: if, indeed, the wight has hands."
Instead of putting the dagger on wight:
say "The wight fades out of your way without ever coming into contact with the dagger. Perhaps a more projectile method would work better."
Instead of putting something on wight:
say "The wight dodges you."
Instead of throwing the dagger at wight:
now the wight is nowhere;
move the dagger to the location;
increment the score;
say "The dagger passes through its airy form with a rending like the rip of silk. The fragments dissipate at once."
Test me with "hint about wight / north / get bar / south / open tomb / get dagger / south / hint about wight / read inscription / hint about wight / attack wight / throw dagger at wight / south".
Note that, if using TEST ME to run through the solution on the Z-machine, we will have to answer a few yes/no questions along the way.
For Glulx, the code should instead read something like
Test me with "hint about wight / y / north / get bar / south / open tomb / get dagger / south / hint about wight / y / read inscription / hint about wight / y / attack wight / throw dagger at wight / south".