"Hybrid Choices" extension help

So I am trying to fiddle around with Hybrid Choices by AW Freyr in order to improve my NPC interactions. The source text I have written seems to do pretty much what I want it to do, but as I play through it, I realize that there’s ways upon which it can be improved, I just can’t figure out what they are specifically. I was wondering if someone might be willing to take a look at what I have currently and can help me with pointing out what might be confusing for a player or what could use some changing.

Here is what I have at the moment:

"npc interactions"

Include Hybrid Choices by Aw Freyr.
Include Basic Screen Effects by Emily Short.

Talking to is an action applying to one visible thing.  Understand "talk to [someone]" as talking to.

The current interlocutor is a person that varies.
A person has an object called the recent page.  The recent page is usually nothing.
Carry out talking to a person (called the guy):
	now the current interlocutor is the guy;
	switch to cyoa at the recent page of the guy.
Before selecting an end-page page:
	now the recent page of the current interlocutor is the current page.

A page-toggle rule:
	populate choice list with LeaveConvo.
	[populate choice list with unread choices.]
LeaveConvo is an end-page page.  The cdesc is "[italic type]End Conversation[roman type]".
choice-priority rule for LeaveConvo:
	rule succeeds with result 200.
Instead of talking to Aerataehd:
	switch to cyoa at Aera1.
Aera1 is a page.  The description of Aera1 is "Hey bud, how's it going?"

Aera2a is a page.  The cdesc is "Fine."  The description is "Well that's good.  As for me, I'm not so fine." It is for Aera1.  It flips to Aera3.

Aera2b is a page.  The cdesc is "Great!"  The description is "Awesome!  As for me, I've been in better shape."  It is for Aera1.  It flips to Aera3.

Aera2c is a page.  The cdesc is "Meh." The description is "Ah, well, I'm sorry to hear that.  I'm not doin' so hot, either."  It is for Aera1.  It flips to Aera3.

Aera3 is a page.  The description is "Oh man, I should NOT have gone on that last quest."

Aera4 is a page.  The cdesc is "Who are you?"  It is for Aera3 and Aera5.  The description is "'The name's [aerataehd],' he says, 'but you can call me AERA.  Everyone else does, since my full name is too hard to spell.'  And with that, he gives a sly little nod to some invisible wall."

Aera5 is a page.  The cdesc is "What quest?" It is for Aera3 and Aera4.  It is cancelled by Aera6. The description is "'The Journey to Slay the Gods.  In case you didn't read the intro, the gods used to be pretty chill, all taking good care of us humans and whatnot, but over time they've let the power go to their heads.  Now they've become greedy and selfish, and must be stopped."

A page-output rule for Aera5:
	now the player is carrying the shield;
	say "You have gained [shield]!"
Aera6 is a page.  The cdesc is "How do I stop them?"  It is for Aera5 and Aera7.  The description is "Well, to defeat the gods, you'll have to get stronger first.  Fight some battles, help some people, solve some puzzles.  You know, that sort of thing.  Then, when you're ready, find the Canyx and she can take you to the Ivory Tower where the gods live.  You'll have to tame her first, though. Here, take my shield to get you started."
A person can be AeraInformedQuest.
A page-toggle rule for Aera6:
	now the player is AeraInformedQuest.

Aera7 is a page.  The cdesc is "Can I help you somehow?"  It is for Aera5 and Aera6.  The description is "Yeah, you could, actually.  There's this girl, Mantroche.  Find her, and show her that you know me.  Then she'll come help me."
A person can be AeraInformedMantro.
A page-toggle rule for Aera7:
	now the player is AeraInformedMantro.

Living Forest is a room. Place is east of Living Forest.

The SHIELD is a thing. The printed name of the shield is "AERATAEHD'S SHIELD".

AERATAEHD is a man in Living Forest. Understand "aera" as Aerataehd. Aerataehd carries the shield.  The recent page of Aerataehd is Aera1.

One thing I know I want to change (but I can’t seem to figure out an appropriate way to do it) is that I want a choice to remain available until the player chooses it. So for example, if the player chooses to first ask “What quest?” and then follows through with the thread about the quest, the choice “Who are you?” will remain available until the point it’s chosen. Although maybe this is asking too much, considering if the player asks “Who are you?” in the middle of the quest thread (as opposed to at the end), the choices could get really muddled, especially in similar but more complicated scenarios. This is the first time I’ve ever tried actual NPC interaction, so it’s quite possible I’m way in over my head here.

[Title updated by Mod]

To make a page and its choice disappear after being selected, declare it as “one-off”.

Use a choice-display rule to alter the text of a choice.

I think…you might have trouble with:

A person has an object called the recent page.  The recent page is usually nothing.

“Object” isn’t a “page” and won’t work like one. “Nothing” may work like you have it, but if it doesn’t, try:

A person has a page called the recent page. The recent page of a person is usually “”.

Thanks Hanon!

Getting a reply for this post took considerably longer than most, and I was beginning to grow a little worried my post was considered inappropriate for this particular forum or something… that or no one was interested in this particular topic.

I did try using one-offs, which does work the first time around, but then those choices seem to be gone forever. I only want them gone for the duration of the conversation (I also tried dead-ends, but that gave unwanted results as well, although admittedly it didn’t seem quite as severe – it just repeated the page it came from, whereas I only wanted the choices repeated). For example, say the player has forgotten the information and wants to go back to that NPC to talk to them again. With one-offs, they can no longer access the information (unless I’m coding it wrong somehow, which of course is entirely possible).

I did try the code as I have it written above, and it does seem to work, for the most part (it was written for me by AW Freyr because I had no idea what I was doing). So if I leave the conversation, then talk to that particular NPC again, it does pick up where I left off. But I wanted it so that if the player leaves the conversation AND goes to a different room, then when they return to that NPC it would start the dialog from the very beginning again. I tried doing this both with a “before going from [LOCATION]” rule, but that didn’t work out so well. I forget what error I got though. I’m going to try it your way, though, to see if maybe I can get my goal to work.

Oh good, glad to hear AW is helping you, he’s the one who taught me the extension. Not everyone uses Hybrid Choices, so I might be the only other person around currently who can help specifically with it; sorry for the delay.

I feel you - I did the same thing reading the documentation “this will NEVER EVER APPLY to what I want to do” and then I figure out it’s exactly what I need to use to accomplish a specific effect. AW did an amazing job with this extension and I keep finding new and interesting ways to use it.

If you don’t want choices gone for good with one-off, you can use choice-switch rules to turn them on and off, combined with page-toggle rules to manipulate some variables or truth states.

Also trickier is you can do “kinds of pages” like…

[code]A bob-conversation is a kind of page.

HelloBob is a bob-conversation. “‘Wassup?’ you say, slapping Bob five.”. It flips to bobresponses.[/code]

Then you can write rules (or page-toggle) to “activate/deactivate bob-conversation pages” to turn them all on or off - or even classify kinds of pages based on his dialogue in sections like “bob-intro pages” or “bob-macguffin-conv pages” Here’s the documentation for that:

Thanks again, Hanon! After some more playing around, I think I finally was able to get the conversations working the way I want them to. I took your advice about making kinds of pages, which helped immensely. I also took another look at his examples and noticed that he has blank pages before dead-ends, which prevents the a dialog page from reappearing after a choice has been selected. However, I am likely to run into more speed bumps as I create more NPCs and their conversations. If I do, should I create a new post or simply add onto this one?

You can bump this thread if you want. I usually search for active topics. I updated the title of the thread on the first post as well.