I7: Matches and ignition

I wonder if anybody has any ideas for how to deal with the following:

I have a limited number of objects which the player can light (in the sense of ignite). I also have a box of matches. I don’t want to implement each match (for all practical purposes, the box contains an unlimited supply) and have no need to keep track of unused, lit or burnt-out matches. I also don’t want to make players go through the motion of lighting a match first every time they want to light something. Ideally, I would just have a check which allows the player to light an ignitable object if he is in possession of the box of matches, and blocks it if he is not.

However, once the box of matches is introduced into the game, I have to assume that players will try to “light match,” so I need to provide a sensible response to such an attempt. Any thoughts for how to do this without implementing a match separately from the box? (A response which says “Just tell me what you want to light” doesn’t seem to do the trick; from the player’s perspective, he wants to light the match, which is why he typed that command.)

Thanks.

Robert Rothman

I don’t know if you’ve already found this, but from what I can tell Example 407: The Cow Exonerated seems to meet your requirements.

It looks like that example does implement individual matches. I was hoping to avoid that, if possible.

Robert Rothman

One thing you could do is have “match” (and “matches”) understood as the matchbox and block burning the matchbox with a helpful message (“No need to light a match on its own. When you want to light something, just type LIGHT LAMP when you’ve got the matches.”) If you do this, you should also probably write a new rule to block taking the matches to hold them (so players who try to GET MATCH when holding the box get a similarly helpful message instead of “You already have that”).

You might want to try to catch whether the player said “match” or “matchbox” so you can give the appropriate message. Here’s something similar I did, coincidentally with a bag of tobacco (which could be understood using “bag” or “tobacco”):

[code]Bag-talking is a truth state that varies. Bag-talking is usually false.
After reading a command:
if the player’s command includes “bag”:
now bag-talking is true;
otherwise:
now bag-talking is false.

Instead of searching the bag:
say “The bag contains some aromatic tobacco.”

Instead of taking the tobacco when the player has the tobacco and bag-talking is false:
say “No need to take the tobacco until you want to roll a cigarette. Say ROLL CIGARETTE to do that.”[/code]

So when you’re holding the bag, TAKE TOBACCO responds as though you tried to take the tobacco from the bag, and TAKE BAG responds as though you tried to take the bag again.

UPDATE: Looking back at the code that comes from, Jim Aikin had the wise suggestion that you could just use a lighter, and then you don’t have to worry about players trying to mess around with individual matches.

Also, if you do this you should implement LIGHT LAMP WITH MATCH etc.

Ah, my bad. I assumed you just didn’t want to deal with the hassle of conceptualizing the code, not that their presence would be negative. Matt’s idea is probably closer to what you’d want, in this case.

Thanks. I’ll probably go with something like Matt’s suggestion. It has the narrator stepping “out of character” a bit more than I’d like, but on balance it’s probably the way to go. Given the fact that the matches are not really important to the plot (other than as a gating mechanism to preclude the player from going around lighting things until he has been in the room where the matches are found), they’re just not worth spending a huge amount of coding time on.

I had thought about using a lighter, but it doesn’t fit into the setting quite as well. A box of kitchen matches seems like something that would reasonably be kept in stock in the storeroom of a food service establishment; a lighter would probably only be found there if somebody happened to drop his lighter accidentally.

Robert Rothman

Well, you don’t have to use the style of message that Matt suggested if you don’t want to. Message like these would have the same effect, without the narrator directly telling you “there’s no point to that now”:

–Erik

If there’s a gas stove and/or candles in the restaurant (?), there’s almost certainly one of those long click lighters. (Of course, if you like matches, go with matches, but if you’re looking for an excuse to use a lighter, most food service places don’t have the time to fuss with matches or their quick burn-out.)