Having a 'nonexistent' sign be readable?

Cheers all. Another n00b question. My world has locations which are under surveillance and locations which aren’t. The former, at present, are defined as all those rooms which contain a Public Surveillance Notice (which is a thing, fixed in place, and has the description “A small sturdily-mounted sign reading ‘THIS AREA UNDER SURVEILLANCE.’”) To decide if a player is surveilled, I check if there is a Public Surveillance Notice in ‘the location.’

Well and good, this all works. But I realized I’m using an awful lot of memory for all these notice signs (approx. half the locs are surveilled) and they’re all exact duplicates.

I could have rooms have the property ‘surveilled or blind’, and that would fix things for the ‘decide if player is surveilled’. I could have a rule ‘after looking when player is surveilled’ print out a notice that ‘There is a Public Surveillance Notice here.’ But what if the player wants to read it? How to I capture their attempt to examine/read a nonexistent sign? Can I do that with a check or before rule if the noun they’re frobbing doesn’t exist? Do I need to add an ‘understand’ rule? If so, how?

Many thanks in advance.

By far the easiest way to allow the player to refer to an object is to use an object.

If you’re worried about the memory, you could use a single backdrop object.

zarf, thanks. By ‘backdrop object’ you mean make the public surveillance notice a backdrop, and only have it visible from rooms that are under surveillance? Can I have more than one backdrop object apply to a room?

I hadn’t realized the backdrop was an object, I thought it was a place objects could be. Need to RTFM more carefully!

You can have as many different backdrops as you like. Backdrops can’t be taken (or eaten, or whatever), so they are primarily there to be looked at, and they don’t get automatically mentioned in the room description. See Chapter 3.9.

You could do it even more easily by making all the “surveilled” rooms their own region, and assign the sign backdrop to the entire region. (And you could customize the status bar to show whether or not surveillance is on, or automatically alter the room description or room title…)

Tove: Prescient contribution, I just was trying the region bit and getting confused again. I just realized that regions can’t overlap other than to contain each other. I had divided the game up by phase into regions (for character tracking) but the surveilled rooms are scattered around, so that means I’d have to either give up my other regions or find another way to do it.

I tried putting the backdrop into all surveilled rooms using a ‘repeat/running through’ when play begins, but I got a runtime error that backdrops can’t move (and it didn’t show up where expected). I tried using a ‘repeat/running through’ during setup, but that fails too - I presume because it doesn’t like using repeat/running through during declarations?

Any advice for a cleaner solution than totting up the actual rooms and writing out the backdrop statements? :slight_smile:

tl,dr; (cleaner statement): I want to declare (the same) backdrop object as being in all rooms which share a certain property. How and where do I do that? :slight_smile:


EDIT: Figured it out! Section 8.8 of Writing with Inform. Put:

Move Public Surveillance Announcement backdrop to all panopticon rooms.

…in the ‘When Play Begins’ block.

Could you make a kind of room?

"Surveillence Test" by Hanon

A camera room is a kind of room.  

High Security Checkpoint is a camera room.  "You stand in a white room.  You get the vague feeling you are being watched.  You can go east, west, and north."

Before the Door is west of High Security Checkpoint.  "An obvious camera swivels above the door."  Before the door is a camera room. 

Utility Closet is east of High security checkpoint.  "This broom closet appears quite private."

Blind Corner is north of High Security Checkpoint.  "It appears the camera can't see you from this alcove."

a security notice is a backdrop.  Every camera room contains security notice.  The description of security notice is "You find a small brass sign that says 'Smile, cameras in use!'"

Surveillence Test
An Interactive Fiction by Hanon
Release 1 / Serial number 120227 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD

High Security Checkpoint
You stand in a white room. You get the vague feeling you are being watched. You can go east, west, and north.

x notice
You find a small brass sign that says “Smile, cameras in use!”


Blind Corner
It appears the camera can’t see you from this alcove.

x notice
You can’t see any such thing.

Hanon: Many thanks! Yep, that works. I was being greedy and trying to figure out a way which didn’t mean having to have a thirty-plus item static list of rooms, and do it using properties - I had to find the particular phrasing I used above. :slight_smile: