Looking in a room causing issues with Hybrid Choices

Hi,

In another post I said I was having problems with Hybrid Choices. Thanks to @StJohnLimbo I was able to identify the issue being caused by this rule that I have set up at the beginning of my game:

A room has some text called the unvisited_description.
instead of looking in a room:
	say  the unvisited_description of the location.

This rule allows me greater flexibility in printing the room description.

However, this rule messes with Hybrid Choices. Invoking CYOA also uses the ‘instead of looking in a room’, which is why, after tuning the VHF to CH71 and starting CYOA, rather than jumping to my first page in Hybrid Choices, it is printing the room description.

>tune vhf to 71
You tune the VHF to channel 71, and have a convo with the manager.

You are at the chart table, a large desk wide enough to accommodate paper charts and (rest of room description).

If I turn rules on, this is evident:

>tune vhf to 71
You tune the VHF to channel 71, and have a convo with the manager.

You are at the chart table, a large desk wide enough to accommodate paper charts and blah blah blah

>rules
Rules tracing now switched on. Type "rules off" to switch it off again, or "rules all" to include even rules which do not apply.

[Rule "parse command rule" applies.]
>l
[Rule "accept numbers rule" applies.]
[Rule "accept testing commands during CYOA rule" applies.]
[Rule "accept system commands during CYOA rule" applies.]
[Rule "accept items rule" applies.]
[Rule "print cyoa error message rule" applies.]
[Rule "declare everything initially unmentioned rule" applies.]
[Rule "generate action rule" applies.]
[Rule "determine visibility ceiling rule" applies.]
[Rule "announce items from multiple object lists rule" applies.]
[Rule "set pronouns from items from multiple object lists rule" applies.]
[Rule "before stage rule" applies.]
[Rule "basic visibility rule" applies.]
[Rule "basic accessibility rule" applies.]
[Rule "keychain-aware carrying requirements rule" applies.]
[Rule "instead stage rule" applies.]
[Rule "instead of looking in a room" applies.]
You are at the chart table, a large desk wide enough to accommodate blah blah blah.

[Rule "A first turn sequence rule" applies.]
etc

Any idea on how to get around this, short of removing my own look rule?

[edit]
Maybe I need to send them to a new room just for this conversation and put an exception in my ‘look’ rule to ignore this room…

1 Like

My question is how does your “instead of looking” rule help you? You’re messing with a core piece of how Inform 7 communicates the state of the world. It seems you’ve replaced the description of a room with a new property “unvisited_description”, but it’s unclear to me as to why.

2 Likes

Yeah, I have the same question as Phil - you might be able to just change your rule to a carry out one that has “instead” after the say statement, but not sure that’ll work with your setup.

1 Like

Hi @rileypb

After various state changes, the description of a room changes. I want the initial, unvisited description when they first enter a room, a second, shorter description when they revisit before doing anything, and then a third, longer description after they have done something and a state changes, and then a shorter description of the state change version. Here’s an example:

Cockpit is a room. Cockpit is in Esper. Cockpit is south of Entry Gates.  Lower Mast is up from cockpit. The unvisited_description of Cockpit is "[cockpit_long]".

To say cockpit_long: 
	say "You are standing at the helm in the cockpit of Esper, your 43ft ketch-rigged sail boat. [addcocklong]Being a centre-cockpit you are amidships. The cockpit is small but blah blah [if the player has the note][end if][if the player does not have note], and a note pinned to the cushions[end if]. At your feet is the engine panel. You can go up the mast, down to the saloon or to the starboard decks from here.".

To say addcocklong:
	if the inspection window is unlocked:
		say "She has two masts and four sails. The sails are named Head, Stay, Main and Mizzen. These are furled and unfurled by the winch you see in front of you. "
		
		
The description of Cockpit is "[if unvisited][cockpit_long][otherwise]You are standing at the helm in the cockpit. [addcockshort]You can go up, down or starboard.";


To say addcockshort:
	if the inspection window is unlocked:
		say "Esper has two masts and four sails. The sails are named Head, Stay, Main and Mizzen. These are furled and unfurled by the winch you see in front of you. "
1 Like

Okay, that all makes sense. But your instead of looking rule doesn’t accomplish what you want – it will always show the unvisited_description, and not the other descriptions. Additionally it leaves out the items in a location.

1 Like

It does accomplish what I want. See here:

Cockpit
You are standing at the helm in the cockpit of (long description follows). You can go up the mast, down to the saloon or to the starboard decks from here.


You can see a handle here.

>d

Saloon
You are in Esper's saloon, with a beam of (long description). There is a galley to port and an engine room aft of you. You can go up to the cockpit. 

>u

Cockpit
You are standing at the helm in the cockpit. You can go up, down or starboard.

You can see a handle here.

>

In this instance, the shorter version is displayed when revisiting the cockpit. All items are purposely left out because I want control over how the items are described.

Only the handle displays because I didn’t make it undescribed. This has been left here temporarily for testing purposes. Normally an item is undescribed and I customise the appearance in the room text.

Hmm. You must have some other looking rule, if you’re getting room names and items described.

No, that undescribed room rule is the only looking rule running in my code.

AFAIK, Inform doesn’t have a standard long descr/short descr when unvisited vs visited. I was surprised by this as this is normal, no? This is how it was back in the old days of text adventure, but maybe this expectation has changed.

I intend for my game to be quite descriptive, but I don’t think the player wants to read an extensive description when they re-enter a room. However, if the general consensus is that it doesn’t matter, then I can remove this rule and just run the same description.

@DeusIrae - maybe I could say ‘after player enters a room’ instead of looking in a room.

There are built-in actions for adjusting the room descriptions:

Preferring abbreviated room descriptions
Preferring unabbreviated room descriptions
Preferring sometimes abbreviated room descriptions

If you go to “index” and then “actions,” you can see them under the heading “Standard actions which happen out of world.”

I can’t remember exactly what they do. I think brief mode might print just the room name and…I’m not sure what else.

I’m not sure how often they get used.

1 Like

The original (Infocom-era) standard was to completely skip the room description (but still list objects) on the second LOOK and later.

Inform still supports this, but only if the player types BRIEF. The default is VERBOSE. In the 1980s it was the other way around, but in these modern times of large windows, VERBOSE is much much more popular and BRIEF has essentially disappeared from use.

2 Likes

That’s encouraging to hear, Andrew. Perhaps I’ll try dropping my ‘look’ rule altogether. It’ll certainly make setting up rooms easier.

I typically just have a description with one of… stopping to output a longer first-time text and then a shorter one on subsequent visits - no mucking with nonstandard rules required!

(I do think it’s sometimes nice to have this!)

1 Like

Adjusting the room description as the game progresses is still done (and a fine way to make the environment feel responsive and dynamic). You can do that with conditional text in the room description.

All items are purposely left out because I want control over how the items are described.

There’s a few ways to do that. You can square-bracket them in the room description, or set them mentioned.

4 Likes

I’ve used [one of] in a few instances and find it a great way of providing dynamism, but I’ve not used it specifically for room descriptions (NPC responses instead). This is a good idea. And because I set up my initial look rule, I’ve not experimented with ‘mentioned’ yet. Thanks for the heads up.

1 Like

Quick update: I removed my initial room look rule, removed the unvisited descriptions of rooms and now Hybrid Choices runs as intended.

Thanks, all, for your fast feedback, assistance and ideas.

1 Like