Conversation branches with convlib?

Denesta
22 Jan 2019, 07:09

I was trying to work out how to do conversation and saw convlib but after using it I saw little problem with how I wanted to use it.

So I set up some starter topics and some follow ups for them but when a follow up topic is added it just adds it in with all the other starters. What I am trying to do is, once the player chooses a starter topic, only have the followups for that topic be selectable until the player either leaves or restarts the convo with a "Lets talk about something else," type topic.

Is that something I can do with convlib?


fuchs
02 Feb 2019, 21:29

As far as i can tell there is no way to temporarily supress certain topics from displaying in the library. Once you use HideTopic() on something it can´t be reversed with ShowTopic().

I have the same problem but I don´t have an implemented solution. Just a concept:

My current idea is that once the player selects a branching topic, the game moves all other topics from the NPC to another room, before moving the appropriate branch-topics to the NPC. On exiting the branch the topics are moved back to the NPC. If other objects that the npc is carrying don´t matter during the conversation, you don´t even need to seperate the topics from the NPCs other children. Just move all of them to a storage room (and back).

One constraint is that you can´t place topics in rooms anymore because they wouldn´t be moved by the script. (Topics starting with a characters name and placed in a room are only visible if the NPC is in the room.)

Are there any more obvious problems with this idea?


The Pixie
03 Feb 2019, 12:29

Set the "hidden" attribute of a topic to false to have it re-appear.

For full control of what topics get offered, over-ride the "GetTopics" function. It takes the NPC as an attributes and should return an object list of the topics.