I7: General Question about Altered Room States

A question about technical design: I built a village, and now I need the whole village again, but at night. Without further thinking I’d copy the rooms and thus use new ones, in order to avoid having to switch each and every description by using a variable. The general descriptions wouldn’t change, just details - colours, things you do or do not see in the distance, you know - a lot, in the end. And it’s quite some rooms, practically the whole game world. Does I7 provide easy-to-use technical support for that, or, more general - how would you solve this?

Generally it’s much easier to change the descriptions than use separate rooms. I assume the rooms wouldn’t be empty, so you’d have to move every item to their counterpart room at night. Also if you have rules concerning rooms you’d have to remember to take into account two rooms (“if the location is the daytime market square or the location is the nighttime market square: …”). If you use the visited property, you’d have to toggle the counterpart room’s property manually. Etc etc.

You can easily make a mechanism that automatically switches the descriptions between two alternatives, for example:

[code]A room has some text called nighttime description. The nighttime description of a room is usually “”.
A room has some text called daytime description. The daytime description of a room is usually “”.

The market square is a room. “The sun is shining.”
The nighttime description of the market square is “It’s very dark.”

When play begins: [copy all room descriptions to the daytime description so they don’t have to be copy-pasted by hand]
repeat with X running through rooms:
now the daytime description of X is the description of X.

When nighttime begins: [assuming “nighttime” is a scene]
repeat with X running through rooms:
if the nighttime description of X is not “”:
now the description of X is the nighttime description of X.
[+ same kind of rule for daytime][/code]

If all you’re changing is minor details, I’d do it like this:

Village Square is a room. "The buildings bordering this area are larger than in the rest of the village, and their windows [if daytime]shine in the noonday sun[otherwise]shimmer in the moonlight[end if]. Streets lead out to the east, north, and west. The doors of the Town Hall to the south [if the great doors are open]stand open[otherwise]are barred for the night[end if]."

Here’s a way to implement Juhana’s solution that doesn’t require any copying of text from one property to another. You could make the trigger a scene or whatever you like; in the example, I use a truth state variable, and repurpose the jumping action to allow you to change it during play:

[code]A room has a text called the daytime description. A room has a text called the nighttime description.

The Kitchen is a room. The daytime description is “Day!”. The nighttime description is “Night!”.

The description of a room is “[current description of the item described]”.

To decide what text is the current description of (R - a room):
if daytime is true:
decide on the daytime description of R;
decide on the nighttime description of R.

Daytime is a truth state variable.

Instead of jumping:
if daytime is true:
now daytime is false;
now daytime is true;
say “Changed daytime to [daytime].”[/code]


That, Erik, is a very good idea. Might save a lot of work. Thanks everyone!