Hi,
I have just spent some time twiddling with Twee. One thing I found frustrating is that I sometimes found myself creating intermediate pages whose sole task was to set a few variables and then use <<display>> to show a core page. These intermediate pages all need to have different titles (which are shown in the Jonah story format) while the titles of the pages included via <<display>> are not.
What I wanted to be able to do was store/update some variables, but always proceed to the following page. This is not the behavior you find in the example stories (where different actions lead to different outcome pages), but it can be useful if you want to progress through a fixed sequence of passages while memorizing information along the way.
Therefore I developed the included plugin file which provides 2 macro's <<linkAndSet>> and <<chooseAndSet>>. Both macro's expect at least 2 parameters: the passage to link to, a JSON object that enumerates the variables to set, and optionally the link text to use.
Note: The scripts use eval("(" + theJSONString + ")"), rather than JSON.parse(theJSONString). The use of "eval" has some repercussions w.r.t. security and stability (an incorrect script could wreak havoc and potentially crash your story), but it also provides you with the ability to update variables, instead of just assigning constants to them.
The included example file implements the class quiz in Morrowind, which is a generic example of why I would like this functionality in my stories. You can find an explanation of how the quiz works at the URL below.
regards,
Stijn Mostinckx
P.S. I have also included a version in which the scripts have been minified using uglifyjs. This should save you about 2000 bytes of space and thus loadtime.