Can't invoke CYOA prompt of AW Freyr's Hybrid Choices

Hi,

I created a basic conversation in a stand-alone game using this extension and had it working no problem. I then pasted the code into my current game and can’t seem to initiate cyoa and change the prompt. I have set this condition up to do so:

After changing the channel of the VHF to 71:
	if the current weather is no_wind:
		say "You tune [the noun] to channel 71, and have a convo with the manager";
		switch to cyoa at P1.

P1 is a page.
	" After a few moments you hear the marina manager come online."

P2 is a page.
	"[first time]'Ahoy. I trust everything is in good order.' You hear him shuffling paper as he continues.[only] 'How can I help you?' the marina manager says."
	The cdesc is "Talk to marina manager". It is for p1.

While it’s capturing the first part of the condition, it is not changing the prompt and instead prints a description of the room:

>tune vhf to 71
You tune the VHF to channel 71, and have a convo with the manager
You are at Esper's chart table, a large desk wide enough to accomodate (rest of room description).

My initial thought is that there is an endpage running that immediately cancels the prompt, but the only endpage I have is later on, and they relate to P2, not P1.

I changed the switch condition to run at P2 instead and it will even print the P2 content:


>tune vhf to 71
You tune the VHF to channel 71, and have a convo with the manager"Ahoy, Esper. I trust everything is in good order." You hear him shuffling paper as he continues. "How can I help you?" the marina manager says.

You are at Esper's chart table, a large desk wide enough to accomodate paper charts (rest of room description)


But again, the prompt is ignored and instead it prints the room description.

Actually, it’s odd because when set to go to P1, it doesn’t print P1 description, but it does when set to P2. However, neither invoke the cyoa prompt.

One thing I haven’t tried is sending the whole conversation to a new room, but I am assuming I shouldn’t need to do this.

I have included and installed the extension correctly. I’m running 10.1.2.20220830 on W10.

Is my condition correct? Anything else I should know or any way I can check?

OK, I was incorrect. It IS invoking the prompt. I hadn’t tested it but when I type a number, it is returning the CYOA prompt:

>tune vhf to 71
You tune the VHF to channel 71, and have a convo with the manager
You are at Esper's chart table, a large desk wide enough to accomodate paper charts and a logbook. There's an array of displays, dials, breakers and instruments. Mounted on the bulkhead is a VHF radio.

>1
There is no choice corresponding to that number.

>2
There is no choice corresponding to that number.

>3
There is no choice corresponding to that number.

>4
There is no choice corresponding to that number.

>tune vhf to 16
That command isn't available in choice mode.

So I have tried stripping back all my pages to the bare minimum:

After changing the channel of the VHF to 71:
	if the current weather is no_wind:
		say "You tune [the noun] to channel 71, and have a convo with the manager";
		switch to cyoa at p1.

p1 is a page. 
	"The marina uses CH71 for communication between marina and boat owners. There's normally someone on stand-by so you pick up the mic, press the PTT button and hail the marina. After a few moments you hear the marina manager come online.". 


P2 is a page.
	"[first time]'Ahoy, Esper. I trust everything is in good order.' You hear him shuffling paper as he continues.[only] 'How can I help you?' the marina manager says."
	The cdesc is "Talk to marina manager". It is for p1.


P3 is for p2.
	"You can change channel on the VHF by typing 'tune vhf to XX', where XX is your prefered channel number."
	The cdesc is "Try another channel". It is for p1. It is an end-page.

…but it is still returning the above.

Unfortunately, I can’t seem to reproduce the issue. When I copy-paste your example and just replace the initiating action by jumping, like this…

Include Hybrid Choices by AW Freyr.

The Boat is a room. "A nice yacht."

After jumping:
	say "You jump to activate the radio.";
	switch to cyoa at p1.

p1 is a page. 
	"The marina uses CH71 for communication between marina and boat owners. There's normally someone on stand-by so you pick up the mic, press the PTT button and hail the marina. After a few moments you hear the marina manager come online.". 


P2 is a page.
	"[first time]'Ahoy, Esper. I trust everything is in good order.' You hear him shuffling paper as he continues.[only] 'How can I help you?' the marina manager says."
	The cdesc is "Talk to marina manager". It is for p1.


P3 is for p2.
	"You can change channel on the VHF by typing 'tune vhf to XX', where XX is your prefered channel number."
	The cdesc is "Try another channel". It is for p1. It is an end-page.

… then I get this output:

Boat
A nice yacht.

>jump
You jump to activate the radio.

The marina uses CH71 for communication between marina and boat owners. There’s normally someone on stand-by so you pick up the mic, press the PTT button and hail the marina. After a few moments you hear the marina manager come online.

  1. Talk to marina manager
  2. Try another channel

>1
[Talk to marina manager]

“Ahoy, Esper. I trust everything is in good order.” You hear him shuffling paper as he continues. “How can I help you?” the marina manager says.

  1. Try another channel

>1
[Try another channel]

You can change channel on the VHF by typing “tune vhf to XX”, where XX is your prefered channel number.

Boat
A nice yacht.

>

… which seems correct.

Is there anything else going on in your game which might interfere? I’m not sure what would cause the issue, maybe an Every turn rule could be relevant.

The extension uses a “Carry out looking” rule, so if you have an “Instead of looking” elsewhere, or other rules to modify the looking action, then that might play a role. You can see which rules are running during a turn by typing “RULES” in the IDE interpreter.

2 Likes

Yes, this is just a snippet and there’s a lot more going on in the game that I didn’t include in my sample code. It has to be something else that’s causing it to trip up. I was thinking I might have to rebuild the game, copying and pasting a section at a time and keep testing until I cause the bug. That’s one way of debugging, albeit extremely laborious. I’ll start with your other suggestions first before diving deeper. I have a few ‘every turn’, which I should be able to rewrite.

I haven’t used the RULES feature yet either. This is the first major bug I’ve come across, so I’ll try this first thing tomorrow. Thank you.

1 Like