Instead of - overriding disambiguation prompt

I hesitate again to make a new topic, as the question has been answered several times in similar ways, but i haven’t actually found something that addresses this, so i feel compelled to ask to clarify for myself.

I have a restrictive action set up, say

Instead of doing something other than firstconversation when the firstconversationflag is false:

While it overrides direct actions, like jump,EAST or the like, it allows for the primary prompt of actions that require disambiguation, like sit or drop, as in “What would you like to sit on”. Is there a way to skip that check for just this particular situation? I tried to implement it with a different, allowed action, say

firstconversation is allowed behaviour.
Looking is allowed behaviour.

Instead of doing something other than allowed behaviour when the firstconversationflag is false:

[attempted this even without the flag check]

And both results still require the disambiguation check for sit/drop e.t.c

Do i need to hunt down every possible disambiguation prompt and try to address it on an individual basis? :sweat_smile:

Disambiguation takes place while the parser is still trying to make sense of what the player has typed, before an action has been created, so no action stage rule (Before, Instead, Check, Carry out, After, Report) is ever going to be able to intervene before that.

The parser itself does have some built-in points where you can help it out- such as ‘After reading a command’. ‘After deciding the scope of’, ‘Does the player mean’, ‘Deciding whether all includes’, ‘Supplying a missing noun’, ‘Supplying a missing second noun’ being the main ones.

Responses from the parser such as ‘What do you want to sit on?’ occur when the parser has tried and failed to infer a noun that it needs to complete a valid grammar line, e.g. if the player has typed ‘sit’ and the grammar line requires something to sit on. e.g. in this case ‘Understand "sit on/in/inside [something]" as entering.’, so they’re not truly disambiguation in the sense of trying to fathom an ambiguous word that has been typed.

This situation will also not trigger the activity ‘Supplying a missing noun’, which only happens when a grammar line has been completely matched but the matching grammar line doesn’t incude a noun required by the action definition- in this case if there was a grammar line ‘Understand "sit" as entering’ then the command ‘sit’ on its own would completely match this grammar line, but the action definition ‘Entering is an action applying to one thing’ requires a noun, which the matching grammar line doesn’t supply- hence the activity ‘Supplying a missing noun’ is triggered.

So,if you want to avoid a request to complete an incomplete command- such as ‘What do you want to sit on?’- you’ll need to provide a grammar line that completely matches the incomplete command. You can divert this command to a different dummy action that doesn’t require a noun. e.g.

incomplete-sitting is an action applying to nothing.
Understand "sit" as incomplete-sitting.
Instead of incomplete-sitting...

Or, if you just want to block such commands:

Understand "sit" or "drop" or "take" as a mistake ("Incomplete command.").

Or, if you want to generate a normal built-in action from it without a prompt, supply a dummy noun to complete the action:

Understand "sit" as entering.
Rule for supplying a missing noun when entering:
	now the noun is the player.
Instead of entering the player:
	say "You forgot to say what you wanted to do that with.".

here as a quick and dirty fix the player object is used as the dummy noun, as it it guaranteed to be always in scope and touchable, so will always be accepted with most actions, but with some finagling to make it in scope and accessible you can supply a dummy object (to avoid confusion should the player type, for example, something unlikely such as ‘enter self’ or ‘sit on self’, either of which would trigger the above Instead rule):

There is a thingumajig.
After deciding the scope of the player:
	place the thingumajig in scope.
The allow access to the thingumajig rule is listed first in the accessibility rules.
An accessibility rule (this is the allow access to the thingumajig rule):
	if the noun is the thingumajig:
		rule succeeds.
Understand "sit" as entering.
Rule for supplying a missing noun when entering:
	now the noun is the thingumajig.
Instead of entering the thingumajig:
	say "You forgot to say what you wanted to do that with.".

EDIT: If you use a Before rule rather than an Instead rule you don’t need to worry about accessibility, because Before rules run before accessibility is checked (or for that matter whether the action requires something to be carried, or requires light).


Dr. Bates’ understand [...] as a mistake approach will do what you asked just fine.

But do you need a real command prompt interacting with the parser here? How much interactivity do you need? Might a menu system be preferable for this bit?

1 Like

I appreciate the prompt replies, i’ll try to implement the scope function and come back with further questions.

Essentially i use an instead rule to override the first look, giving a link to a declared action.

Instead of looking for the first time:
	clear the screen;
	say "blabla ";
	place a link to command "Something";
	say " catches your eye. What..*is* that?".

[Afterwards i linked the something command to its own action, which only fires under its personal flag.]

Instead of doing something other than firstconvoing when the firstconvoflag is false:

Yet actions that need disambiguation still go through for the first prompting hence, well, ruining the mood.

