Wearing scenery take issue

I want the player to be able to wear, but not remove from the room, a piece of scenery. Since Inform 7 sensibly doesn’t like this, I’m using an instead rule. Problem is, to wear something you have to take it first, and the ‘can’t take scenery’ rule stops the wearing action. I don’t want to make a take rule, just a wear one, so how can I get around this?

Thanks for reading.

Try it with rules on and see if the implicit take is generated by a before rule. If you put your logic in a before rule instead of an instead rule, you should be able to skip the implicit take.

This might do the trick. It’s a bit obtuse though, and you’ll want to check it against the action index for any other unwanted interactions.

[code]“Wearing a Box” by Orange

The boxroom is a room. “Here you see a plain cardboard box, among other things.”
The cardboard box is scenery in the boxroom.
The cardboard box is wearable.

The empty room is north of the boxroom. “That’s odd, it’s just an empty room.”

Before wearing the cardboard box:
now the player is wearing the cardboard box;
instead say “You put on the cardboard box. You are now box man.”

Before going somewhere from the boxroom:
if the cardboard box is not in the boxroom:
instead say “You’ll have to remove the cardboard box before you can leave, as dissapointing as that may sound.”.

Before taking off the cardboard box:
move the cardboard box to the boxroom;
instead say “You remove the delightful box, resuming your life as a mere mortal.”

Before dropping the cardboard box, instead try taking off the cardboard box.[/code]

You can also say things like “Now the box is not scenery” to change the scenery property.

My approach to this one would just not to make the particular object scenery in the first place. The type/kind ‘scenery’ is just a convenience Inform gives for stuff that would logically be scenery. But it’s real easy to make a plain old object-object which acts exactly like scenery. In fact, it only half-acts like scenery at best, because it won’t be nailed to the floor, which is one of the major qualities of scenery. The other major quality is that it’s ‘undescribed’. Make a regular object ‘undescribed’ and it’s halfway to being scenery. Except now you can pick it up.

  • Wade

Aha! I didn’t realize ‘before wearing’ would include the taking action.

Does this mean looking under ‘wearing something’ in the action section of I7’s index?

Thanks, everyone!

You would want to skim through the entire action list, looking for possibilities that would break your scenery object. For example, I notice that enter/exit would be nice to add in, because some of your players might assume that they should be interacting in that way. There could be other actions though that might cause your object to act in a way that you don’t intend for it to, so you should check the list yourself more thoroughly.

You can also disable all actions using a ‘before doing anything except…’ rule, and then selectively enable specific actions with specific rules. This has a similar problem in that actions you overlook may be logical, but at least if the player tries them they get an annoying error message instead of breaking the game.

I’m probably being naive, but I’m struggling to think of a game-breaking possibility. Isn’t it just wearing and taking it off that will be affected?

If you really want to smack the object hard to see what problems it may throw up, you could use Juhana’s testing extension ‘Object Response Tests’, which can run every action in the game on an object, et al:

inform7.com/extensions/testing-a … _Debugging

  • Wade