Knowledge Levels: Let your information run deep…

In the previous blog, I discussed the progress I had made with Interrogative 3, and realized that up to now, I had not discussed something that is core to how NPCs communicate with players (or, eventually, each other): Knowledge Levels. It’s important to understand what this is to see that Interrogative is not just some run-of-the-mill dialog tree implementation, and a lot deeper than just a collection of semantic data that can be used to sling facts at players.

Example 1: Skill training and tactics

Consider your average MMO’s NPCs: In each zone, the player usually encounters “trainers” that give them access to additional skills (for this example, let’s say Kung Fu, and call the trainers “sifus”), usually by paying for it. Because there’s no deep dialog system behind most of these characters, the dialog is very much limited to the menu choices related to buying skills, and possibly accepting a quest to get to the sifu in the next area (there may be missions assigned, but in general, the dialog options are the garden-variety click-to-accept system). If you involve a deep dialog system, then the player may want to talk to their sifu about their training, and you have the chance to make this dialog relevant and have the player treat the sifu as a mentor. But for each zone, these NPCs only train the player to a certain skill level. This means that your most experienced sifus are likely not the ones stationed at the starting points in the game, but rather in the zones where the players are learning their most advanced skills. And the knowledge displayed by these Kung Fu masters will be substantially different from those training your Level 1 players.

In conversation terms, what this means is that your Kung Fu masters may have some tips and tricks to impart to your high-level players that your lower-level sifus simply don’t know, even though both sifus are pulling their information from the same “bucket” of Kung Fu facts. The master is simply able to dig deeper into that bucket. What a lower-level sifu does not think is possible can be known to a select few masters (reference: Every. Movie. Ever.) and taught only to those who attain a certain level of proficiency.

So how would that work?

Luckily, it’s something very much built into the core of the dialog system of Interrogative! This (optional) information consists of one or more key-value pairs consisting of a Knowledge Tag (usually the name of the subject) and a number indicating the Knowledge Level. The Knowledge Level escalates, so your base level is assumed to be 0 (if you have a Knowledge Tag assigned at all), and higher numbers indicate higher levels of knowledge (there is no practical ceiling for this, though you certainly want to use common-sense in creating a strata for the knowledge).

When dialog is fetched by Interrogative, it will try and return the most knowledgeable piece of dialog, and what that means is that not every fact needs to be tagged for every level of knowledge. Often, a basic piece of knowledge is all you need, and characters at every level of knowledge for that subject will use that fact in their dialog. And other times, you will need to represent additional facts, or different facts where a character with more knowledge is aware of a “correct” version of a fact. Where that’s the case, the same queries to two characters with differing Knowledge Levels will present different dialog.

An interesting side-effect of Knowledge Levels…

This functionality was implemented early on in Interrogative 2 for use in the Epic Frontiers demo, and one of the interesting features I worked into that demo was that if you spammed queries to an NPC, or they just weren’t that into you, they would “lie” by faking not just their Knowledge Levels (in the downward direction), but also faking whether they had the Knowledge Tags assigned to them at all. I imagine more creative things can be done with Knowledge Levels (one thing that comes to mind has to do with tagging facts to direct the NPC to ask the player a question, but that feature is a blog for another day).

Example 2: C-o-n…spiracy…

As stated above, Knowledge Levels represent not just additional facts, or facts available at higher levels, but also “correct” information. Again, spurred by a need in Epic Frontiers, version 2 needed to also be able to simulate bad information about widely-known topics such as a Pandemic which had ravaged the game-world a generation prior to the players’ entry into the game. Some NPCs would believe that certain factions were behind the sickness, whereas when you talked to those with higher Knowledge Levels, you would find that it was just a fast-moving sickness that hit at just the right time. And while belief in conspiracies do not indicate a particular level of knowledge for the character overall, you can simulate misleading information using specific Knowledge Levels (NOTE: The more specific the facts and dialog for this level, the more facts and dialog must be represented by the specific Knowledge Level, or else you would see inconsistent dialog and facts creep into conversations).

Further ideas

Knowledge Levels are a pretty simple system, and there’s a lot of room for improvement, including where hierarchical knowledge is concerned. There are tasks slated to deal with these issues for Interrogative 3, and so this is not the last blog on this subject. Structuring knowledge is as important as the knowledge itself, as it dictates the kinds of techniques you can use to access and use it.

Next blog: Introducing another personality trait…

Leave a Reply