Actions such as “sit on” or anything of the like that supplies the noun, are overridden without any issue; Essentially, while i could mark the individual actions that require a noun, it sounds like an undertaking™ and i would much rather prevent them outright for that singular instance of open command prompt. Afterwards the game resumes as per normal.

[Addendum] If this is simply an issue of the way the parser interprets actions, as i understand it after the Dr Bates’ explanation, are all the possible already implemented actions that require a noun listed anywhere that is easily accessible?

Among the useful things in the I7 docs and resources sticky-post’s references section is OtisTDog’s Standard Rules Action reference, which has a convenient presentation of the info. It’s also present in the Project Index: Action Index A2 – Alphabetic page, viewable in the IDE (the previous link is to a plain “Lab is a room.” project compiled in 9.3/6M62, but the Actions portion of the Standard Rules are close to unchanged between 9.3 and 10.1.)

1 Like

I’m not exactly sure I understand what it is you’re trying to do, but if you’re trying to restrict the player to exactly one command at some part of the game, this might do the trick:

The opening is a scene. The opening begins when play begins.

casting is an action applying to nothing. 
Report casting:
	say "You cast [the player's command].";

Before reading a command during the opening:
	say "What spell would you like to cast?";

After reading a command during the opening:
	try casting;
	reject the player's command;
The Lab is a room.

Let me know if I’m totally off-base here.

The way the parser currently works, it is set up to always try to infer a noun to complete an incomplete grammar line if it can, and to ask the player to supply one if it is not able to decide on a specific ‘best guess’ noun to infer. I think this behaviour could be changed by a simple Inform 6 tweak to the parser (specifically in the NounDomain() function) to make it infer a dummy noun in this circumstance rather than ask the player to supply one.

Without that, there is no alternative I can see other than to search out all the verb command words that when typed as the sole word in a command lead to a need to infer a noun.

However, I’m still a little confused as to what you’re attempting that makes this necessary.

Perhaps provide a transcript of how you wish things would work when playing out this scenario. From what you’ve just posted, I get the impression that this going to be a one-off situation in your story, after which, once it’s completed, everything goes back to working ‘as normal’?

1 Like

Indeed, this is only supposed to be the first interaction of the player with the important follower npc.
To gently ‘railroad’ the interaction i try to limit any other action besides linking to the talking to command, both with a vorple link to “Something” in the aforementioned intro text, initiating the conversation as well as understanding several commands in the parser - this is necessary as a first interaction to enable the Vorple status line.
I’m trying to implement a mixed modal mode of conversations menu and ask/tell, using the very, very handy quip based conversation extension.

Essentially after the first prompt, if it’s anything except clicking on the link or inputting a recognised command, the story continues up to the opening menu of the talk to options with the npc.

OK, so what kind of things do you want the player to be able to type at the prompt that don’t invoke the default ‘Somehow you can’t go past…’ response?

1 Like

Essentially it’s any variation of examining/looking at or otherwise interacting with this “something”. That simply fires off the action that will continue regardless.

Agreeable action
Relinked action

At this point i’m not sure if i’m over complicating things or simply being picky.

I’m still not clear how things will be different if I type ‘examine something’ or ‘look at it’ or ‘pick it up’ rather than ‘leave’- or click on something

1 Like

For example leave, would prompt the Relinked action, and then continue onwards
something or x something or clicking would prompt the agreeable action. Both of these situations are fine!

My only pet peeve is that the input of say, sit (no followup) or drop or the like gives the parser disambiguation question. That’s what i’m trying to override… for this singular instance. :sweat_smile:

In that case, you probably really don’t need the parser. You just want to respond one way to anything the player types containing the word ‘something’ or the word ‘it’ and another way to anything they type that doesn’t?

1 Like

Or to make it even simpler, maybe you could just wait for a keypress and then continue onward to “something.”

1 Like

Roughly? I’m only trying to keep the illusion of choice, at least for the very very first prompt. That is the functionality as it is implemented, so far. Is there a way to bypass the action creation stage for this instance then?

Yes, basically do what @rileypb suggested and intercept keyboard input in the ‘after reading a command rule’- something along the lines of:

After reading a command when the turn count is 1:
	if the player's command includes "something" or the player's command includes "it" or the player's command includes "thing":
		say "accepted input";
		say "unaccepted input";
	increment the turn count;
	reject the player's command.

EDIT: if you do need to run the whole turn machinery rather than just incrementing the turn count and rejecting the player’s command, just change the player’s command to something that fires your chosen action:

After reading a command when the turn count is 1:
	if the player's command includes "something" or the player's command includes "it" or the player's command includes "thing":
		change the text of the player's command to "accept-input";
		change the text of the player's command to "reject-input".

Accepting-input is an action applying to nothing. Understand "accept-input" as accepting-input.
Rejecting-input is an action applying to nothing. Understand "reject-input" as rejecting-input.
1 Like

This works perfectly! I never even considered changing the actual read input. Ingenious! Thank you all.