ZORKH.ZIP - Release 2 - 6/28/2002
ZORK-related library files
Libraries by Joe Merical (python_q@email.com)
MANUAL CONTENTS
ZIP FILE CONTENTS
Manual Files:
- Zork.html - The ZORKH.ZIP manual, this file
Library Files:
- ZorkDiag.h - The DIAGNOSE command and player damage
- ZorkGrue.h - The grue and "What is a grue?"
- ZorkLamp.h - The Zork brass lantern
- ZorkLib.h - Zork Library Messages
Back to top
REPORTING BUGS, ETC.
Please report any bugs, mistakes, or typos to
python_q@email.com. Also let me know
if you've used any of these files in a game.
Back to top
USING DIAGNOSE
- Include the file ZorkDiag before VerbLib and after Parser.
- The constant TOTAL_ENERGY is the total amount of damage
the player can take before dying. The default value is 100.
- To injure the player, use CauseDamage(DAMAGE).
- To change the message produced when a player is killed by
a certain object, provide a damage_death property with this
message as its value. The default message is "It appears that
that last blow was too much for you. I'm afraid you are dead."
This message is printed immediately before the "*** You have
died ***" message.
- The player can type DIAGNOSE or DIAG to see his health.
- EXAMPLE OF USING CauseDamage():
- This example creates a troll which attacks the player
whenever he's around, doing a random amount of damage whenever
the player and the troll are in the same room.
Object troll "Fred the Troll" TrollRoom
with name 'troll' 'fred',
description "A gruesome troll named Fred.",
each_turn [;
print "The troll's axe ";
switch(random(4)) {
1: CauseDamage(10); "nicks your arm.";
2: CauseDamage(25); "cuts your shoulder.";
3: CauseDamage(50); "wounds your torso.";
4: CauseDamage(75); "decimates you!";
} ],
has animate;
Other examples of using damage could be a room containing
a corrosive gas, a poisoned apple, or anything else that
inflicts damage over time.
- IMPORTANT NOTE:
- Because of the way INFORM handles the passing of
time, the TimePasses routines is used for damage to work
properly. To use your own TimePasses routine, replace TimePasses
before including ZorkDiag and write a new TimePasses routine
containing CheckDamage().
Back to top
USING THE BRASS LANTERN
- Include the file ZorkLamp after Grammar.
- Move the object zork_lamp to the location or character you want
in the Initialise routine.
- The life of the lamp is zork_lamp.number. The default is
385 turns, with messages printed after 200, 300, 370, and 385
turns, similar to the one in ZORK. You can change
zork_lamp.number in Initialise.
- The lamp's description tells you if it's on, off, or burnt out.
The burnt out lamp has the general attribute set.
- The lamp has the attribute light_source so it will respond to
the verb LIGHT. Any other switchable light sources should have
this attribute set.
Back to top
USING THE GRUE
- Include the file ZorkGrue between VerbLib and Parser.
- In Initialise, run the routine MakeGrue().
- The grue kills the player if he moves from one dark room to
another or goes a direction which isn't defined (cant_go).
- The ZorkGrue file also changes the description of thedark as
well as the short_name.
- ZorkGrue enables the use of "What is a grue?" If, for some
reason, you don't want to use this "what is" verb, define
the constant NO_WHAT_IS before including any files.
- IMPORTANT NOTE:
- If you want a direction to lead to a string (like e_to "The
chasm is too far to jump across.") in a location that could be dark,
use a routine to check if location is thedark:
Object westchasm "West of Chasm"
with ...
e_to [; if (location==thedark) rfalse;
else "The chasm is too far to jump across."; ];
If you've looked at the code in ZorkGrue.h and know a way to avoid
having to do this, please e-mail
me.
Back to top
ABOUT ZORKLIB.H
ZorkLib.h changes the reactions to several existing verbs and adds
several custom actions. The following tables contain all the actions
that ZorkLib creates or alters:
Custom Verbs |
Verb | Action |
XYZZY | Xyzzy |
PLUGH | Plugh |
MUMBLE, SIGH | Mumble |
WIN | Win |
CHOMP | Chomp |
LOSE | Lose |
HELLO <animate> | HelloTo |
HELLO SAILOR | HelloSailor |
HELLO | Hello |
SCREAM, YELL | Scream |
ECHO | Echo |
|
Changed Actions |
ATTACK | SWING |
CLOSE | DRINK |
EAT | TASTE |
LISTEN | LOOKUNDER |
PULL | PUSH |
STRONG | TAKE |
SQUEEZE | TOUCH |
WAVE | JUMP |
OPEN | SMELL |
TIE | WAIT |
BURN | WAKEOTHER |
SWIM | RUB |
|
Back to top
VERSION HISTORY
- Release 2 - 6/28/2002
- Fixed quite a few bugs within ZorkLib, some involving objects with
pluralname set and a couple which messed up whenever the noun was nothing.
Split the XYZZY and PLUGH verbs into two separate actions as well as LOSE
and CHOMP. Added a few new messages and changed the player's description.
Fixed a problem with the lamp's description.
- Release 1 - 6/11/2002
- Fixed a couple bugs involving ZorkGrue. Also fixed a visual bug in
ZorkDiag (the wrong message was being displayed). Added SWIM and DIVE
to ZorkLib. Updated manual.
- Beta Release - 5/31/2002
-
Included about a dozen custom verbs and sixteen or so modified
responses. Also included a DIAGNOSE command, "What is a grue?",
and the Zork brass lantern.
Files: ZorkDiag.h, ZorkGrue.h, ZorkLamp.h, ZorkLib.h, zork.html
- INFOTAKE.H - 1999
-
A library file I wrote that was similar to these except it
didn't work. Poorly coded and too buggy for anyone to even
consider using. However, the concept was the basis for much of
Zorkh.zip.
Back to top
THIS SPACE INTENTIONALLY LEFT BLANK
SPECIAL THANKS
Thanks to Noah Feldman for pointing out a bug in ZorkLib. Also, thanks to the
people on rec.arts.int-fiction, as always, for answering most every question, no
matter how stupid it may be.
Back to top
TO DO LIST
Fix any more bugs, think of features to add on, sleep for twelve hours a day.
Back to top
CONSTANTS AND GLOBAL VARIABLES
Constant (file) | Usage |
NO_WHAT_IS (ZorkGrue.h) |
Defined to disable "What is" questions |
TOTAL_ENERGY (ZorkDiag.h) |
The amount of the damage the player can take before dying. Default is 100.
|
Variable (file) | Default Value | Usage |
cur_damage (ZorkDiag.h) |
0 |
The number of turns until the player completely heals |
default_damage (ZorkDiag.h) |
"It appears that that last blow was too much for you.
I'm afraid you are dead." |
Default message displayed when the player dies from CauseDamage(); |
last_damage (ZorkDiag.h) |
N/A |
The last object to damage the player |
Back to top
|