A question about regions

Is there a way to give a “Usually” property to all the rooms in a region? So that it applies to all rooms unless a specific room is listed differently.

Example (not working of course):

[code]A room can be indoors or outdoors.

The South Beaches is a region.
A room in the South Beaches is usually outdoors.

----the stuff that happens in this region----

The hut is a room. The hut is in the South Beaches. The hut is indoors.

----the stuff that happens in the hut----

The Caves is a region.
A room in the Caves is usually indoors.

----all the stuff that happens in this region----


I know I can make all rooms usually outdoors, and just remember to add the “Room X is indoors” where needed. But some regions have almost all indoor rooms, and others have almost all outdoor rooms. Something like this would make it easier.

Or if I put each region into its own chapter, could I just declare “A room is usually outdoors” (or indoors) on a chapter by chapter basis instead of doing it by region?

I hope that makes sense.

Any ideas?


Specifying a property each time you declare a room is simple : Beach is an outdoors room.
Or you could create a new kind : An outdoor room is a kind of room. An outdoor room is always outdoors. Beach is an outdoor room. Better grammar, but not any better.

This might work for you, though.

"test" by Blecki

A region can be indoor or outdoor. A region is usually outdoor.

Definition : A room is indoors if the map region of it is indoor.
Definition : A room is outdoors if the map region of it is outdoor.

Great Outdoors is an outdoor region.

The beach is a room in the Great Outdoors.

Interior Space is an indoor region.

The cave is a room in the Interior Space. The cave is north of the beach.

Shouting is an action applying to nothing.
Understand "shout" as shouting.
Report Shouting:
	if the location of the player is indoors:
		say "Echo! Echo! Echo!";
		say "That doesn't seem to do anything, except make you hoarse.".

test me with "shout/n/shout".

To change this property for a room, you’ll have to move the room to a different region.

Yeah, what Blecki is saying should fix you up. I’ve used a similar scheme.

You could also add another “layer” if you will, by specifying something like CaveInteriors being a type of room and telling it that the map region of a CaveiInterior is Interior Space, and that rooms like “cave1”, “cave2”, etc can all be declared as that type or not.

That is closer to what I am looking for. Right now I am saying “A room is usually outdoors” and just noting the indoor rooms individually since about 70% of the rooms are outdoors. But some regions are all indoors except one room, and some all outdoors except one or two rooms. My thought was to assign the property by region to make things simpler.

I don’t have time to experiment now, but later I will try to figure out the correct wording to get what you said to work. We all know how picky the compiler can be. :wink:

It sure would be nice if we could assign these types of properties by region, or per chapter.

Edit to add: For clarification, outdoors just means there are no walls surrounding the room, and you can see into the adjacent rooms. For example, a large gymnasium, made up of 12 (3x4) sections (rooms). Of course it can also apply to actual outdoor spaces.

I’ve been dealing with this sort of thing too. Areas, properties, and relations can all be used to handle intervisibility between rooms. I ended up going with relations in groups, although all the alternatives can be tedious to set up.

I was thinking you could do what you want with a “when play begins” rule if it’s not possible to do it by implication. It’s tricky, because of the syntax for defining and assigning properties, but I think I got it:

[code]Space-designation is a kind of value. The space-designations are default, indoors and outdoors.

A room has a space-designation. A region has a space-designation. A region is usually outdoors.

The South Beaches is a region.

The hut is an indoors room in the South Beaches.

The shore is a room in the South Beaches.

The Caves is an indoors region.

Dark Shaft is a room in The Caves.

Yawning Chasm is an outdoors room in The Caves.

When play begins:
repeat with area running through regions:
now every default room in area is (space-designation of area).[/code]

Perfect! It works even better than I had hoped.

All of the routines for outdoors vs. indoors I have in an extension. It handles what you can see, and from how far, based on the height of the object and what might be in the way (like walls). Most of what you wrote I added to the extension.

The only changes to the game are to say “A region is usually outdoors.” and to designate the indoors regions. Or I can skip the “A region is usually outdoors.” all together, and just label all regions as indoors or outdoors, so it is easy to use in other games that have a different balance of indoors vs. outdoors regions. All of the rest runs from the extension.

Thank you so much capmikee! This makes things much easier.

Edit: Okay, I was able to create a situation where not setting a default of indoors/outdoors for regions didn’t work as expected. So I will just stick to saying “A region is usually outdoors.” and designate the indoors regions separately. Still works perfectly! I might just add “A region is usually outdoors.” to the extension… not sure yet. Not having it there makes it easier if most regions/rooms are indoors. I have to keep future usage in mind. So probably not.