So I have this code, which works, but I have over 100 instances, so it will be a bit of busy work to make sure the warning is in place everywhere.
the “every turn” rules don’t fire on a mistake. Is there any way to make them fire? It makes sense they should be short-circuited in general, but here, I’d like to give the player a positive nudge.
r1 is a room. oafs' sofa is in r1.
understand "afos" as a mistake ("<silly 80s music reference here>.[ever-warn-test]") when oafs' sofa is touchable.
understand "as of" as a mistake ("Example to show text substitution must be re-added.[ever-warn-test]") when oafs' sofa is touchable.
ever-warn is a truth state that varies.
to say ever-warn-test:
if ever-warn is true, continue the action;
say "[paragraph break]Congratulations! You found a silly anagram. Sometimes, they may give clues and hidden bonus points, but sometimes they won't. I hope they're amusing. If you wish to see them all, <this game> Mistakes.i7x will let you see them.[no line break]";
now ever-warn is true;
I think you can just add “follow the every turn rulebook” in your to say code; of course that’s just the every turn rules so if you also wanted scene changes and other stuff to fire you’d need to add those too (I think the top-level is the turn sequence rulebook, but I don’t have the IDE in front of me to check – you can just look at the rules portion of the index to be sure).
Mistakes are handled by the parser itself and the turn sequence comes grinding to a halt right there, with the parser printing the mistake text and starting over at the top by prompting for another command.
If you wanted lots more flexibility, you could understand all of those things as some new action…
Mistaking is an action out of world.
Understand "afos" as mistaking.
Understand the commands "singleword1", "singleword2", "singleword3" as "afos".
Understand "as of" as mistaking. [each multiword one needs separate handling]
carry out mistaking could look up the response text in a table or something.
Thanks, Mike and Zed!
It’s good to know I wasn’t oblivious to something I should’ve seen. It does make sense the parser cuts off mistakes right away.
I eventually went with just putting this warning in the introductory areas. Which meant changing the code in only 20 places or so. The player probably doesn’t want/need the reminder once they get more into the game.