Writing Looking rules for a blind character

I’m trying to make a game where the player is blind at the beginning. I’ve been working on the rules for actions requiring sight (e.g. looking, examining, etc.), and I plan to eventually turn this into an extension. I’ve already finished the examining action - it’s pretty easy, just change it to writing the “blind description” of the object - but the looking action is SO MUCH MORE annoying.

First, I tried just changing it from writing the “description” to the “blind description” of the room - it couldn’t figure out what the visibility level count was. What? It’s a Carry out looking rule - it should know what the visibility level count is from following the Setting action variables rule(s). I had to do something like this with Examining, but that was one line: “Examine text printed is a truth state that varies.” I have no idea how Inform figures out the visibility level count, though, and it would be an absolute PAIN - both for me and the interpreter - to copy all that code and then change one or two lines.

Next, I tried rewriting the rule for “print the location’s description”, before realizing it wasn’t an activity. So naturally, I looked for it in the Standard Rules, to figure out HOW to rewrite it. What I wasn’t expecting to see was this:

To print the location's description:
	(- PrintOrRun(location, description); -).

Agh! Inform 6! I had no idea how to deal with this, so I turned to the Documentation for help on how to write I6. I couldn’t find ANYTHING about PrintOrRun! So, that crossed out a possible solution.

I then gave up and decided to just have the player never come back to the rooms they were blind in, thus just using the “description”. But there’s still a big problem: it says “You can see…” when describing a room, and, well, cough cough the player is BLIND!

I tried following where it goes when it prints the objects in a room, and that led me to the “to describe the locale for” rules, which in turn led me to the printing the locale description of something activity, and oh my lord, that rule is LONG! (The “you-can-also-see” rule, I mean, which is what prints… well… the “You can also see…” part of the room description.) I do NOT want to have to copy-and-paste THAT rule.

I want to change it to say “There is” or “There is also” instead of “You can (also) see”. How can I get it to do that without rewriting the entire rule?


This is a very interesting concept. You might consider objects such as a red tipped cane and/or a guide dog to help with “vision”, mobility, and navigation.


1 Like

These are responses – see documentation chapter 14.11.

The you-can-also-see rule response (D) is "[regarding the player][can] also sense ".
The you-can-also-see rule response (E) is "[regarding the player][can] sense ".

The built-in documentation does not try to describe Inform 6. You can read the I6 manual at http://inform-fiction.org/manual/html/index.html , if you want, but it’s probably too much work for what you’re trying to do here.

It would be perfectly reasonable to replace the existing room description body text rule (the “carry out looking…” rule) with your own rule. You don’t have to understand the visibility level count stuff – just copy it and modify the bit about “print the location’s description”.

1 Like

Or you could make the rooms call out to a To Say phrase. e.g.

"The cabin in the woods" by "Testa"

[The player can be blind or sighted.]
[The above won't work because the player is not of the kind "Thing". I'm not sure what the player actually is, a value that is set to the current player object maybe. Anyhow, no deal. So we have to work around that.]

The log cabin is a room. "[log-cabin-desc]".

