|
Planeshift
|
This class exists per NPC, and holds all dialog triggers, responses and scripts for this particular NPC by holding references to his/her Knowledge Areas. More...
#include <psnpcdialog.h>
Public Member Functions | |
| bool | AddKnowledgeArea (const char *ka_name) |
| bool | AddResponse (const char *area, const char *words, const char *response, const char *minfaction) |
| bool | AddSynonym (const char *word, const char *synonym) |
| bool | AddWord (const char *word) |
| bool | AssignNPCArea (const char *npcname, const char *areaname) |
| void | DumpDialog () |
| Add a new trigger to the cached list. More... | |
| NpcResponse * | FindXMLResponse (Client *client, csString trigger, int questID=-1) |
| bool | Initialize (iDataConnection *db, PID npcID) |
| bool | Initialize (iDataConnection *db) |
| bool | LoadKnowledgeAreas (PID npcID) |
| psNPCDialog (gemNPC *npc) | |
| NpcResponse * | Respond (const char *text, Client *client) |
| void | SubstituteKeywords (Client *player, csString &response) const |
| virtual | ~psNPCDialog () |
Protected Member Functions | |
| void | AddBadText (const char *text, const char *trigger) |
| bool | CheckPronouns (psString &text) |
| void | CleanPunctuation (psString &str, bool cleanQMark=true) |
| NpcResponse * | ErrorResponse (const psString &text, const char *trigger) |
| void | FilterKnownTerms (const psString &text, NpcTriggerSentence &trigger, Client *client) |
| Recognizes phrases in the text and translates them to synonyms, Ignores any unrecognized phrases. More... | |
| NpcResponse * | FindOrGeneralizeTrigger (Client *client, NpcTriggerSentence &trigger, csArray< int > &gen_terms, int word) |
| Find a trigger by trying every combinations of generalization for each term. More... | |
| NpcResponse * | FindResponse (csString &trigger, const char *text, int questID=-1) |
| NpcResponse * | FindResponseWithAllPrior (const char *area, const char *trigger, int questID=-1) |
| NpcResponse * | RepeatedResponse (const psString &text, NpcResponse *resp, csTicks when, int times) |
| void | UpdateAntecedents (NpcResponse *resp) |
Protected Attributes | |
| psString | antecedent_her |
| psString | antecedent_him |
| psString | antecedent_it |
| psString | antecedent_them |
| Client * | currentClient |
| gemActor * | currentplayer |
| iDataConnection * | db |
| DialogHistory | dialogHistory |
| csArray< KnowledgeArea * > | knowareas |
| csRandomGen * | randomgen |
| gemNPC * | self |
This class exists per NPC, and holds all dialog triggers, responses and scripts for this particular NPC by holding references to his/her Knowledge Areas.
Definition at line 151 of file psnpcdialog.h.
| psNPCDialog::psNPCDialog | ( | gemNPC * | npc | ) |
|
virtual |
|
protected |
| bool psNPCDialog::AddKnowledgeArea | ( | const char * | ka_name | ) |
| bool psNPCDialog::AddResponse | ( | const char * | area, |
| const char * | words, | ||
| const char * | response, | ||
| const char * | minfaction | ||
| ) |
| bool psNPCDialog::AddSynonym | ( | const char * | word, |
| const char * | synonym | ||
| ) |
| bool psNPCDialog::AddWord | ( | const char * | word | ) |
| bool psNPCDialog::AssignNPCArea | ( | const char * | npcname, |
| const char * | areaname | ||
| ) |
|
protected |
|
protected |
| void psNPCDialog::DumpDialog | ( | ) |
Add a new trigger to the cached list.
Add a new response to the cached list.
|
protected |
|
protected |
Recognizes phrases in the text and translates them to synonyms, Ignores any unrecognized phrases.
Returns array of recognized phrases.
|
protected |
Find a trigger by trying every combinations of generalization for each term.
|
protected |
|
protected |
| NpcResponse* psNPCDialog::FindXMLResponse | ( | Client * | client, |
| csString | trigger, | ||
| int | questID = -1 |
||
| ) |
| bool psNPCDialog::Initialize | ( | iDataConnection * | db, |
| PID | npcID | ||
| ) |
| bool psNPCDialog::Initialize | ( | iDataConnection * | db | ) |
| bool psNPCDialog::LoadKnowledgeAreas | ( | PID | npcID | ) |
|
protected |
| NpcResponse* psNPCDialog::Respond | ( | const char * | text, |
| Client * | client | ||
| ) |
| void psNPCDialog::SubstituteKeywords | ( | Client * | player, |
| csString & | response | ||
| ) | const |
|
protected |
|
protected |
Definition at line 157 of file psnpcdialog.h.
|
protected |
Definition at line 157 of file psnpcdialog.h.
|
protected |
Definition at line 157 of file psnpcdialog.h.
|
protected |
Definition at line 157 of file psnpcdialog.h.
|
protected |
Definition at line 164 of file psnpcdialog.h.
|
protected |
Definition at line 163 of file psnpcdialog.h.
|
protected |
Definition at line 161 of file psnpcdialog.h.
|
protected |
Definition at line 165 of file psnpcdialog.h.
|
protected |
Definition at line 155 of file psnpcdialog.h.
|
protected |
Definition at line 162 of file psnpcdialog.h.
|
protected |
Definition at line 154 of file psnpcdialog.h.