Discussions about interactive fiction

Archive for May, 2012

Survey done.

Thanks to all who participated.

http://raifsurvey.jottit.com

Conrad.

.
posted by admin in Uncategorized and have No Comments

I7: Regions and Room Names

I have several rooms that logically belong in a region I’m calling the
road-region. One of the rooms is called At the Foot of a Bridge. I7 is
reluctant to add it to the region. This works:

The road-region is a region. The Lane, the Long Road, the Road That
Smells of Oleander, and the Road Past the Great Hall are in the road-
region.

But this doesn’t:

The road-region is a region. The Lane, the Long Road, the Road That
Smells of Oleander, At the Foot of a Bridge, and the Road Past the
Great Hall are in the road-region.

If I do that, I7 creates a _second_ room, also called At the Foot of a
Bridge, thereby breaking the map into two unconnected sections.

This could be because the region-building code doesn’t like
complicated room names, or it could be because I’m defining the road-
region in Book 2, while At the Foot of a Bridge is declared in Book 3.
Or maybe the problem lies elsewhere.

Can anyone suggest how I might be able to get this room tucked away
into the region? Thanks!

–Jim Aikin

posted by admin in Uncategorized and have No Comments

I7: Question about instead alternatives

Hey all.  I’ve been using an older version of Inform, but I’ve been
looking at the newest version and had some questions.

In some of the older threads around here, people (myself included)
were having trouble with slow run times.  Some of the suggestions were
cutting down on the number of tables or how often those tables are
checked, not using so many "insteads", etc.  I’m going to go ahead and
assume that these things are still valid suggestions, and if some sort
of internal aspect of the new builds has changed and they are no
longer needed, someone let me know.

So. Issue.  Ways to get around Instead and actually display the text I
want displayed.  Example:

The Sundial Room is a room.

The gnomon is carried by the player.  "A piece of an ancient time-
keeping device.  Priceless and a bit delicate, seeing as how this one
is made out of clay."

Carry out dropping the gnomon:  say "What, and watch it break into a
million pieces when it hits the floor?  Heck no."; reject the player’s
command.

The above example results in the phrase "dropped" after the relevant
text.  Using "Before dropping the gnomon" works fine, but I’d been led
to believe that too many uses of Before and After could effect the
game’s play speed as well (again, something to do with when "instead",
"before" and "after" are checked as opposed to "carry out").  Is there
a simple way to do it with carry out?  This is just an example for
dropping, but it could be applied to almost every other verb in the
language, where the new result is followed by the default reply.

I know this isn’t going to be a problem with a game of few rooms and
limited complexity/interaction.  But at a certain level of complexity
it was (in an older build of Inform) becoming an issue.

posted by admin in Uncategorized and have Comments (2)

I7: Greeting Protocols and Reflexive Pronouns

As I work on a simple npc conversation setup, two questions arise.

