Designing a delegating help system

Hi!

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.

What is the right way to do this?

Thanks!

Hi!

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.

(understand [about]) %% no 'command'

Hope this helps!

1 Like

Thank you!

I must point that About is the recognised meta-verb for the story file’s vital data and author’s notes on the story.

so, I think that you should kept (perform [About]) as the above standard meta-verb…

Best regards from Italy,
dott. Piergiorgio.

1 Like