Also, how do you indicate whether an NPC has some long tale to tell on a particular subject? Thats what I was getting at with the pairing of PC Response with the NPC's dialog text.
Example lets say you want to indicate that NPC Foo has backstory to tell for Quest #A13Z. How do you initialize the NPC so that when in conversation with the PC the possibility for telling the backstory shows up? Is it simply the fact that you keep it to one quest at a time on an NPC so that if they have a long tale to tell on something it will be about the currently active quest.
I broke it down into different types of information. Back story is usually that NPC's story. It is triggered by a random "what do you do around here?, what brings you here?" sort of question. But the NPC could go in any direction you wanted from that starting point.
Then there is what I call flavor text. This is fully controlled, you must specify the PC line and then at least on page of NPC output. Whether this shows or not is controlled by a prerequisite variable which, if configured, must be set non-zero on the module or PC for the text to fire. This text could be anything the story requires since you have control over the PC line. These are used for things that aren't required to advance quests. Flavor text is usually once per NPC per PC.
The quests are in two parts really. There's the quest giver's part. This is where the quest is explained, requirements laid out etc and returning to complete the quest. The former is provided from the generic "anything going on around here?" prompt in the main page, which also delivers rumors if no quest is available. The PC text for the later is usually defined as part of the quest, along with what the NPC says after the PC reports completion, but if not there are a few generic ones like "It is done." That's the first part.
The second part is what I call quest info. This is configured the same way as quests (an ordered list of quest IDs). On dlg init the NPC is given the quest info for the first quest listed for which the PC is in the right state. What quest state is required, along with any item(s) needed to be
the PC's possession etc are part of the configuration for that quest info segment. The text the PC speaks for this is required to be provided.
It can be anything appropriate for the quest. And then what the NPC replies with is a possibly multipage response (along with optionally taking the items, given other items etc). It can also be configured to require a bribe or intimidation/persuade to get the NPC to give the quest info.
Usually delivering the quest info advances the quest state, but that is not required.
All of these (flavor, quest assignment and completion, and quest info anyway) allow for an arbitrary script to be specified as well. Together all of these give a fair amount of flexibility. There are few other things like support for doing the work before being assigned the quest and saying, "oh yeah, those goblins, I already took care of that.". Opening stores, opening special stores base on race, class etc, stealing from the store, doing the subdlg I mentioned earlier.
Anyway, that's pretty much where I am now. I was aiming for something I could drop in place and have it more or less just work and be easily configurable outside of the toolset. This discussion has given me a few things to add and clean up as well. It never ends '>