Each house, one master.

For various reasons, I need each person in my game to have three unique rooms associated with them - for example, for the character Jessica, there’d be “Jessica’s cubicle,” “Jessica’s subconscious” and “Jessica’s happy place.”

Now, I could create all these rooms manually, but since I might want to add or remove characters as development continues, it’d be a lot easier if I could somehow convince Inform 7 to automatically create the three rooms for each character, naming them appropriately. Is there a way of doing this?

(Coincidentally, these rooms don’t have to be connected to any other rooms by conventional means, so I’m not concerned about that. I’m planning to make each room type a kind, you see, and give the player a special vocabulary for navigating between them.)

I think you’d probably have to do it manually. Correct me if I’m wrong but I don’t believe you can give rooms automatically-generated names.

Well, I have discovered that it’s possible to generate rooms based on tables, but I’ve thusfar been unable to ascertain whether that helps in any way whatsoever.

What’s your method for doing it based on tables? I might be able to do something with that.

You can try this:

A cubicle is a kind of room. Cubing relates one person to one cubicle. The verb to cube (he cubes, they cube, it is cubed, he cubed, it is cubing, he is cubing) implies the cubing relation. Every person cubes a cubicle.

although then you won’t be able to refer to this in source code as “Jessica’s cubicle” but “a random cubicle cubed by Jessica” or something like that (though you could write a phrase to shorten that), like this:

Instead of an actor singing: if the actor is not in a cubicle: now the actor is in a random cubicle cubed by the actor; otherwise: now the actor is in Chamber.

You can make the name appear to the player as “Jessica’s cubicle” by using the printed name property.

[If you create parts of the body automatically, as in “A nose is a kind of thing. Every person incorporates a nose,” then they’ll be automatically named “Jessica’s nose” etc. But that won’t help in this case, because making the rooms be parts of people would cause all kinds of problems.]

And if you reverse the relation and add a parenthetical, you avoid the ``random’’ wording for free:[code]A cubicle is a kind of room. Cubing relates one cubicle (called the home) to one person. The verb to cube (he cubes, they cube, it is cubed, he cubed, it is cubing, he is cubing) implies the cubing relation. A cubicle cubes every person.

Marian, Scott, and Elise are people.

When play begins:
showme the home of Scott.[/code]

It’s slightly more intensive, but you can give these cubicles names at the beginning of play. In code, you’ll still have to refer to them via relations (the cube of Scott, etc), but at least the in-game name can be auto-generated. You can also provide grammar by which the player can specify a certain cubicle:

[code]A cubicle is a kind of room. Cubing relates one cubicle (called the home) to one person. The verb to cube (he cubes, they cube, it is cubed, he cubed, it is cubing, he is cubing) implies the cubing relation. A cubicle cubes every person.

A cubicle has a person called the owner. Understand “cubicle/cube of/owned by/-- [something related by cubing]” as a cubicle.

A cubicle usually has printed name “[the owner]'s Cubicle”.

When play begins:
repeat with space running through cubicles:
repeat with dude running through people:
if the space cubes the dude, now the owner of the space is the dude.

Marian, Scott, and Elise are people.

Test me with “showme the cube owned by Scott”.[/code]

If the owners of the cubicles don’t change (and it sounds like they shouldn’t), you can do it by a “to decide” phrase instead of setting things with a “when play begins” rule, I think:

[code]A cubicle is a kind of room. Cubing relates one cubicle (called the home) to one person. The verb to cube (he cubes, they cube, it is cubed, he cubed, it is cubing, he is cubing) implies the cubing relation. Every person is cubed by a cubicle.

To decide what person is the owner of (cuboid - a cubicle):
decide on a random person that is cubed by cuboid.

The printed name of a cubicle is usually “[Owner of the item described]'s Cubicle”.[/code]

…and that nice “understand” thing ChrisC mentioned. I’ve reintroduced the “a random…” bit, but maybe there’s a way to avoid that.

(BTW, I think it has to be “the home of Scott” rather than “the cube of Scott.”)

A detail that has somehow come out of focus is that the OP wants three different rooms to be associated with each person.

I’m not sure if this is because there is a tacit understanding that this ought to be done by three different relations (“A cubicle cubes every person. A subconscious subconsciends every person. A happy place blesses every person.”).

I figure it could equally well be done with a single relation (“A cubicle is a kind of room. A subconscious is a kind of room. A happy place is a kind of room. Lodging relates various room to one person (called lodger). The verb to accomodate (he accomodates, they accomodate, he accomodated, it is accomodated, it is accomodating) implies the lodging relation. A cubicle accomodates every person. A subconscious accomodates every person. A happy place accomodates every person.”)

I was thinking three different relations – it seems to me that if you have a single relation, that makes it harder to refer to “the home of Jessica” and the like in the source code.

You win points for using the word subconsciends, but lose nine for misspelling accommodate. :stuck_out_tongue: