"If the player has ever VERBSed/HINTed"

So this code works, and it’s pretty efficient.

verbsing is an action out of world. understand "verbs" as verbsing.

ever-verbs is a truth state that varies.

check verbsing: now ever-verbs is true;
carry out verbsing: say "This is just test code. If it were actual code, there would be more suggestions, and the parser error explanation would be more rigorous, too.";

rule for printing a parser error:
	if ever-verbs is false, say "You may wish to consult the [b]VERBS[r] command to get a feel for general verbs." instead;
	continue the action;

But I’m wondering if there is “if the player has ever VERBSed” syntax for verbs, as there is for “if the player has ever been in the ballroom.”

This obviously isn’t critical as there will only be a handful of verbs that really need this. (E.g. congratulate the player for winning without hints.) But all the same I wanted to ask about a shortcut.

2 Likes

Interesting, I had been considering drawing attention to whether the player finished without hints as well (but in TADS3, sorry, can’t help…)

2 Likes

I think it’s something worth looking at in any language! The Master’s Lair, an entry in IFComp, tracks how often you’ve used hints. I haven’t finished, so I don’t know how it uses this information in the end. And of course if there is an external walkthrough the player can game the system!

But the point stands … it’d be interesting to track things beyond scores.

Stuff like, say, if you can technically open a secret passage without ASK PERSON ABOUT SECRET PASSAGE that tells you how to, but you’d have to be extremely lucky guessing or have a walkthrough or be told in advance outside the game … e.g. a “how often did you jump ahead” check.

2 Likes

I kinda did something like that in Prince Quisborne; there are places you’re not supposed to get out of if you haven’t acquired the proper knowledge, but an extremely unlikely random sequence could get you out of it, which prints a message telling you approximately what a 1 in xxxxx squeak you’ve had…

2 Likes

Yes.

if we have verbsed. It’s ill-documented and problematically named… it’s true if and only if any actor has successfully verbsed, i.e., the action ended in success, i.e., it made it as least as far as its Carry Out rules. To emphasize: we means any actor here.

For actions that take at least one object, one can also say if we have fooed the bar: independent of any other “keep track of past states” mechanisms, Inform functionally keeps a grid of all actions and all objects and when a given action succeeds with a given object as its (first) noun, it marks the relevant spot. (I’m guessing, but don’t remember and am not bothering to look it up, that the implementation treats nothing as if it were an object so it gets its own row in the grid for actions applying to nothing.)

8 Likes

wow! :boom:

3 Likes

It just occurred to me to check: if fooing is an action applying to one number, one not only cannot say if we have fooed 12: [...] (12 not being an object, after all), but one also can’t say if we have fooed: [...]. Same thing if fooing applies to one thing and one number. It results in a compiler error. The grid is maintained for actions applying to 0-2 objects and omits any actions applying to any non-objects.(As tested in a recent build of the development version, namely v10.2.0-beta+6X76.)

6 Likes

Very interesting answers, I had no idea some of this syntax existed! :open_mouth:
My noob way of accomplishing something like this was to create a property which gets changed when the player enters a certain command. It did work pretty well, and I found it helpful for implementing different stages of responses to the hint command too!
e.g.:

A thing can be hinted, halfhinted or unhinted. A thing is usually unhinted.

And upon accessing the hint, now the player (or an object, if that makes more sense) is hinted or halfhinted… and the property can then be easily checked later on.

2 Likes

I implemented in a way that hints reduce your overall scoring slightly. There’s also a progress bar for the game (in the upper right), which is not affected.
There’s also a ranking system in the game for the score, and using too many hints probably will reduce your final rank a bit.

To be honest, I’m not so sure if this system is perfect. But it doesn’t need to be, I think. Scores, ranks etc. are just for fun and shouldn’t be taken too serious.

2 Likes

Which is totally fine.

1 Like