Ah, I see what you’re saying, but unfortunately this is in the hint menu, so it’s not actually implemented as an EventList
, nor has a curScriptState
property. There is an integer lastDisplayed
property to the menu object, but this doesn’t help me either, because my system checks each individual hint for still being pertinent before it shows it, so different players, accessing this hint menu at different times, may see differing numbers of hints preceding the one in question, and lastDisplayed
becomes meaningless as a means to know when this particular hint’s turn has come (in order to gReveal something at the right time).
I’ve shared this with @jjmcc , who is using his own flavor of customized hinting, but if anyone else is interested, this is the idea.
A typical hint menu is a list of strings, which the stock system will show one at a time as the player hits Enter, indicating that they want a more detailed hint. I modified the system so that if one of the elements, rather than being a string, is written as a List (within the greater list as a whole), the following options are available:
The first element of this sublist is again a string, the text of the hint.
The second element is a condition, written as a short-form anonymous function, which determines whether this hint is even necessary to be shown at the point in time that the player is opening the hint menu. Very often for a hint menu to be thorough, you need to include lead-up instructions which, however, the majority of players will have already taken care of before they’re driven to the hints. With this second list element, the player does not have to wade through two or four extraneous suggestions every single time they look at a new hint category.
The third element (if supplied) is yet another List (third-layer) naming other Goal
objects to be opened. Stock Hint
objects can do this, but I found it undesirable and cumbersome to split out and name individual hints just for this functionality. Re: the subject of this post, what I have done is added the ability to include strings in this third-element list, rather than just Goal
identifiers. If a string is found, that string is a tag that will be gRevealed the moment the hint is actually player-accessed (it will be immune to the evaluation of the whole menuContents
list).
The fourth element, if supplied, is a condition (expressed by another short anon func) which will “freeze” the hint menu until the condition is fufilled. That particular hint might say something like "You need to take care of the worble-wanger before getting any more hints about the frozzle-flinger. " Because often it’s desirable to create as few submenus as possible, but later hints may make no sense (and be outright spoilers to undiscovered content) until a certain earlier hint has been attended to. I found several places in Prince Quisborne where this hint-freezing was a great help to adding sanity to the difficult hint system.
Here’s a sample from the Prince Quisborne intro:
++ glasshouseGoal: Goal 'How do I get in the glasshouse?' [
'You\'ll need to find the key. ',
'The key is somewhere in the bailey. ',
['There\'s a clue in the cottage. ', {: oogLetter.beenRead }, [oogGoal] ],
['Read the letter on the table for a hint. ', {: oogLetter.beenRead } ],
['Oogerstane\'s letter says his nephew likes to run off with the glasshouse key. Where might Quinkie like to run off to?', {: treehouseLoc.seen } ],
['Have you looked closely at the large tree by the pond? ', {: bailTree.described } ],
['You need to get up in the treehouse. ', {: treehouseLoc.seen}, [treehouseGoal], {: treehouseLoc.seen } ],
...,
...,
'Unlock the glasshouse with the pewter key and go inside. ' ]
closeWhenSeen = glasshouseLoc
;
So, if the player looks for a hint after they’ve gotten inside the cottage and read the letter, the “clue in the cottage” hint and the “Read the letter” hint will never even show. If they have not been in the treehouse, when they get to the “get up in the treehouse” hint, a new hint topic will be added to the hint menu regarding how to get in the treehouse, and furthermore, because of the fourth element in this list, this particular hint menu (about getting in the glasshouse) won’t show any more hints until the player has in fact gotten into the treehouse, because the following hints it would give are meaningless (and spoilery) to the player… if the player only wants a nudge about the next step for the glasshouse, they may not want to accidentally see blatant answers to what they’ll do once they’re up in the treehouse.
For a game like Prince Quisborne, whose hint system alone took me probably a month or more, these modifications were lifesavers!