I want a system where you can type “about” and get prompted with various links that let you put in a command like “about life” or “about god” or whatever and have an explanation given. However I can’t figure out how to express this to Dialog. Below is my attempt, which doesn’t work:
(understand command [about])
(perform [about])
What would you like to know about?
(par)(link [about life]) { Life }
(topic keyword @life)
(perform [about @life])
The answer is 42.
You’re almost there. What’s missing is a way for the parser to map “about” followed by some text into the action [about $]:
(understand [about | $Text] as [about $Topic])
*(understand $Text as topic $Topic)
It’s also a good habit to provide a printed representation for each topic, although in this case it’s redundant:
(describe topic @life) life
By the way, you’re defining [about] as a command, i.e. an out-of-world action. Perhaps it makes more sense as an in-game action here, although it’s up to you. The main difference in practice is that time passes after in-game actions.