NWNX:EE  8193.36.12
Dialog

Readme

Functions exposing additional dialog properties

Files

file  nwnx_dialog.nss
 

Functions

int NWNX_Dialog_GetCurrentNodeType ()
 Get the Node Type of the current text node. More...
 
int NWNX_Dialog_GetCurrentScriptType ()
 Get the Script Type of the current text node. More...
 
int NWNX_Dialog_GetCurrentNodeID ()
 Get the absolute ID of the current node in the conversation. More...
 
int NWNX_Dialog_GetCurrentNodeIndex ()
 Get the index of the current node in the list of replies/entries. More...
 
string NWNX_Dialog_GetCurrentNodeText (int language=NWNX_DIALOG_LANGUAGE_ENGLISH, int gender=GENDER_MALE)
 Get the text of the current node. More...
 
void NWNX_Dialog_SetCurrentNodeText (string text, int language=NWNX_DIALOG_LANGUAGE_ENGLISH, int gender=GENDER_MALE)
 Set the text of the current node for given language/gender. More...
 
void NWNX_Dialog_End (object oObject)
 End a conversation oObject is involved in, it will fire the OnAbort script of the conversation. More...
 

Function Documentation

◆ NWNX_Dialog_GetCurrentNodeType()

int NWNX_Dialog_GetCurrentNodeType ( )

Get the Node Type of the current text node.

Returns
A Node Type. If called out of dialog, returns NWNX_DIALOG_NODE_TYPE_INVALID

Definition at line 81 of file nwnx_dialog.nss.

◆ NWNX_Dialog_GetCurrentScriptType()

int NWNX_Dialog_GetCurrentScriptType ( )

Get the Script Type of the current text node.

Returns
A Node Type. If called out of dialog, returns NWNX_DIALOG_SCRIPT_TYPE_OTHER

Definition at line 89 of file nwnx_dialog.nss.

◆ NWNX_Dialog_GetCurrentNodeID()

int NWNX_Dialog_GetCurrentNodeID ( )

Get the absolute ID of the current node in the conversation.

Note
NWNX_DIALOG_NODE_TYPE_ENTRY_NODE and NWNX_DIALOG_NODE_TYPE_REPLY_NODE nodes have different namespaces, so they can share the same ID
Returns
The absolute ID in the dialog. If called out of dialog, returns -1

Definition at line 97 of file nwnx_dialog.nss.

◆ NWNX_Dialog_GetCurrentNodeIndex()

int NWNX_Dialog_GetCurrentNodeIndex ( )

Get the index of the current node in the list of replies/entries.

Note
The index is zero based, and counts items not displayed due to a StartingConditional.
Returns
The index of the current node.

Definition at line 105 of file nwnx_dialog.nss.

◆ NWNX_Dialog_GetCurrentNodeText()

string NWNX_Dialog_GetCurrentNodeText ( int  language = NWNX_DIALOG_LANGUAGE_ENGLISH,
int  gender = GENDER_MALE 
)

Get the text of the current node.

Parameters
languageThe language of the text.
genderThe gender for the text.

Definition at line 113 of file nwnx_dialog.nss.

◆ NWNX_Dialog_SetCurrentNodeText()

void NWNX_Dialog_SetCurrentNodeText ( string  text,
int  language = NWNX_DIALOG_LANGUAGE_ENGLISH,
int  gender = GENDER_MALE 
)

Set the text of the current node for given language/gender.

Note
This will only work in a starting conditional script (action take comes after the text is displayed)
Parameters
textThe text for the node.
languageThe language of the text.
genderThe gender for the text.

Definition at line 123 of file nwnx_dialog.nss.

◆ NWNX_Dialog_End()

void NWNX_Dialog_End ( object  oObject)

End a conversation oObject is involved in, it will fire the OnAbort script of the conversation.

Warning
Calling this from a conversation script will crash your server.
Parameters
oObjectThe object in a conversation

Definition at line 133 of file nwnx_dialog.nss.

Variable Documentation

◆ NWNX_DIALOG_NODE_TYPE_INVALID

const int NWNX_DIALOG_NODE_TYPE_INVALID = -1

Definition at line 13 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_NODE_TYPE_STARTING_NODE

const int NWNX_DIALOG_NODE_TYPE_STARTING_NODE = 0

Definition at line 14 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_NODE_TYPE_ENTRY_NODE

const int NWNX_DIALOG_NODE_TYPE_ENTRY_NODE = 1

Definition at line 15 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_NODE_TYPE_REPLY_NODE

const int NWNX_DIALOG_NODE_TYPE_REPLY_NODE = 2

Definition at line 16 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_SCRIPT_TYPE_OTHER

const int NWNX_DIALOG_SCRIPT_TYPE_OTHER = 0

Definition at line 22 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_SCRIPT_TYPE_STARTING_CONDITIONAL

const int NWNX_DIALOG_SCRIPT_TYPE_STARTING_CONDITIONAL = 1

Definition at line 23 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_SCRIPT_TYPE_ACTION_TAKEN

const int NWNX_DIALOG_SCRIPT_TYPE_ACTION_TAKEN = 2

Definition at line 24 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_ENGLISH

const int NWNX_DIALOG_LANGUAGE_ENGLISH = 0

Definition at line 30 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_FRENCH

const int NWNX_DIALOG_LANGUAGE_FRENCH = 1

Definition at line 31 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_GERMAN

const int NWNX_DIALOG_LANGUAGE_GERMAN = 2

Definition at line 32 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_ITALIAN

const int NWNX_DIALOG_LANGUAGE_ITALIAN = 3

Definition at line 33 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_SPANISH

const int NWNX_DIALOG_LANGUAGE_SPANISH = 4

Definition at line 34 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_POLISH

const int NWNX_DIALOG_LANGUAGE_POLISH = 5

Definition at line 35 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_KOREAN

const int NWNX_DIALOG_LANGUAGE_KOREAN = 128

Definition at line 36 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_CHINESE_TRADITIONAL

const int NWNX_DIALOG_LANGUAGE_CHINESE_TRADITIONAL = 129

Definition at line 37 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_CHINESE_SIMPLIFIED

const int NWNX_DIALOG_LANGUAGE_CHINESE_SIMPLIFIED = 130

Definition at line 38 of file nwnx_dialog.nss.

◆ NWNX_DIALOG_LANGUAGE_JAPANESE

const int NWNX_DIALOG_LANGUAGE_JAPANESE = 131

Definition at line 39 of file nwnx_dialog.nss.