To say total darkness:
	say  "All you see is darkness."; [If you're going to use the exact same phrasing for a lot of rooms, might as well type it only once.]

To say log-cabin-desc:
	if the dark glasses are effective:
		say total darkness;
		Say "A fairly ordinary log cabin with a door open to the snowy outdoors to the east.";
The dark glasses are a wearable thing in the log cabin. The initial appearance of the dark glasses is "On the stone overmantel are a pair of very expensive and very dark eyeglasses."

The dark glasses can be effective or ineffective. [These are a thing, of course, so they can have adjectives attached.]

To decide if the dark glasses are effective:
	if the player is wearing the dark glasses:
		decide yes;
	decide no;

The snowfield is east of the log cabin. "[snowfield-desc]".

To say snowfield-desc:
	if the dark glasses are effective:
		say "It seems the darkness is a little lighter here.";
		say "Wow! What magnificent scenery! Mountains all around, and a little cabin to the west. Downslope is the ice-house.";
The ice house is down from the snowfield. "[ice-house-desc]".

To say ice-house-desc:
	if the dark glasses are effective:
		say total darkness;
		say "A fantasy carved from solid ice. The daylight glows spearmint blue through the walls.";

Test me with "take dark glasses/wear glasses/l/e/d/take off glasses/l".

A bit clunky perhaps, but it’s simple and it works.

Happy Holidays!

1 Like

It’s a good start, but problems arise if you have objects in the rooms. Then, you get “you can see… here,” even if blind.

Check out this discussion. @mjeleon has included the following, which are helpful:

Visibility rule when the player is blind: there is insufficient light.

To print the location’s description:
	if the player is blind...

Rule for listing nondescript items when the player is blind: ...

For printing a locale paragraph about a supporter:
	if the player is blind...

@zarf Right! I completely forgot that it’s possible to change the text of a response. Thank you!

While attempting to test, it wouldn’t load… couldn’t get past “Compiling Inform 7 to Inform 6”… but this is likely just caused by the fact that this is the first time I’ve attempted to run a project since I migrated to a new computer yesterday. So I’m currently unsure as to whether it works or not.

If you’re using a new Mac, you need to download the latest Mac Inform IDE.

1 Like

It’s not new new, it’s a hand-me-down, but it’s still running 1.15 instead of 1.11. (A signifigant upgrade, and I am very happy. :grin:) I’ll try it.

Edit: Apparently, according to both the website and the App Store, the most recent version is from 3 years ago. The most recent one on the website is from December 2015… I’m not sure which one is better, or if they’re the same. If there’s a newer version somewhere out there, please link me to it!

The Inform 7 downloads page is not exactly crystal clear on this, but the latest Mac version available there was actually updated on 14 November 2019. It is mentioned in the last sentence of the 7.9.3 description.

1 Like

@Angstsmurf Ah! Thank you! I didn’t read the description, just looked at the big date. (Note to self: read the fine print. It’s important.) I downloaded that, and it loaded.

@zarf Your suggestion worked! I tried that, and it said “You sense” when I loaded it up and looked at the first room (which has a door between it and the other room). Now I’m just trying to figure out why it’s having issues with my understand rules for the testing commands I just created, turning blindness on and turning blindness off…

Edit: I fixed the problem. I noticed the little “or” right before the “as turning blindness on” that I’d missed.

The PC’s blindness is temporary or permanent ?

This question is because many, many eons ago (mid-90s) I toyed (with Inform 5.4 and ADL) around the concept of “blindfolded prisoner escape” with unsatisfying results.

Best regards from Italy,
dott. Piergiorgio.

1 Like

It’s temporary. The game idea is that the PC has been blind their whole life, and they are suddenly given the chance to see.

Thanks for this, I’m thinking through some of the same issues as I’m trying to more or less substitute “sense” for “see” for a blind protagonist.

1 Like

Out of curiosity, why change all the messages back and forth instead of just making a new substitution?

To say sense-or-see:
    if the player is blind, say sense;
    otherwise say see.

Then just redo the messages once, replacing [see] with [sense-or-see]. It should still conjugate the verbs as expected.

@lizzard No problem! I’m actually planning to make this into an extension once I smooth out all the issues, so you can use that if you want (though it might take a while… hehe).

@Draconis That… is genius. fixes code Except… um…

Waiting Room

You can sense an office door here.

>let me see
Blindness is now off.

Waiting Room

You can sense an office door here.

“let me see” is one of the many phrasings of one of my testing commands, Turning blindness off. (I actually just had some issues with it that I fixed, that’s in another thread and I can link you to it if you want.) In the response to that last command, it should be saying “You can see an office door here”, of course. So I’m confused as to why it says “sense”…

Hm, I’d need to see more of your code to know what’s going wrong, but I’m assuming “if the player is blind” isn’t the right way to word the conditional.

@Draconis Ah! Yes! I forgot. “The player” is apparently a value that changes; so I have it so that “Yourself can be seeing or blind.” I also have handy To decide phrases set up defining “we are blind” and “we can see”, so I switched it to those. But the same thing happened… I’m so confused…