Topic Groups

A Topic Group is simply a way of grouping together ActorTopicEntries that have certain characteristics in common. A TopicGroup can appear anywhere an ActorTopicEntry can appear, and the ActorTopicEntries it groups togetther are then located directly within it.

In particular, a TopicGroup defines the following properties:

A TopicGroup can be of particular use for defining Conversation Nodes: the ConvNode subclass of TopicGroup is provided especially for this purpose.

The TopicGroup template is defined as +scoreBoost? 'convKeys' | [convKeys] ?, so that both the scoreBoost and the convKeys properties can be readily defined through the template. Consider the following example:

+ TopicGroup +10 'alice-info'
   isActive = gRevealed('alice')
;

++ AskTopic @tAlice
    "<q>Who is this Alice, anyway?</q>
     <q>Lots of folk would like to know that,</q> he replies, scratching his head. "
;
 
 
++ QueryTopic 'where' 'he heard about alice; did you hear'
   "<q>Where did you hear about this Alice person?</q> you enquire. 
    <q>From the old vicar,</q> he tells you. "
;

This adds the 'alice-info' convKey to both the TopicEntries defined above, and ensures that they are only active when the 'alice' tag has been revealed. It also boosts their matchScore by 10 (which might help ensure, for example, that the QueryTopic is reached in preference to another when the player types a partial query like WHERE HEAR).