Note: This page is no longer being maintained and is kept for archival purposes only.
For current information see our main page.
StoryHarp Kurtz-Fernhout Software
Developers of custom software and educational simulations.
Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
StoryHarp
Product area
Help System
Index
Introduction
Definitions
Tutorials
Worlds
Agent
StoryHarp & IF
StoryHarp & Java
Registering

Intermediate Tutorial -- Step 5: Add more requirements

----|-- Back | Next | Index

If things are otherwise working, before we go onto using the browser and debugger, let's add two new rules. Not every requirement you add needs a tilde. Often requirements may need a variable to be true, like if you allowed "examine the vine bridge wreckage" in the "forest" context only if "bridge broken" was true.

Add a rule that requires a broken bridge

Let's try that. First select a command that involves the forest (like the first rule with a
look command). Then click on the New button. Then add a command of

examine the vine bridge wreckage

with the reply:

You poke through the remains of what appears to have been a vine bridge. Such vandalism. Bet you somebody gets in trouble for this.

Then add a requirement of

bridge broken

Make sure you don't put a tilde in this case.

Add an extra look command to mention the bridge

Now let
s add a new "look" command for the forest. Don't change the existing rule just add a new one. Because StoryHarp goes through its list of rules and uses every one of the rules that pertains to a command-context pair, you can use multiple look commands to customize the description for what is going on in the story.

So we will add something that tells us about the bridge wreckage when we look, but only if the bridge has been broken. Make a new rule with the New button, make sure the rule's context is "forest", enter

look

for the command, and add the reply:

There is some vine bridge wreckage here.

Then add the requirement of

bridge broken

to the requirements panel.

Test the new rules

Try it out. You could restart the session to begin from the start. You probably do not want to save your session when it prompts. Remember that sessions and worlds are stored in different files.

If when you restart, the "examine the vine bridge wreckage" is available, perhaps you forgot to add the requirement for it, or put it on a different rule, or put it in the changes list instead. Similarly, if "look" describes the bridge wreckage before it has been destroyed, check the last rule's requirements. Make sure the extra "look" has a context of "forest", and that you did not accidentally type over the original "look" command for the forest.

You should be able to produce something like this in the transcript:

> look

You are in the forest. There are many majestic trees here.

> climb a tree

You climb a tree and can see nothing but tree tops for miles around you.

> go onto the vine bridge

You go onto the vine bridge.

> jump up and down

The bridge collapses, and you luckily escape destruction yourself by fortuitously falling onto a deep pile of pine needles.

> look

You are in the forest. There are many majestic trees here. There is some vine bridge wreckage here.

> examine the vine bridge wreckage

You poke through the remains of what appears to have been a vine bridge. Such vandalism. Bet you somebody gets in trouble for this.

You now know enough that, if you wanted to, you could add extra "look" commands for the "tree top" and "tree house" contexts so that they would tell the player about the existence of the vine bridge only if it was not broken. You would need to add a requirement of "~bridge broken" for those extra rules. We will add these rules at the end of the advanced tutorial.

Save your world

Now would be a good time to save your work. You might also want to examine your work in the table. You should now see text in the requirements and changes columns.

Home ... News ... Products ... Download ... Order ... Support ... Consulting ... Company
Updated: March 10, 1999. Questions/comments on site to webmaster@kurtz-fernhout.com.
Copyright © 1998, 1999 Paul D. Fernhout & Cynthia F. Kurtz.