Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Looking for a good way to build a Question and Answer Decision Tree

Greetings, all. I am trying to build an NPC character that my players can ask questions of. Think of a "Jor'El" type of hologram from Superman. I want to create a macro that starts off with questions like "who are you?", "what is this place?", and the like. I know I can create a macro that can include links to other macros that can display the answers to the questions. What I'd like to do is create some decision trees, for example, if the player asks "Who are you?", the response might include an answer like "I am a hologram of Jor'El...", then provide a link to maybe three other questions. The player can select another question, get an answer, and be possibly presented with more questions. But I want to prevent the player from going back to a previous question, just in case they think they didn't ask the right question to begin with. Is there a way to do this without creating an API (not a programmer unfortunately), or, is there an existing API script that can be used to create this functionality?
1592492093
GiGs
Pro
Sheet Author
API Scripter
This is quite a complex problem. You could do it with a series of chat button menus, but they wont have a memory of what has been selected before. The only way to handle that part would be via an API script, and I don't know of an existing one that would handle it.  You're effectively in Choose Your Own Adventure territory there and is definitely pushing beyond what roll20 was built for. It could be done, but I imagine it would be pretty complex.
1592492778
Spren
Sheet Author
You could technically do this with Handouts and I think it'd look pretty cool. Just link a handout to another handout that links to other handouts <a href="https://wiki.roll20.net/Journal#Link_Between_Journal_Entries" rel="nofollow">https://wiki.roll20.net/Journal#Link_Between_Journal_Entries</a>. If you add and remove handout access as they go it'd work. It's an interesting idea.
Thanks for the suggestions! Ok, then, what about this. Let's say I go the route with creating the chat menus - which is what i'm thinking at the moment. If Player1 selects a link from the chat menu, he could easily scroll up in the chat to select a different question. Is there a way to clear the chat via macro? For example, I'm think the code would look something like this... #ask_question_1 Player1 clicks on the chat menu option... #clear_chat_macro runs #ask_question_2 chat menu appears for Player1 #clear_chat_macro runs... was, rinse, repeat So is there a macro to clear the chat? I'm looking now, but haven't found one yet...
1592493837
GiGs
Pro
Sheet Author
API Scripter
No, there's no way to do that. That's the kind of thing I meant when I said macros have no memory of what has been selected before. If you want to essentially store variables which control how the menus are handled, you can only do that with the API.
Cool, Roger that. Thanks again GiGs :-)
1592495423

Edited 1592495645
Oosh
Sheet Author
API Scripter
I don't mean to sound cheeky, but it sounds like you're trying to make a macro that does your job (as GM). As with any kind of automation, it's kinda cool if you can do it, but kinda uncool when you realise you've just clevered yourself out of a job. Humans are allegedly good at this complex branching conversation stuff... personally I'm not convinced of this, but I have to admit that macros are rubbish at it.
Oosh said: I don't mean to sound cheeky, but it sounds like you're trying to make a macro that does your job (as GM). As with any kind of automation, it's kinda cool if you can do it, but kinda uncool when you realise you've just clevered yourself out of a job. Humans are allegedly good at this complex branching conversation stuff... personally I'm not convinced of this, but I have to admit that macros are rubbish at it. Thanks for the response, Oosh, but your post doesn't do anything to answer the question at hand. GiGs and Spren provided information related to the technical capability of Roll20. Your post appears to be personal opinion. Some folks may not mind the snark when they are asking a question, but others do. Please consider that in the future before posting a comment to someone.