easier way to use vorple hyperlinks?

I’d like to make the displayed nouns in my game clickable, generating a link to an >examine whatever command for each one. I’ve found a pretty laborious way to do this:

Tree is in forest. The description is “[tree-desc]”.

To say tree-desc:
say “A tall pine tree. A”;
place a link to command “examine pinecone” reading “pinecone”;
say “is visible on a high branch.”[/code]

but is there some easier way to automate this process I’m not thinking of?

If you write your text as “[A pinecone] is visible on a high branch.”, then it will invoke the “printing the name” activity on the pinecone. You can tap into this activity to make it print a hyperlink.

I guess I need a line something like:

To say the printed name of something: place a link to command "examine noun" reading "noun";

but I’m not sure how to phrase it.

Ah, here we go, got it! This does the trick:

Rule for printing the name of something: place a link to command "examine [printed name]" reading "[printed name]";


Exactly! Only two caveats with this. One, don’t make any other “rules for printing the name of” without remembering to include the hyperlink, since only one rule applies by default. And two, this may cause little bits of weirdness in the article code (messing up “a” versus “an”). If that happens, it should be easy enough to fix, but I’ll need to actually look at the Standard Rules for that.