Backdrops in Regions [split on request]

I’m having a similar problem.
General question: I want to put a backdrop into multiple rooms. I create a region and put the backdrops into the region–not the individual rooms. Apparently, that has no effect; the backdrops are ‘out of play’. If I put the backdrops into the individual rooms (listed singly), they are recognized. This is new to me. Has this always been the case or did I miss it? Or is something else going on? It also makes regions less useful.

Gavin, Have you succeeded in getting the track backdrop to be recognized in the Railyard region without the exception?

The following works for me:

Room A is a room.
Room B is west of Room A.
Room C is west of Room B.

Test-Area is a region. Room A and Room B are in Test-Area.

The sun is a backdrop. The sun is in Test-Area.

Can you share an excerpt from your game or a minimal code example that shows the issue?

2 Likes

Short answer:
Yes, this works, but when I ‘examine sun’, the response is that it doesn’t know what sun is. There is no description. Also, ‘showme sun’ responds that sun is out of play. It is not in the region. Perhaps because sun doesn’t have a specific location. If I explicitly list the rooms, then the sun will be recognized.

I will get some code snippets for this as example.

Just confirming that if I put StJohnLimbo’s code in a blank Inform 10 project and compile it, the sun is examinable, and showme sun says it’s in Room A (when I’m standing in room A).

-Wade

3 Likes

I re-examined doc 7.11:

The Arboretum is east of the Botanical Gardens. Northwest of the Gardens is the Tropical Greenhouse.
The Public Area is a region. The Arboretum and Gardens are in the Public Area.
Instead of eating in the Public Area, say "The curators of the Gardens are ever among you, eagle-eyed and generally cussed."

This does what I expect (using a region name in lieu of a series of rooms), so I am searching through my code to see if I misorganized something. I don’t want to embarass myself with typos like last time. :slight_smile:

1 Like

Yep~ What I was afraid of. I had a couple typos in the region and/or backdrop names. Interestingly, I did not get a parser error. It went merrily on and just didn’t work correctly.

4 Likes

Actually, this problem is not yet solved.
I understand I must create the rooms before creating the region, then put the rooms into the region but this seems to work only sometimes.
Here is an example:
Room 1 is west of room 2. Room 2 is east of room 1 and west of room 3. Room 3 is east of room 2.
Floor is a region. Room 1, room 2, and room 3 are in Floor.

I compile this and get the (edited) error:
Problem. You wrote ‘Floor is a region’, but the Floor (which I notice in another sentence) seems now to be declared as a new region, which is suspect. Perhaps I have misinterpreted what was meant to be a new name for an old one?
See the manual: 3.4 > 3.4. Regions and the index map (which is not help at all).

Most interestingly, if I make the first line “Floor is a region” before I create the rooms, it works! (sometimes)

Floor is unique to these lines, so the parser is misunderstanding but not telling me where it is getting confused. Is there a rule about how to build regions and rooms properly?

Room 1 is west of room 2. Room 2 is east of room 1 and west of room 3. Room 3 is east of room 2.
Floor is a region. Room 1, room 2, and room 3 are in Floor.

This compiles and works as expected for me, in both 10.1 and 6M62. Are you positive “Floor” doesn’t show up anywhere else in your code in a way that’s confusing the compiler?

3 Likes

Yes, I did a search for the word. This also works for me but only sometimes. I am not getting consistent results. I have been having this problem intermittently, so I thought I was doing something wrong, but I built so some test code. It contained one line of comment. It worked with the line in, and then not. Here’s the actual code:

[Cuthbert Trail is a region.]
...
Cuthbert Trail is a region.
Chapel Road West, Chapel Road Middle, and Chapel Road East are in Cuthbert Trail.

Works with the line NOT COMMENTED, so that the region definition appears twice. Commenting the first line out and it throws an error. Huh?

Huh, weird! Can you reproduce the behavior if you just copy the relevant bits of code into a new project? If not, you could try to paste in more and more of your main file to see if you can isolate the issue.

1 Like

Good idea! I’ll let you know what happens.

Mike,
Here’s the result.

"Sandbox" by Clyde Falsoon
_ChapelRoad is a backdrop. It is in Cuthbert Trail. "It leads west and is totally unremarkable: a path though scrub country.".
[Definition: Chapel Road Trail Region] 
Cuthbert Trail is a region.
Chapel Road West, Chapel Road Middle, and Chapel Road East are in Cuthbert Trail.

There’s not much more I can take out.
The last two lines will compile but not with anything else added.
Per that error, Cuthbert Trail appears once more, but to contain a backdrop, and not a room. Is it understanding Cuthbert Trail to be a room instead of a region?
No, if fails even if I say
_ChapelRoad is a backdrop. It is in Cuthbert Trail region.

Oh yeah, you can’t use a region before you create it, I don’t think – when you say “X is in Y” the compiler doesn’t automatically know what kind of thing you’re creating. So just make sure to declare the backdrop first and you should be OK.

Ha! I think I have it. I have to declare regions before I add backdrops to them, but define rooms before I declare the region I put the rooms into. This works.

Cuthbert Trail is a region.
_ChapelRoad is a backdrop. It is in Cuthbert Trail region. Description of _ChapelRd is "It leads west and is totally unremarkable: a path though scrub country.".
[Definition: Cuthbert Trail Region] 
Chapel Road West, Chapel Road Middle, and Chapel Road East are in Cuthbert Trail.

(My rooms are defined above the region declaration.)

1 Like

Almost right, I think – if you say “it is in Cuthbert Trail region”, it’s going to put the backdrop in some mysterious newly-created, out-of-play thing called “Cuthbert Trail region”. Just say “It is in Cuthbert Trail”.

1 Like

Yes, that work too, and I understand the distinction. (I7 is so petty!) :slight_smile:
Thanks for the idea.

1 Like

Looks like we’re not done here with backdrops and multiple regions.
I can put a backdrop into two regions, and the Index (map and detail) shows it correctly.
However, I can only examine the backdrop from the room that it is in. I’ve attached a sandbox text case to illustrate. Is there something I’m missing, or is the parser a bit off on this? If so, what can I do to fix it?

1 Like

To get this to work at all, I had to write rules for a workaround and not explicitly add the backdrop.

_ScrubCountry is a backdrop. 
"You can see miles of scrub brush and dwarf trees over flat inhospitable territory. It probably has its share of snakes and biting insects too.".
Understand "brush/scrub" and "scrub country" and "tree/trees" and "dwarf trees" as _scrubCountry.

[This is a WORKAROUND to allow _ScrubCountry backdrop to be in two different regions.]
After looking in Exterior Fence Area: now _scrubCountry is in Exterior Fence Area.
After looking in Cuthbert Trail: now _scrubCountry is in Cuthbert Trail.

It only happens for multiple regions.

1 Like

This is a known bug in 10.1.2. See In 10.1.2, only one of multiple statements to place a backdrop is implemented when at least one is implemented as a routine for details.

3 Likes

Otisdog,
Thanks for this. I guess I can follow the rule: allow only single regions, unless I want to use the workaround I showed above. Is there an estimate for when this might be repaired?

1 Like