First, ‘say hello to troll’ seems to be firing an action called
[answering the troll that "hello". What is this action, and how would
I modify it so as to produce a reply? (Eric’s Conversation extension
does this, but seems to cause other problems. Or maybe it’s my
ignorance that’s causing the problems. Whatever. I want to learn to do
it myself.)

I’m reading the page on "Answering something that some text" in Index
> Actions, but this page doesn’t provide enough information to tell me

what syntax I would use to create an output in response to a specific
input when directed at a specific npc. Nor does it cross-reference a
page where that information may be tucked away. Where can I find it?

Second, using the methods in 7.7 of the Recipe Book, this input works
— ‘ask troll about troll’ — but this one doesn’t: ‘ask troll about
himself’. I could make "himself" a synonym for the troll, but that
would allow silly inputs like "x himself", so it’s a bad idea. Is
there any easy way to inform Inform that when the second noun is
"himself" it has the same meaning as the noun (but only when the noun
is a male person), and the same with "herself" for a female person?

Thanks!

–Jim Aikin

posted by admin in Uncategorized and have No Comments

I7: Inventory Listing

I’d like to customize this output:

>i

You are carrying:
   some muddy boots (being worn)

The idea that one carries boots when they’re being worn (or, for that
matter, that one carries _anything_ when it’s being worn) is not very
graceful. Much better would be:

>i

You are carrying:
   a rusty sword
   a jewel of great value
You are wearing:
   some muddy boots
   a top hat

How can I adjust the inventory listing output so that it doesn’t say
the player is carrying things that are worn?

–Jim Aikin

posted by admin in Uncategorized and have No Comments

I7: string formatting?

I have a table which I want to print out in a nicely formatted way,
preferably tabbed into columns.

The contents of most of the columns vary from line to line, and with
variable letter spacing the whole thing ends up being rather
unreadable.

I’ve tried using fixed letter spacing but that doesn’t help either.

Is there a way to print out a table in a nicely formatted way?  I
can’t find anything in the documentation, the Recipe Book or the
extensions, so I’m guessing not.

Any help would be much appreciated.

Regards,
Paul.

posted by admin in Uncategorized and have Comment (1)

Lots of Inform 7 questions

Hi.

I’ve been writing an IF using Inform 7 for a class. It’s due tonight
and I’ve been having a lot of problems tying everything together.

I’m trying to use [If unvisited][otherwise] to say things only if the
player has never been in that room before, but it still displays the
first thing every time I visit a room. Here’s an example of how I’m
using it:

The Mansion is a region. James’s Room is a room. James’s Room is in
the Mansion. James is a man in James’s Room. Instead of examining
James: say "You know your friend James, a millionaire’s heir, to be
quite the ladies man, despite his appearance. The first woman he ever
loved just happened to be the mother of his son, Ashlie, who, though
the two broke up, has been living with him to provide a better home
for their son. Lately, James has been caught up with Rene, an ex-
prostitute he found on a night of loneliness.". "[If unvisited]You
enter James’s room. You see your friend sitting on his bed, obviously
upset about something. Maybe you should ASK HIM ABOUT SOMETHING.
[otherwise]James is gone. You probably shouldn’t be in here if he’s
not". Understand "him" as James. After asking James about "something",
say "James looks up at you and says, ‘Oh. Hey. It’s Rene… She’s
pregnant, but the baby might not be mine. She started working for her
pimp again.’ Uh, maybe you should LEAVE James alone right now. The
door is that black oak panel that is closed to the west."

The prompt to ask James something displays every time I enter James’s
Room, even though there are no compiler errors.

Twice in my game, I want to move a character from one room to another,
but after the action that’s supposed to lead to a character being
moved, the character remains in the same room and the player can still
interact with him there. Example:

The black oak panel is west of James’s Room and east of the Grand
Hallway. The black oak panel is a door. The black oak panel is closed
and unlocked. The Grand Hallway is in the Mansion. Ashlie is a woman
in the Grand Hallway. Instead of examining Ashlie: say "Ashlie lives
with James, the father of her son Harley. She’s very unhappy about the
addition of Rene under their roof.". After going to Grand Hallway: say
"[If unvisited]As you leave, James rushes out, darting down the hall.
A few moments later you hear the front door slam. Ashlie asks what’s
wrong. You jump; you didn’t know she was there. Should you TELL HER
ABOUT RENE? Would James mind? Maybe you should TELL HER ABOUT NOTHING.
[otherwise]Ah, yes. How very grand is this hallway.". After going to
Grand Hallway: move James to Cafe. Understand "her" as Ashlie. After
telling Ashlie about "Rene", say "Ashlie is shocked. And calls up
Erin. Maybe telling Ashlie wasn’t the best idea.". After telling
Ashlie about "nothing", say "Ashlie shrugs. ‘OK, don’t tell me. Just
make sure he doesn’t do anything crazy.’"

James stays in his room, again though there are no compiler errors.

In a part of my fiction, I’ve set up rules for saying yes and no:

"[If unvisited]You stop in the local cafe. As you approach the
counter, you see Rose, of all people, has noticed you and is coming
your way with a smile. ‘Hey,’ she says, ‘Have you seen Alan? He’s not
at work and you always seem to know what he’s up to.’ YES or NO?
[otherwise] You approach the cute cashier and order a latte and a
scone.". After saying no, say "She sighs. ‘Fine.’ Maybe he’s not
telling anyone anything these days, not just me. I can’t believe I
have to ask this when he’s my husband, but do you know what’s been up
with him?’ Should you TELL HER ABOUT ALAN?". After saying yes, say
"She almost seems surprised. ‘You do? Home? Oh. That’s odd. But, then
again, so many things have been odd lately. Do you know what’s been up
with him?’ Should you TELL HER ABOUT ALAN?". Understand "her" as Rose.
After telling Rose about "Alan", say "’What?’ Rose is taken aback.
‘I’ve…I’ve got to get out of here.’". After saying no, say "’OK.
Maybe I just need to ask him directly. I’ll see you later.’". After
going from the Cafe: move Rose to the Chimney House.

This compiles fine, but when I type yes or answer yes, it says "There
is no reply" or "That was a rhetorical question." Why isn’t it
adhering to the rule?

I’ve been trying to work out the endings of my game, but I can’t
figure out the syntax to do it. Throughout the game, the player has
been learning secrets from characters and been given opportunities to
share those secrets. I want to base my possible endings on whether or
not the player shared secrets. The ends I want are:

If the player told Rose about "Alan": end the game by saying "Rose
ended up leaving Alan after you told her about his dealings with the
mob. Word got around and Erin pursued full custody of the twins. With
nothing good to live for, Alan’s life became completely absorbed by
the mob. I bet you’re feeling pretty good right now, huh?"

If the player told Jane about "Marie": end the game by saying "You get
a text from a friend telling you to go to the nearest TV and turn on
the local news. Marie is getting arrested! Man… What a shame!"

If the player told Rose about "Alan" and told Jane about "Marie": end
the game by saying "In the next few weeks, you see how you changed a
few lives dramatically. You get a text from a friend telling you to go
to the nearest TV and turn on the local news. Marie is getting
arrested! Man… What a shame! Rose ended up leaving Alan after you
told her about his dealings with the mob. Word got around and Erin
pursued full custody of the twins. With nothing good to live for,
Alan’s life became completely absorbed by the mob. I bet you’re
feeling pretty good right now, huh?"

Otherwise: end the game by saying "Well! What a day! You dodged some
bullets and any slip ups didn’t lead to anything that wouldn’t have
happened otherwise. Phew… Tomorrow, you’re staying in."

Also, I want don’t want the endings to occur until the player has
reached Your House, a room in the game. So, do I say something like:
If the player is in Your House and <conditional endings>

Thanks for any help.

posted by admin in Uncategorized and have No Comments

Deeply random thoughts: Why allow players choices?

Last night I was thinking scary theoretical (and/or heretical)
thoughts about games and stories. You might be interested in the
ideas: http://www.mxac.com.au/drt/WhyChoice.htm

posted by admin in Uncategorized and have Comments (12)

I7: Run-Time Error

I’ve block-copied Ex. 91 ("The Art of Noise") from the manual into my
WIP, removing only its game name and the room and test stuff at the
end — the code itself is unedited. I then added a noise to an old
pump in my starting location. Here’s the output:

>listen

You hear
*** Run-time problem P11: Although  from the your former self is
allowed to have the property "sound", no value was ever given, so it
can’t now be used.

the drip-drip-drip from the pump.

I have no idea what "the your former self" might be, but I do have
this code elsewhere in the source, in order to give the player
character a name:

Elliott is a man. The player is Elliott.

This could conceivably be causing I7 to think there’s some PC
switching going on, which might account for the phrase "your former
self."

The explanatory text, in this case, is guessing wrong. Here’s what it
says:

This is a problem which really only occurs when Inform 6 code is mixed
in with modern Inform style, and that might mean that – unless you’re
using Inform 6 yourself – you are actually having trouble with an
extension which happens to use Inform 6 tricks in order to work.

Nope — there’s no I6 code in my game, and while I’m using two
extensions (Rideable Vehicles and Adaptive Hints) neither of them
could possibly be implicated in this error. The rideable vehicle is
not in scope when the error crops up.

For reference, here’s the code from Ex. 92:

<code>
A thing has some text called sound. The sound of a thing is usually
"silence".
The block listening rule is not listed in the check listening to
rules.
Carry out listening to something:
        say "From [the noun] you hear [the sound of the noun]."
Instead of listening to a room:
        if an audible thing can be touched by the player, say "You hear [the
list of audible things which can be touched by the player].";
        otherwise say "Nothing of note."
