Question about questions
troykades
14 Jan 2019, 05:24I'm experimenting with the text adventure version of Quest minus a command bar. Is there a way achieve all of the following together?
- After selecting "speak to" for a given character, have a list of questions appear as in a verb display/drop down menu.
- Introduce, get rid of, change the set of questions depending on the story situation.
- Not have the "1:Yes 2:No" confirmation appear, but instead go straight to the character's answer.
No worries if it can't be done. I'm just curious.

DarkLizerd
14 Jan 2019, 05:43Short answer... yes...
Check out the documentation: http://docs.textadventures.co.uk/quest/
And this: http://docs.textadventures.co.uk/quest/conversations.html
hegemonkhan
14 Jan 2019, 06:04you need to learn about menus, looping, and List/Dictionary Attributes:
http://docs.textadventures.co.uk/quest/scripts/show_menu.html // 'show menu' is a popup window menu
http://docs.textadventures.co.uk/quest/functions/showmenu.html // 'ShowMenu' is a hypertext menu
(you can create your own custom menu display as well, ask/let-me-know if you want to do this)
http://docs.textadventures.co.uk/quest/scripts/if.html
http://docs.textadventures.co.uk/quest/scripts/switch.html
http://docs.textadventures.co.uk/quest/using_lists.html
http://docs.textadventures.co.uk/quest/using_dictionaries.html
http://textadventures.co.uk/forum/samples/topic/5137/list-and-dictionary-extensive-guide-by-hk (my own guide on using lists/dictionaries)
http://docs.textadventures.co.uk/quest/display_verbs.html // (while this is on the built-in 'displayverbs/inventoryverbs' Stringlist Attributes, which control the displayment/usage of your Object's Verbs in the side panels as buttons and as hyperlinks in the big text box on the left, it also teaches you about adding/removing items from any list/dictionary in generally)
http://docs.textadventures.co.uk/quest/scripts/foreach.html
http://docs.textadventures.co.uk/quest/scripts/for.html
http://docs.textadventures.co.uk/quest/scripts/while.html
(you can, and should --- as the 'while' Script/Function has some issues, also easily create your own looping scripts/functions, ask if you need help on how to do them)
http://docs.textadventures.co.uk/quest/character_creation.html (this is a great starting place to learn about menu and list usage)

Io
14 Jan 2019, 06:07Absolutely:
-
Yes! When you select Speak To, have it run a Script that makes a StringList variable, which you then populate with various Strings. Then show a Menu for that list, and after the player selects, have a Switch depending on 'result'.
-
Yes! That StringList I mentioned earlier? Have ANOTHER Stringlist filled with potential options. So you do basically 'For each String in ListOfOptions, add String to MenuStringList'. And you can add or remove from ListOfOptions - just an example name, name it whatever you want - as you want!
-
Yes! As earlier, the Menu avoids this entirely.
ABSOLUTELY learn how Menus work. In my opinion, they are among the most powerful tools Quest has to offer.
hegemonkhan
14 Jan 2019, 06:43the current version of Quest, should have (I believe/assume) Pixie's advanced conversation/dialogue/topic system built into it, doing everything that you want, but you got to learn how to use it of course
hegemonkhan
14 Jan 2019, 06:52the built-in 'ask/Ask' Scripts/Functions are a bit misleading in how they work, which a lot of new people don't realize:
('ask' does a popup window menu and 'Ask' does a hypertext menu)
http://docs.textadventures.co.uk/quest/scripts/ask.html
as it's actually a 'yes:true/no:false' lawyer/court answering system (you can't use 'ask/Ask' for doing normal types of questions and answers, as 'ask/Ask' only allow for yes/no type of questions/answers)
for example:
<function name="example_function">
msg ("Your Name?")
get input {
player.alias = result
string_variable = "Is, " + player.alias + ", correct, as the name that you want for yourself?"
ask (string_variable) {
// if you chose, yes: result = true
// if you chose, no: result = false
if (result) { // if (result = true)
msg ("Your name is: " + player.alias)
} else { // if (result = false)
ClearScreen
example_function
}
}
}
</function>
The Pixie
14 Jan 2019, 08:11If you are using the desktop version, this library will do it all for you:
https://github.com/ThePix/quest/wiki/Library:-Conversations
troykades
15 Jan 2019, 02:06Thank you everyone for your tremendous help (sometimes I struggle to follow the documentation explanations by themselves). Now I have lots ideas and options to build upon.