New to I7: a couple questions

  1. How can I make it so Inform doesn’t display what objects are in a room? (It would be helpful if it was a wildcard which works for all objects)

  2. How can I make it so Inform will say something different everytime (Well, not everytime, more like two or three times) I do an action on it?

  3. How can I make a Hint system?

  1. If you want any given object to be not displayed in the room description, make it scenery. “The cabinet is scenery.” This will also automatically make it something that cannot be picked up (which is reasonable, since objects that can be picked up and dropped anywhere should certainly proclaim their presence).

If you want to stop all objects from being displayed in the room description, there are more rigorous ways to do so, but this would generally be a very bad idea.

  1. I’m not sure what you mean with “everytime I do an action on it”… an action on what? Could you give an example? The easiest method for making text that varies is to write something like: “You see [one of]a brick[or]a book[or]an elephant[purely at random].”, or “You see [one of]a brick[or]a book[or]an elephant[stopping].”

  2. You’ll want to install the Simple Menus extension by Emily Short and check its documentation. There may also be dedicated Hint-extensions; be sure to check the website.

Hello.

VictorGijsbers gave some good answers. It’s a little hard to tell from your questions what exactly you want to do (which makes it hard to say how to do whatever that is), but here’s what I thought about while reading your questions:

For example, if in #1 you mean:

a) You’d like to simulate a room with lots of things in it that the player-character can see at some times but not at other times. In this case, you could either just make the room dark (and then the player-character won’t be able to see anything) and have a light switch they can turn on, or you could have something like a blindfold in which case you’d write special rules about the ‘looking’ action, such as:

Instead of looking while the player is wearing the blindfold, say “You can’t see anything since you’re blindfolded.”.

b) You want to have some things in a room that are always visible, but other things that start out hidden. There are lots of ways to do that, but it depends on what the hidden thing is and why it’s hidden–for example, is it up on a shelf that the player-character isn’t tall enough to see onto? Is it a ghost that fades in and out of existence as it pleases? Is it something that’s usually invisible, but can be found if the player-character is wearing some special x-ray glasses?

c) You meant your question to be understood in a very literal way–in which case I couldn’t really answer at all without knowing more. Generally speaking, if a character can’t see something the character can’t interact with it, and if there’s something a character will never see (and therefore never interact with) I’m not quite sure why you’d want to have such an object, or what purpose it would serve;

d) You meant that the player-character can see the object but just that you don’t want it described along with the room, in which case the “scenery” suggestion is the way to go.

In #2, I’m guessing you mean you want to do something like this:

take bag
You pick up the bag.

take bag
You heft the bag over your shoulder.

take bag
You lean down and snatch the bag.

If that’s what you meant, this would involve writing “Report” rules for certain actions, or maybe “After” rules (depending on how you want it to work). For example, you could have a rule like this:

After taking the bag:
say “[one of]You pick up the bag[or]You heft the bag over your shoulder[or]You lean down and snatch the bag[at random].”.

#3 could be pretty complicated. If you’re making a game just for one special person, it might be easier to just write out some clues and tell them they’ll have more fun if they only look at the clues you wrote when they’re really stuck. If you’re making a game for a larger group of people, if it were me I wouldn’t worry or even spend any time at all thinking about a hint system until I had completely finished my game and had a few friends try it out, to see which puzzles they have trouble with; then I’d try to make in-game hints for puzzles that everyone found somewhat hard, or that at least one person found extremely hard (even if everyone else breezed through it). Making a hint system is a pretty advanced thing to do, though, and the reason I suggest waiting until after you finish your game is that you’ll need to build up your coding skills before you try to do it.

If you’re just starting out with Inform 7 and either haven’t read much of the manual yet or are having trouble understanding the manual (I myself found it fairly hard to understand at first), one of the regulars on this forum wrote a really excellent and easy-to-follow guide called “The Inform 7 Handbook.” There’s a link to it on the Inform 7 web-page in the news section, or you can go straight to source at http://www.musicwords.net/if/i7hb.htm and get it there. I’d highly recommend downloading this handbook (its a pdf file) and reading through it, as you’ll probably be able to read the whole thing in an hour or two and it explains pretty much everything you need to know to quickly get started making games with Inform.

Whoops! In the first post, I forgot to mention that I had already done this to objects which don’t (or can’t) be picked up.

Why would it be a bad idea?

Something like this:

">look at stuffed bear
You would have a long description here

look at stuffed bear
You would have a short description here"

There would also be another instance with something similar:

">look at box
It’s green.

look at box
It’s yellow.

look at box
It’s orange."

Okay.

It would be similar to this. The character you play as can see and interact with something, but the game doesn’t tell the player that the object is there at first. For example:

"You are in a room with a pool table in the center and a few chairs on all sides of it.

