Hiding an inventory possession

Say I don’t want a particular item to appear when you type inventory, because it’s part of your personage. Not like your face or arms, but say collectively your hat, boots and gloves amount to a ‘costume’.

I made an actual costume object, rather than use grouping tactics, because then I’ll get nice disambiguation when more than one costumed person is in the room. And other people can look at each other’s costumes and receive custom messages.

I just don’t want it to say ‘costume’ when you check your inventory, as it already lists the parts.

I couldn’t get ‘rule for printing description’ or concealment to not list it. I found a workaround I’m totally happy to use, since I only have to program this exception for two objects in the game -

[code]Before taking inventory when the player is Jane
now zombie costume is off-stage.

After taking inventory when the player is Jane:
now Jane wears zombie costume.[/code]

but I wondered if there was a more regular way of hiding an inventory item I should learn about.

I had a similar problem recently; this thread may be of interest.

I ended up doing this:

[code]A thing can be listable or unlistable. A thing is usually listable.

Instead of taking inventory:
if the player is carrying no listable things:
say "You are empty-handed. ";
else:
now all things enclosed by the player are unmarked for listing;
now all listable things carried by the player are marked for listing;
say "You are carrying ";
list the contents of the player, as a sentence, listing marked items only, tersely, including contents;
say ". ";
if the player is wearing a listable thing:
now all things enclosed by the player are unmarked for listing;
now all listable things worn by the player are marked for listing;
say "You are wearing ";
list the contents of the player, as a sentence, listing marked items only, including all contents;
say “.”;
else:
say “You are wearing nothing but [a smile].”[/code]

So now I can just define anything I don’t want printed when taking inventory as unlistable. This may not be the most efficient solution, but it gets the job done and doesn’t have any side effects from moving the object.

(In my case this was because I wanted the message if you’re not wearing anything to be “You are wearing nothing but a smile” and also allow for the smartass player to try removing the smile.)

Shammack:

I hope that you provided an appropriate response to the smart-ass player. Perhaps something like “You try to wipe the smile off your face (as your first-grade teacher often told you to do) but, despite your best efforts, you remain happy.”

Robert Rothman

Thanks for the routine Shammack.

I did, but I don’t want to give everything away; you’ll just have to play the game to find out. :wink: I’m spending an inordinate amount of time trying to include appropriate responses for stupid things the player might try to do. That time would probably be better spent working on puzzles or something, but this is more fun.

I am doing the exact same thing, and I kick myself for wasting all of this time. But you are right, it is more fun.

They call it the “detail trap.” I’ve decided to run with it as long as it’s fun, but I also don’t expect to finish my WIP by any particular deadline. My goal is to get a little bit done every day. If that means adding one little response to one unlikely action, fine - at least I’m keeping my hand in.

I don’t view that as a waste of time. From the player’s perspective, I think a lot of the fun is in the way the game responds to attempts to do the “wrong” things.

Robert Rothman

The challenge is guessing which “wrong” things the player will try. There are a lot more “wrong” actions than “right” ones.

That sounds like a good goal to have.