Grammar Evaluation Priority (Adv3Lite)

Heyyyy, so part of me has no clue how to do this, but also I’m still waiting on ADHD meds to arrive, so my sincerest apologies if I might have missed something, but I am holding onto thought processes for dear life right now, lol.

If I have two completely different verbs that might have some grammar overlap, is there a way to have one try to evaluate before another?

For instance:
>SNEAK NORTH
and
>SNEAK OFF

These would be two different verbs. I’d like to be able to check for the player attempting to turn off sneak before the parser tries to evaluate “off” as a direction.

How would I go about this in a fool-proof way?

Thank you for you time!! :grin:

why not a different approach to sneaking ?

If you implement sneaking as a posture of sort, (cfr. the debate on levitating) you should need only sneak [on|off], I think (but this require big modifies, because leaving rooms &c. imply changing into default (standing) posture… I can’t figure what can be easiest to imp, verb or posture of sort, sorry.

Best regards from Italy,
dott. Piergiorgio.

1 Like

It’s not a posture; it’s a specific tutorial-only shorthand action that combines multiple verbs together, to make the mechanics easier to learn.

If a player wants to turn off sneaking during the tutorial, I’d like to give them the option to, because then they can practice what they’ve learned and take off the training wheels, so to speak.

Specifically, SNEAK NORTH implicitly causes LISTEN, PEEK NORTH, GO NORTH, and CLOSE (X) DOOR, if the connection was a door, because closing doors manually is quieter than letting the doors close automatically.

The player has an option to simply GO NORTH, of course, but the clickable hyperlink commands on the exit lister will use sneak instead, if it’s on.

Also, turning sneak off would be good for players who are trying to get used to not having it available, so any habitual uses of it would be met with “you’ve turned sneak off. As a reminder, these are the steps for maximizing stealth and safety: …”

Whereas attempting to use sneak in difficulty modes that don’t allow it at all just say “This mode does not allow sneak. Remember: the Predator can hear you, and will notice your traces! Good luck!”

Also also, for what it’s worth: I’ve already completely implemented sneaking as a verb. I’m just trying to figure out how to specifically add another verb to toggling it on/off, without causing the parser to get confused, that’s all. :grin:

Assume it’s a directional sneak, check the argument in a verify, and if it’s rather off/on do the config sneak instead? (or maybe with a Doer?)

2 Likes

Ah!! I keep forgetting I have the option of directly checking the inputs for a verb.

Also I forgot Doers are a thing lol.

Thank you!! Pretty sure these will work, and I’ll get them implemented tonight!

1 Like

Does Adv3Lite make use of grammar badness rules?

1 Like

Maybe! Would I give the directional verb a badness rating to make the other verb get checked first?

1 Like

Whichever one you want to be eclipsed, give it some badness… there are examples in the adv3 library.

VerbRule(PutIn)      // original source text
grammar predicate(PutIn) :   PutInAction      // after macro expansion	en_us.t[9369]
('put' | 'place' | 'set') dobjList
('in' | 'into' | 'in' 'to' | 'inside' | 'inside' 'of') singleIobj

VerbRule(PutInWhat)      // original source text
grammar predicate(PutInWhat) :   PutInAction      // after macro expansion	en_us.t[9398]
[badness 500] ('put' | 'place') dobjList
2 Likes

Ohhhhhhh… For some reason, I was never really clear on what badness did, because it was causing a lot of really unexpected behavior (at least for me) in verbs before 1.6.

I’ll add this to the to-try list!

1 Like