Definition: a thing is audible if the sound of it is not "silence".
Before printing the name of something audible while listening to a
room:
        say "[sound] from the "
</code>

This is beyond my ability to troubleshoot. Can anyone spot the
problem? Is it caused by an incompatibility between Ex. 91 and 5U92?

Thanks.

–Jim Aikin

posted by admin in Uncategorized and have Comment (1)

I7: Example 101 ("the down")

I’ve copied the gist of Example 101 ("Bumping into Walls") into my
WIP, but here’s the output:

>s

From here, the only way out is to the down.

…or, in a different room:

>n

From here, the viable exits are to the east and the up.

I’d like to get rid of "to the" in the first instance and "the" in the
second. Without these modifications the example code is really not
usable. These are two separate problems, I suspect — if there are
multiple directions, we need to keep the "to", and that word is being
added by the example code itself. But the "the" is being supplied at a
deeper level, not as part of the example code, and I couldn’t begin to
guess where it’s coming from.

For reference, here’s the code in the example:

<code>
Definition: a direction (called thataway) is viable if the room
thataway from the location is a room.
Instead of going nowhere:
    let count of exits be the number of viable directions;
    if the count of exits is 0, say "You appear to be trapped in
here." instead;
    if the count of exits is 1, say "From here, the only way out is to
[a list of viable directions].";
    otherwise say "From here, the viable exits are to [a list of
viable directions]."
</code>

Can anyone suggest how this might profitably be modified?

Curiously, my WIP concerns itself with a duck, so in this case we
really are trying to get "the down" off of the duck.

–Jim Aikin

posted by admin in Uncategorized and have No Comments