Discussions about interactive fiction

Archive for December, 2011

I7: Where do I look in the manual?

What is the correct syntax for a multi-part if-clause? I know this must
be in the manual somewhere, but I can’t find it. In pseudo-code, this is
more or less what I want:

Carry out turning the car-key:
if the car-key is in the ignition:
{
        if the car is not running:
        {
                say "Vroom!";
                now the car is running;
                stop the action;
        }
        otherwise:
        {
                say "The engine dies.";
                now the car is not running;
                stop the action;
        }
}

otherwise:
{
        if the key is held by the player:
        {
                say "You twirl the key in the air.";
        }
        otherwise:
        {
                say "You lack telekinetic powers.";
        }
        stop the action;

}

…but I have no clue where to put "begin;" and stuff like that, or
where to put colons and where not to put them. As I said, I’m sure it’s
in the manual, but I’m looking, for instance, at section 11.5, and it
doesn’t tell me.

Thanks.

–Jim Aikin

.
posted by admin in Uncategorized and have Comments (4)

PAWS: PAWS 2.0 Has Been Released

Hello Everybody!

PAWS 2.0 Developer Edition is now available for download at:

http://home.fuse.net/wolfonenet/PAWS.htm

The Developer edition requires installation of Python 2.5.1 and
wxPython. I have tested it on Windows XP only–but it should have no
problems running under OS X (Panther and above), Red Hat Linux, or
Ubuntu Linux. I would appreciate hearing from anyone with Mac or Linux
boxes who can confirm or deny this. :)

The major difference between PAWS 1.5 (which you can still download)
and PAWS 2.0 is the terminal used.

2.0 uses the PAWS terminal, and runs the terminal first. You load
games using a standard File Open dialog and you may use any font on
your system. The PAWS terminal supports dynamic resizing of the
terminal window (the text will re-wrap as needed) but does not support
the 1.5-style More pause.

2.0′s terminal supports 16 colors (text and background), bold,
italics, underlining, oversided title font, and changing the font
size.

Please note the Player Edition is still in development, but should be
released in the next couple of weeks. The Player’s edition for Windows
will use Py2Exe to provide a single executable (with a small PDF
manual) for players of PAWS games. The Player Edition for OS X and
Linux will still require downloading of Python and wxPython, although
some distributions already have these components installed by default.

Enjoy!

Respectfully,

Wolf

"The world is my home, it’s just that some rooms are draftier than
others". — Wolf

posted by admin in Uncategorized and have Comments (17)

I7: Either/or properties

I’m looking at Chapter 3.6 of the manual, and I can’t help feeling it
ought to explain this syntax, or at least provide a cross-reference to a
place where it’s explained — but it doesn’t appear to do so. What I
want to do (but it won’t compile) is this:

Activatedness is a kind of value. The activatednesses are running and
not-running. A thing is usually not-running.

The reason I need to do this is because I need to be able to switch
something on and off without making it a device, since it has to be a
container. So I need to test whether it’s running, and if it’s
not-running make it running.

What I’m describing, above, is an either-or property, which ANYTHING IN
THE GAME may need, and which therefore would have to be attached to the
thing kind, or so I would naively assume.

What page of the manual do I have to burrow down to, in order to
discover the correct syntax for creating a new either/or property that
will attach to all things in the game?

–JA

posted by admin in Uncategorized and have Comments (8)

I7: Where exactly are the built-in rulebooks?

I’m trying to read the manual, honest. Right now I’m looking at section
18.4, specifically at Example 338. In which it says this:

"The first look rule [a rule being created in the example] is listed
after the room description paragraphs about objects rule in the carry
out looking rules."

So I’m thinking, okay, that’s interesting. I’d like to know more about
the room description paragraphs about objects rule. In fact, I’d like to
know how the carry out looking rules look. Because how will I learn
which rules I need to insert my own rules before, or after, other than
by reading the library rulebooks?

So I bop over to the other page, and I click the Index tab and the Rules
button … and I can’t find these rules anywhere. I search for the
string "carry out" on this page, and it’s not found.

Where are the carry out looking rules? And how exactly would I find
them, if they aren’t in the Index > Rules tab?

–Jim Aikin

posted by admin in Uncategorized and have Comment (1)

I7: Attempting to enforce reachability

In another thread [The Doors] Emily suggested a way to allow access to a
door latch from only one side of the door. I’m trying to model something
a bit more complex — disallowing access when the player is in the SAME
location, but in an enterable.

Here are two approaches that I’ve tried. Both produce a slew of "tried
to find the parent of nothing" errors.

[first attempt:]
Before doing something when the car encloses the player:
        if the current action involves the trunk begin;
        say "You can’t reach the trunk from here." instead;
        otherwise;
        if the noun is in the trunk or the second noun is in the trunk,
        say "You can’t reach the trunk from here." instead;
        end if.

[second attempt:]
Before doing something when the current action involves the trunk:
        if the car encloses the player,
        say "You can’t reach the trunk from here." instead.
Before doing something when the noun is in the trunk:
        if the car encloses the player,
        say "You can’t reach the trunk from here." instead.
Before doing something when the second noun is in the trunk:
        if the car encloses the player,
        say "You can’t reach the trunk from here." instead.

The problem may be that there won’t always _be_ a noun, much less a
second noun, but the rules are running irregardless. I tried writing a
test like this:

if there is a noun and the noun is in the trunk