look at pool table
There is a cue stick on the table.

pick up cue stick
Taken."

I think that would work with what I said before with the box changing colour.

Okay.

Thanks!

Oddly enough, in poking around on my hard drive, I found an example game that does almost exactly this:

[code]The Billiard Room is a room. “A handsomely appointed billiard table dominates the center of this room.”

The billiard table is a scenery supporter in the Billiard Room. The description is “It’s big and green[list-table-stuff].”

The white ball and the cue chalk are on the table. The indefinite article of the cue chalk is “a piece of”.

To say list-table-stuff:
let L be the list of things on the billiard table;
if the number of entries in L > 0:
say “. On the table you can see [a list of things on the billiard table]”.

The describe what’s on scenery supporters in room descriptions rule is not listed in any rulebook.[/code]
The main limitation of this code is that now the stuff lying on scenery supporters won’t be listed in ANY room, not just in the Billard Room. Here’s an alternate way to do pretty much the same thing, without that limitation:

[code]The Billiard Room is a room. “Comfortable-looking leather chairs stand against the oak-panelled walls of this room. Overhead, a single hooded light fixture shines down.”

The billiard table is a supporter in the Billiard Room. The description is “It’s big and green[list-table-stuff].”

The white ball and the cue chalk are on the table. The indefinite article of the cue chalk is “a piece of”.

Rule for writing a paragraph about the billiard table:
say “A handsomely appointed billiard table dominates the center of the room.”

To say list-table-stuff:
let L be the list of things on the billiard table;
if the number of entries in L > 0:
say “. On the table you can see [a list of things on the billiard table]”.[/code]
In the second version, the billiard table is not scenery, so Inform will want to write a paragraph about it. We replace the default rule for doing this with a rule that doesn’t mention what’s on it. The side effect is, now we don’t mention the table in the room description.

Try both versions and see which one you like better.

–JA

Well, if you do something truly rigourous, like simply kill off Inform’s routine that prints objects in the room description, it can have a lot of unintended side effects. But again, it might be easier to discuss with an example.

My previous example with [one of]…[or]…[stopping] would work perfectly here.

Well… using one of the Menus extensions, it’s not so bad. Check out Adaptive Hints by Eric Eve: inform7.com/extensions/Eric%20Ev … index.html . You’ll also need to install Menus by Emily Short.

This whole billiard table-cue stick discussion is pretty interesting. I found it very confusing when learning Inform 7 why an activity called “printing room description details of something” would effect not only (as one would expect) “printing room description details,” but also “printing details while directly examining an object” (so to speak), which necessitates writing extra rules such as:

Report examining a supporter which supports something:
say “On [the noun] [is-are] [list of things on the noun with indefinite articles].”.

when one only wants to get rid of something like:

You see a billiard table (on which is a cue stick) here.

in a room description.

In any case, as an example for Briefcase that there are usually a few different ways to accomplish something in Inform, my first thought when looking at Jim Aikin’s billiard table example is that I would have wrote something like this:

[code]The Billiard Room is a room. “Comfortable-looking leather chairs stand against the oak-panelled walls of this room. Overhead, a single hooded light fixture shines down.”

The billiard table is a supporter in the Billiard Room. The description of the billiard table is “A full-sized billiard table with amber felt and a polished cherrywood frame.”.

The cue stick is on the billiard table. The description of the cue stick is “A slightly warped old cue stick. Despite its worn appearance, a subtle glow seems to surround it.”.

Rule for printing room description details of the billiard table: omit contents in listing.

Instead of examining the billiard table:
say “[description of the noun][line break]”;
try searching the billiard table;
rule succeeds.[/code]

which of course does pretty much the same thing as Jim’s example, but in a slightly different way.

I’ve taken everyone’s advice and things seem to be working perfectly except for this:

The large table is in the laundry room. The description is "The table is highly stylized." The hammer and screwdriver is on the large table. The description for the screwdriver is "The screwdriver is bent out of shape."

I’m getting this error:

I think you need to use ‘of’ instead of ‘for’ when assigning a description:

The large table is in the laundry room. The description is "The table is highly stylized." The hammer and screwdriver is on the large table. The description of the screwdriver is "The screwdriver is bent out of shape."

Note that it now reads “The description of the screwdriver” instead of “The description for the screwdriver”.

How can I make it so Inform doesn’t display what objects are in a room?

Maybe I’m missing something, but I think there’s a simpler answer than making it scenery or fooling with the descriptions of all things in all rooms. It’s something like:

Rule for writing a paragraph about the pool cue: now the pool cue is mentioned.

Though if a person tries to pick it up on a blind guess that it exists, they’ll succeed. If you don’t want that, you can put the cue in limbo and only move it to the table after the table is examined.