I have secrets that are revealed undramatically with TAKE ALL. I want to suppress that command but I cannot get all of the multiple object list removed. I get the first thing named. Also, the code below disrupts the TAKE operation.
Understand "take [things]" as taking.
Instead of taking in cottage interior:
if number of entries in the multiple object list is greater than 1:
alter the multiple object list to {};
say "[the multiple object list]";
I get the following with this code:
> take all
cot:
> take cot
I want to remove the cot from bring displayed (I’ll put in an appropriate response text later) and have the Take Cot command work. In this example, it displays nothing.
Nope. That doesn’t do it. That section is on qualifications of the rule, not suppressing it.
Note that cot is not scenery but a supporter.
But thanks.
Understand "take [things]" as taking.
Before taking in cottage interior:
if number of entries in the multiple object list is greater than 1:
alter the multiple object list to {};
say "Now where's the fun in that?!";
stop the action;
and I still got the first element of the list that should have been empty:
> take all
cot: Now where's the fun in that?!
How do I eliminate the first object in the list: the cot? At least in this version
If you really just want to disallow “take all,” don’t try to mess with the MOL. Just change the grammar for taking to disallow multiple objects entirely. It’s a little tedious, but easier and less prone to error than changing the behavior after the parser has allowed it in the first place.
Yeah, this is the way to do it if you want to completely disallow TAKE ALL. But really, from a design point of view, I think it’s usually going to be much better to do as Zarf and Josh suggested and just exempt the specific items you want to remain hidden. As a player, I fairly often do DROP ALL to get around annoying disambiguation situations, for example, and that’s even more frequently the case if a game involves an inventory limit or anything like that. Completely disallowing TAKE ALL just risks making your game more annoying for no reason, when it’s just as easy if not easier to exempt the stuff you don’t want the player hovering up (if you’ve got more than one object that you want to protect, you could just use a property to keep the rule simple - though of course you should allow TAKE ALL to work on the hidden objects once they’re found!)
I think I need to be clearer. I want to disallow TAKE ALL. I have no specific items I want to avoid. I want to replace the default response. This new rule I added works for me.
Rule for deciding whether all includes things: it does not.
Works for what I want except I get this response:
> take all
There are none available!
> take cot
(description for taking the cot)
Both the ALL version and the individual version work but I want the ALL version to say what I want it to say. I don’t know if I need to change the Reporing rule or the Carrying out rule or whatever. I’m losing blood over this challenge.
I think you just need to change parser nothing error internal rule response (B), then - definitely would be good to flag that it’s disallowed to avoid confusing players.
Mike,
That was the section I was searching for. I found this in an example in section 18.28, which also works:
Rule for deciding whether all includes things: it does not.
Rule for printing a parser error when the latest parser error is the nothing to do error:
say "Now where's the fun in that?".
(The say statement will be changed to be more than a flag for the story now.)
I’ll take anouther look at scetion 14.11 to get a better understanding.
Thanks.