Basically, I want to kill the default rule that prints the items on a supporter when Inform prints the room description and only have it print those items when the supporter is examined or searched.
Ideally, I would like this to be something I can switch on and off, so that 90% of the time it won’t print those items, but I could allow it to do so the 10% of the time where I find it helpful.
I’ve seen examples in the I7 documentation that deal with this general idea, but all of the ones that I’ve found seem much more complicated than what I want to do and I was getting lost in the details.
Example 357 “The Eye of the Idol” seems very close to what I want to do, especially when it deals with supporters that are scenery. I have a nightstand that is a scenery supporter and I want the items on it not to be listed when the room description is printed.
But this example deals with in-place and out-of-place objects and I’m getting a bit confused by that as I don’t think it’s necessary for what I’m trying to do. I simply want to kill the inclusion of anything on the nightstand.
I hope that makes sense. Thanks in advance!
I use this phrase often–
The describe what's on scenery supporters in room descriptions rule does nothing when the item described is the nightstand.
It’s an activity rule, so you can find it and a number of others in the chapter on activities. Specifically (7) in S18.28 of the manual. Of course, the ‘item described’ can be whatever supporter you want to blank out. You can also make it object-specific–
The describe what's on scenery supporters in room descriptions rule does nothing when the item described is the holder of the wine glass.
This is pretty useful if you want to write a special paragraph about the thing on the supporter, which you could then do by–
Rule for printing a locale paragraph about the holder of the wine glass:
if the holder of wine glass is not a room:
if the player is not enclosed by the holder of the wine glass:
say "[wineglassapp][paragraph break]";
now the holder of the wine glass is mentioned.
To say wineglassapp:
say "A particularly clear and remarkable-looking wine glass sits on the [holder of the wine glass]."
I hope that this helps!
Thank you so much! I’m giving it a try after lunch. At least this quarantine has given me more time to work on my game, if nothing else.
It worked like a charm! Thanks again!
Looks like you found something that works!
I took a crack at it as a learning experience here’s what I came up with (after looking through the source). This is for a more generalized rule for supporters.
a supporter can be discreet or nondiscreet. a supporter is usually discreet.
Rule for deciding the concealed possessions of discreet: yes.
instead of examining supporter:
if the supporter is discreet:
say "[the description of the noun]";
say "On the [noun] is ";
list the contents of the noun;
continue the action.
home is a room.
the table is a supporter. the description of the table is "A beat up table, with flecks of gum you tried to pull off.".
the coffee mug is on the table.
the table is in home.
the chair is a supporter. the chair is nondiscreet.
the beercan is on the chair.
the chair is in home.
Ok, so I have another question.
I have a bed in a bedroom in my game and, at one point, the player awakens in it. The bed is an enterable supporter. I don’t like the tag “(on the bed)” that shows up next to the name of the room in the room header. “(in the bed)” makes much more sense for a person.
I could change the bed to a container, but then I’m afraid I’ll have the opposite problem. Anything placed on the bed will be prefaced with “In the bed…” when the bed is examined, which sounds wrong, especially for pillows, sheets and the like.
In other words, people are usually in beds while things are on them.
The easiest thing would be to change the “(on the bed)” tag when giving the room description, but I’m not sure how to do it. I can add (in the bed) by doing the following:
After printing the name of a location:
if the player is on the bed:
say " [roman type](in the bed)";
But that just gives us this silliness:
Bedroom (in the bed) (on the bed)
I’ve gone through the activities and rules, but I can’t figure out how to change this tag.
Any help would be appreciated!
That’s something that is set by the ‘room description heading rule’. You can change this in that specific instance by saying–
The room description heading rule response (B) is "[if the player is on the bed] (in the bed)[otherwise] (on [the intermediate level])".
Response (B) is for enterable supporters. Don’t forget the space before the open parenthesis–it’s printed right after the room name.
You can really say anything when you change this response–just remember to have an [otherwise] for the generic response.
Is there a place where I can find a list of all of the rules, especially a searchable one? When I click on “rules” under the index tab, I’m not able to find what I’m looking for.
I suspected there would be a rule dealing with “heading” that might help me out, but I wasn’t sure how to find it.
Thanks again, you’ve been a huge help!
You can select File > Open Installed Extension > Graham Nelson > Standard Rules to get everything and search on that. This solution might be overkill for you but it’s definitely all in there.
Not all of the rules are in Rules. Many are in Actions. So, if you are looking for a rule that is specific to an action then go to that action in the alphabetized index or the commands index and search on that page.
For your example, you go to the “looking” index and look through those rules to find “carry out room description heading rule”.
We are glad to have been of help!
By the way, regarding the in-room supporter text, you don’t need to explicitly mark anything as mentioned. Simply writing it out in bracketed form is enough to mention it. So you can get the rule fairly concise, although I’d still recommend you make provisions for placing more than one thing on the supporter:
The bar is a supporter in the Bar-Room. It is fixed in place. The wine glass is on the bar. The bar is enterable.
Rule for printing a locale paragraph about a supporter (called surface) when the wine glass is on the surface and the player is not on the surface:
say "A particularly clear and remarkable-looking [wine glass] sits on [the surface].";
if something unmentioned is on the surface, say "[line break]Next to the glass you can see [a list of unmentioned things on the surface]."
The player holds the stone.
One more idea that might be helpful for tracking down a specific rule, in case you didn’t, for example, know that the word for the room description heading is called a “heading”.
You can use one of the testing commands: RULES. Try going to the room you are working on and type “rules” and type “look”. You will see a big list of all the rules that are firing off as well as the printed responses. Just before the room description heading is printed out, you should see:
[Rule “room description heading rule” applies.]
That tells you the name of the rule that is printing the specific response you are interested in changing.
FYI, there are a bunch of useful debugging tools in Inform 7 like this.
You can track them all down by going to the Commands index and search on the string “a testing command”, but the majority of these commands are documented in detail in:
§24.3. High-level debugging commands
§24.4. Low-level debugging commands.
You might want to spend a little time playing with these different testing commands so you can understand what sorts of authoring problems they help you solve.