Can't dismount my horse

I have as setup:

Include Rideable Vehicles by Graham Nelson. Horse is a rideable animal.

I can ‘dismount’ but I cannot ‘dismount horse’. ‘Dismount’ is legal, but ‘dismount horse’ is not.I tried two ideas that both gave me an error message.

First, I merely wanted to replace the user input with the legal input.

Understand "dismount horse" as dismount.

Error message: misuse of “Understand”.

So then I tried:

 Instead of dismounting something, try dismounting.

Another error message: Misuse of rules.

Any help would be appreciated.

Understand “dismount horse” as dismounting. 

Should do it I think.

1 Like

Phil,
That worked, but what is the logic?
Understand translates the input text to the rule for dismounting, then replaces that rule with the proper input text “dismount”? Understand does not translate text to text as it does for names?
Thanks much though for getting me moving again.

The action is called “dismounting” and it doesn’t apply to a noun, very much like exiting from a supporter:

Dismounting is an action applying to nothing.

There’s also this:

Before an actor getting off a rideable animal (called the steed), try the
actor dismounting instead.

Before an actor getting off a rideable vehicle (called the conveyance), try
the actor dismounting instead.

I think you should just be able to say

Instead of dismounting something, try dismounting.

1 Like

Hanon,
I tried your suggestion, because it is indeed more general and easier. However, I got the rule error again. What works is

Understand "dismount horse" as dismounting.

Thanks for the suggestion though.

1 Like

This actually won’t compile, 'cause dismounting applies to nothing. As Hanon said, mounting/dismounting parallels the behavior of entering (which takes a noun) and exiting (which doesn’t), but get off horse already works because Rideable Vehicles explicitly includes it. And getting off is its own action that does take a noun. So, this is all you need:

Understand "dismount [thing]" as getting off.
2 Likes

(I’ll note that this introduces some different less-than-great behaviors: if the table is an enterable supporter, one could now stand on table and then dismount table, but without further modifications, mount table wouldn’t work, or if you were already on the table, then just a plain dismount wouldn’t work either.)

-freudian-trained veterinarian strokes chin- Ah, hmm, yes… Ve can easily see how zies vould introduce some less-zan-great behaviors… Have you tried ze tricycle instead?

I am 12 and still snicker over Is there a condition for checking whether a player is mounted?

1 Like

Yep, the Inform library generally avoids using the same verb for actions applying to different numbers of things.

The result is that “dismounting” applies to nothing, and “getting off” applies to one thing, even though “get off” is (I believe) a valid way to trigger the “dismounting” action. It just makes it clearer when writing rules.

So I’m seconding Zed’s suggestion:

Understand "dismount [something]" as getting off.

If you make a specific understand-line for “dismount horse”, then what if the player types “dismount the horse”? Or “dismount steed”? You’ll end up needing to replicate the whole noun-parsing code with new Understand lines. Easier just to let the existing noun-parsing code do its job.

3 Likes

No, Inform doesn’t do any text replacement. Understand rules are applied one-by-one until a rule matches the command text, and then the current action, noun, and second noun global variables are all set. It’s a bit more complicated than that but that’s the basic process. So the understanding for “dismount horse” is done all in one go — inform sees “dismount horse” and sets the current action variable to dismounting.

1 Like

Zed,
I replaced what I had with your suggestion, for handling little articles like ‘the’. It works fine. Thanks.

1 Like