Author Topic: Are there any text parser games where NPCs ask yes/no questions?  (Read 6272 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Question is pretty much in the title. I'm trying to formalize how NPC conversations take place in Cascadia Quest. You'll be able to 'talk' to someone, and also 'ask about <topic>'. But sometimes the NPCs ask you a question (typically yes/no, but could be other things).

Were there any Sierra games (text parser) where NPCs ask questions, and how was it handled? Of course there was the odd thing like saying "the word" in SQ2, but I'm talking a more general mechanism.


Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #1 on: October 08, 2018, 06:42:57 PM »
The first thing to come to mind was Quest for Glory 1, the 16-color version. Even though you gave your name at character creation, the sheriff then asks again. The action input box comes up, but with a different prompt and your name is already there.

It's so strange, it had to be first on my mind.

Offline troflip

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #2 on: October 08, 2018, 06:55:55 PM »
Yep, but that's a one off, right?

Nonetheless, that is an option: in the input box, if an NPC just asked a question, display the question.

Another alternative someone suggested to me was just to leave the character's question up on the screen when they ask it... e.g. the Print becomes modeless. But I need a clear visual language to indicate that it's now modeless.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #3 on: October 08, 2018, 08:13:47 PM »
LSL3 in the Comedy Hut... with the favorite ethnic group thing. But this and the QfG1 example have in common that they don't use the parser. I assume that that's what you were looking for? Codename: ICEMAN might be an example of that. I think there are instances where you have to type "affirmative" or "yes" or something, where it is handled by the parser.

Offline troflip

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #4 on: October 08, 2018, 08:33:28 PM »
Yep, that's what I'm talking about. Thanks!

Looks like they use the parser as normal, and set a variable or a script to indicate they're looking for a yes/no. So it's kind of handled in an adhoc way slightly differently each time.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #5 on: October 08, 2018, 11:49:35 PM »
You could in principle call Parse and Said manually.

Offline Charles

Re: Are there any text parser games where NPCs ask yes/no questions?
« Reply #6 on: October 11, 2018, 11:19:38 AM »
I've never played Codename: ICEMAN, but there were a few times in QFG1EGA where the game waited on you to say "yes".  The one I'm thinking of is inside Baba Yaga's hut (room 21, I believe).

They used a global variable to determine how many doit loops until the NPC reacted to your non-answer. It had to be a global variable, because they offloaded many of Baba Yaga's actions to other script files.
In the room doit:
Code: [Select]
(method (doit)
;continue to count down, until the hero responds
(if (> countdownAwaitingResponse 1)
(-- countdownAwaitingResponse)
)
;time's up.
(if (== countdownAwaitingResponse 1)
(= countdownAwaitingResponse 0)
(BabaYagaKillsHero)
)
(super doit:)
)

and then in Baba Yaga's event handler:
Code: [Select]
(method (handleEvent pEvent)
(cond
((super handleEvent: pEvent))
(
(and
(> countdownAwaitingResponse 0)
(== babaYagaStatus byInit)
(EventEqualsString pEvent @userName)
)
(= countdownAwaitingResponse 0)
(baba setScript: NULL)
(User canInput: FALSE)
((ScriptID 293 0) cue:)
)
(
(and (== (pEvent type?) speechEvent) (> countdownAwaitingResponse 1))
(cond
((Said 'affirmative')
(baba setScript: NULL)
(= countdownAwaitingResponse 0)
(cond
((<= babaYagaStatus byAskedMandrake)
(User canInput: FALSE)
((ScriptID 293 0) cue:) ;firstTalk Script
)
((== babaYagaStatus byAfterMandrake)
(User canInput: FALSE)
((ScriptID 294 0) cue:) ;nextWitch Script
)
)
)
((Said 'n')
(BabaYagaKillsHero)
)
(else
(pEvent claimed: TRUE)
(BabaYagaKillsHero)
)
)
)
)
)

and EventEqualsString is in script 802 (3rd procedure)
Code: [Select]
(procedure (EventEqualsString param1 param2 &tmp temp0 userInputLineAddr)
(if
(and
(User canInput?)
(not (param1 claimed?))
(== (param1 type?) 4)
(or
(== (param1 message?) (User echo?))
(and
(<= 32 (param1 message?))
(<= (param1 message?) 127)
)
)
(User getInput: param1)
)
(param1 claimed: 1)
(= userInputLineAddr (User inputLineAddr?))
(= temp0 1)
(while (< temp0 argc)
(if
(StringEquals userInputLineAddr [param2 (- temp0 1)])
(return temp0)
)
(++ temp0)
)
(param1 type: 128)
(param1 claimed: 0)
(Parse userInputLineAddr param1)
(User said: param1)
)
(return 0)
)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.04 seconds with 23 queries.