…but the compiler didn’t like that either.

I imagine there’s probably a way to create a more general mechanism —
"A thing can be reachable. A thing is usually reachable." And so forth,
with check rules that look both at the location of the noun and second
noun (if any) and what encloses the player. But my main concern at the
moment is to write code for this one particular pair of objects (the car
and the trunk, the latter being a container) that won’t produce run-time
errors.

Can anyone tell me what I’m doing wrong?

–JA

posted by admin in Uncategorized and have Comments (2)

I7: Check vs. Carry Out

Admittedly, I’m coming from a TADS perspective here. In TADS, the
functions of check() and action() are more rigorously defined. But
here’s the odd thing:

I tried using ‘listen’ in a particular location, and read "You hear
nothing unexpected." So I tried this:

[code]
Carry out listening when in the Patio: say "You hear the gurgle of
running water." instead.
[/code]

That didn’t change anything, and the reason is because the ‘listen’
command is blocked by a Check rule called the block listening rule. So I
changed my code like this — and it works:

[code]
Check listening when in the Patio: say "You hear the gurgle of running
water." instead.
[/code]

…but technically, philosophically, that’s not a check, it’s a carry
out. So it seems to me the library should really have the block
listening rule in the carry out rules, not in the check rules. Am I
wrong about this? Am I missing some subtlety?

–JA

posted by admin in Uncategorized and have Comments (4)

ASKING, people in inform 7

After effects don’t work on people how do I get this to work. IE I ask
jane to eat a head, jane does so, but there is no description of her
actions. Just jane eats kates head.
[code]
After eating the head:
   say "brains sweet sweet brains, Im in your skullz eating your
knowledges." [this only applies to the player]

[not part of my code]
so when in game I want it to have its own description that goes with
jane eats a head you know.  my problem is this

[code]
After someone eats a head:
   say"[thenoun] eats the out the skull like some kind of crazed
monster,[thenoun] smiles as she wipes of her face."

[not my code]
So how do I get a after someone rule to work?
Also how do I get replys for asking specific questions ect to a
person.
Also can I single out people, or by gender. IE[after jane] [after a
woman] [ after a man][ect]
Thanks a bunch : D
please contact me at my AIM highabovehell

posted by admin in Uncategorized and have No Comments

I7: More on Doors

Wow, that was fast work, Emily! Deluxe Doors is already up on the
Extensions page. Very nice.

It doesn’t seem to be compatible with my existing code, however, and I
haven’t been able to figure out why. In the absence of the extension,
the following compiles and appears (in preliminary testing) to work
correctly. The passkey will unlock a shopdoor (though at present I’ve
created only one instance of the latter).

[code]
A shopdoor is a kind of door. Understand "door" as a shopdoor. A
shopdoor is lockable. A shopdoor is usually locked. The matching key of
a shopdoor is the passkey.

The passkey is a thing. The description is "A shiny brass key with a lot
of teeth." Understand "shop key", "pass key", and "shop door key" as the
passkey.
[/code]

However, when I include Deluxe Doors, the same code produces these
compiler errors:

Problem. You wrote ‘The matching key of a shopdoor is the passkey’  :
but this seems to say that a general description is something else, like
saying that ‘a door is a number’.

Problem. You wrote ‘The passkey is a thing’  : but one description
cannot equal another, by saying something like ‘a container is a room’
(not true!) or even ‘a dark room is a room’ (true but a tautology, so
not allowed because it suggests that something else was meant instead).

Since the word ‘passkey’ is not used at all in your extension … I’m
baffled. Can you spot the problem?

The same bugs pop up when I try to include Implicit Actions by Eric Eve.
Something to do with the implementation of doors, I’m sure….

–JA

posted by admin in Uncategorized and have Comments (3)

I7: Taking an NPC's possession

I know this is in the manual, but as usual, I can’t find it. There are
several closely related topics in the TOC for chapter 12, but nothing
about this particular topic.

It’s necessary for me to allow one particular thing to be taken from an
NPC. (It’s in an open container, which the NPC carries.) This evidently
falls afoul of the can’t take people’s possessions rule.

So I need to override that rule in this one particular case. How would I
do that? Since I need the action to succeed, writing an instead or
before rule doesn’t seem quite right — if I do that, I’ll also have to
move the object myself (and check that the player’s hands aren’t full,
etc.).

Also … will the thing still be considered to be a possession of the
NPC after it has been removed from him? Or is the concept of
"possessions" only active when an object is _currently_ within the NPC
in the containment hierarchy?

This is an interesting philosophical distinction, though it probably
slips beyond the bounds of modern IF library design. What happens if the
NPC steals something from the player? Does it then become the NPC’s
possession? I know possession is 9/10 of the law, but….

–JA

posted by admin in Uncategorized and have Comments (6)

worn/carried by person out of play? (Inform 7)

Hello.

None of my objects are being carried or worn by the characters who
initially have them. When I examine the person who should have them or
try to examine the object I am told "You can’t see any such thing." as
though it were absent.

When I use the "showme [object]" command it says who they’re worn or
carried by before adding "out of play" whatever this means. For
example…

hair grip – thing
location: worn by mother out of play
unlit; inedible; opaque; portable; wearable; singular-named; proper-
named; unexamined
description: A simple wire hair grip.
printed name: hair grip

How do I solve this?

posted by admin in Uncategorized and have Comment (1)