how to detect verbose and brief modes

Hi guys! Another quick question, if anyone can help:

I’m making use of Emily Short’s menu system, and am making a Setting Options section. Using the code sample in Inform 7’s documentation, I added the Notify Mode for notifying the player of score changes, and thought, another setting that could be useful is having the Verbose mode turn on or off. (I usually prefer to have it on, myself)

This is how my Table of Setting Options looks:

Table of Setting Options title subtable description toggle "[if notify mode is on]Score notification is on[otherwise]Score notification is off[end if]" -- -- switch notification status rule "[if verbose mode is on]Verbose is on[otherwise]Verbose is off[end if]" -- -- switch verbose mode status rule

I tried copying the score notification, but changing the wording:

[code]To decide whether verbose mode is on:
(- verbose_mode -) ;

This is the switch verbose mode status rule:
if verbose mode is on, try switching brief mode on;
otherwise try switching verbose mode on.
[/code]

I’m not sure what the correct wording for handling verbose and brief modes is. This brings up these errors:

[code]Problem. You wrote ‘if verbose mode is on, try switching verbose mode off’ : but this is not an action I recognise, or else is malformed in a way I can’t see how to untangle.

Problem. You wrote ‘otherwise try switching verbose mode on’ : again, this is not an action I recognise.
[/code]

Any advice would help :slight_smile:

Hi there,

First of all, there are three settings for this: brief (the standard mode), verbose, and superbrief (which never shows descriptions). The current setting is stored in an i6 global variable called “lookmode”. This isn’t discussed in the main documentation, but can be discovered by searching the template document (appendix B on the website). I6 variables are (basically) all numbers, so I’ve created a new kind of value to make it easier to read. (1, 2 and 3 are automatically converted to standard, verbose and superbrief.) There are also three actions used to switch this setting which can be located in the actions index under “Actions which happen out of world.” Try adding this code to your example:[code]Table of Setting Options (continued)
title subtable description toggle
“Room descriptions are currently set to [current-lookmode].” – -- toggle lookmode rule

Lookmode is a kind of value. The lookmodes are standard, verbose and superbrief.

The current-lookmode is a lookmode that varies.
The current-lookmode variable translates into I6 as “lookmode”.

This is the toggle lookmode rule:
if the current-lookmode is:
– standard: try preferring unabbreviated room descriptions;
– verbose: try preferring abbreviated room descriptions;
– superbrief: try preferring sometimes abbreviated room descriptions.
[/code]Note that the tabs might get screwed up when you copy and paste from this board, so you might have to fiddle with it a bit. I’ve tried it on my end and it works. You can test it by adding these rooms:The Lab is a room. "This is the description of the Lab." The player is in the Lab. The Back Room is north of the Lab. "This is a description of the Back Room."Hope that helps!

EDIT: The tabs do get messed up. As long as you replace the “” in the following code with an actual tab stop, you should be okay.This is the toggle lookmode rule: <tab>if the current-lookmode is: <tab><tab>-- standard: try preferring unabbreviated room descriptions; <tab><tab>-- verbose: try preferring abbreviated room descriptions; <tab><tab>-- superbrief: try preferring sometimes abbreviated room descriptions.

The people on this forum are so helpful, it’s great! I don’t think I would have worked that out on my own, so thanks. My story is coming along quite nicely now. I’ll have to go and check out that Appendix B template document, and see what other stuff is in there.