Thanks in advance.
Richard Smyth
Someone else probably knows how to do this better than I do,
but the following will prevent "take all" from succeeding:
Rule for deciding whether all includes something:
it does not.
But you'd probably like to print a message besides "There are
none at all available" (I know I would, in my work not yet in
progress), and I don't know how to do that. It seems as though
"There are none at all available" should be a parser error,
which would be pretty easy to change, but it doesn't seem to
be. (This will also prevent taking multiple objects, I think,
which may also be undesirable.)
One could catch the most common phrasings with
an "After reading a command when the player's command
matches "take all" or the player's command matches "get
all"", but that seems inelegant.
Matt
--Jeremy
This is how I ended up dealing with the opposite problem in ToaSK ...
I didn't want to remove GET ALL, but I wanted to add a single ToaSK-
style command (PILLAGE) that would equate to it, and the only way I
could find to do it was this sort of phrase-catch :(
How about this?
<code>
Pillaging is an action applying to nothing. Understand "pillage" as
pillaging.
Carry out pillaging:
repeat with item running through every thing in the location:
if item is not scenery and item is not a person:
say "[Item]: [run paragraph on]";
try taking item.
</code>
Of course for ToaSK you might not have wanted the "item is
not a person" clause.
(Disclaimer: I've tested this in exactly one case.)
Matt
Of course that won't respect any rules for deciding whether
all includes a particular thing. --mw
Last time I did this in I7, I wanted to eliminate *all* "all"
commands. (For _Dual Transform_, which only has one-and-a-half
takeable objects anyhow.) The tedious way is to replace
every grammar line involving [things] with [something]:
Understand the command "take" as something new.
Understand "take [something]" as taking.
Understand "take off [something]" as taking off.
Understand "take [something] from [something]" as removing it from.
Understand "take [something] off [something]" as removing it from.
Understand "take inventory" as taking inventory.
Understand the commands "carry" and "hold" as something new.
Understand the commands "carry" and "hold" as "take".
And so on with "get", "pick up", "remove", "put", "insert", and
"drop". (See the Standard Rules for the grammar.)
This puts all these commands in the same bin with every other verb. If
you try "take all", you get "You can't use multiple objects with that
verb."
However, getting back to the original question: it is often sufficient
to do
Rule for deciding whether all includes scenery:
it does not.
Rule for deciding whether all includes fixed in place:
it does not.
That eliminates all your nice room decorations, while still allowing
the player to take *takeable* objects -- which are likely to be
obvious, so nothing is given away.
--Z
--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
I bet it's awesome, but that's one of those I7 things I've never
wrapped my head around, the "repeat with running through" thing,
because I don't understand what it's saying even though I _do_
understand what it's saying. Sort of. It hurts my wittle bwain :(
>
> Of course for ToaSK you might not have wanted the "item is
> not a person" clause.
It'd be fine; the only takeable "person" is the Magic Fish, and when
it's (finally!) dead, it's actually replaced with a substitute object
(the Dead Magic Fish) which isn't defined as an Animal or any other
Person sub-type.
Excellent, thank you. What I was missing in a cursory
search of the Standard Rules was that "all" is getting
mapped to a [things] token.
And in my WNIP there's an object that's deliberately
non-obvious from the room description, so I don't want
to just eliminate scenery and fixed objects. Letting
the player "take all" and miss the hidden object would
be misleading, so I'd like to give a hinty message if
the player tries "take all." Is there any elegant way
to do that? I've tried
Rule for printing a parser error when the parser error is can't use
multiple objects:
if the current action is taking:
say "You'll have to take things one at a time.";
otherwise:
continue the action.
but it doesn't work, presumably because there's no
current action when there's a parser error.
Matt
Sorry for getting off-topic, but are you the same Matt Weiner
known as "obnoxious math grad student" back when you were a
grad student? If so, good to hear from you again. I can't remember
which group I remember you from, maybe sci.logic.
--
Daryl McCullough
Ithaca, NY
Nah, I would've been known as "obnoxious philosophy grad
student." ;-) I think there was another Matt Weiner in usenet
as part of something called the Brahms Gang back in the
day -- I occasionally get mistaken for him on the internet.
Matt
>On May 18, 1:08=A0pm, stevendaryl3...@yahoo.com (Daryl McCullough)
>wrote:
>> Matt Weiner says...
>>
>> Sorry for getting off-topic, but are you the same Matt Weiner
>> known as "obnoxious math grad student" back when you were a
>> grad student?
>Nah, I would've been known as "obnoxious philosophy grad
>student." ;-) I think there was another Matt Weiner in usenet
>as part of something called the Brahms Gang back in the
>day -- I occasionally get mistaken for him on the internet.
That's exactly who I was thinking about. The Brahms Gang even
has a Wikipedia page (for some reason)
http://en.wikipedia.org/wiki/Brahms_Gang
But apparently he spells his name using the "i before e" rule.
You can worm this out of the parser internals:
To decide what action-name is the action-to-be: (- action_to_be -).
Rule for printing a parser error when the parser error is can't use
multiple objects:
if the action-to-be is the pulling action: [...]
"Taking action", of course, in your case. Oops.
> But apparently he spells his name using the "i before e" rule.
I'm guessing here, but "Wiener" looks like it comes from "Wien", or as
the English know it, "Vienna"; while "Weiner" means (according to
Wikipedia) "wheelwright" or -- later -- "wine maker".
So this difference in spelling indicates a difference in meaning. :)
Kind regards,
Victor
Well, this is complicated -- my name is pronounced to rhyme
with "meaner," my paternal grandfather was from Russia
(though I think even Russian Jews might often have had
Germanish names), and whatever name he started
with probably got a good mangling at Ellis Island.
So I basically have no idea what my name originally
meant. :-)
ahistorically,
Matt
Thanks -- this should be a useful trick even outside of this
specific problem.
Matt