Difference between revisions of "Project Phoenix 2 Dialogs"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
(Created page with "*Back to Main Page ==Welcome==")
 
Line 1: Line 1:
 
*[[Project_Phoenix_2|Back to Main Page]]
 
*[[Project_Phoenix_2|Back to Main Page]]
 
==Welcome==
 
==Welcome==
 +
The dialog system consists of a group of tables, functions and variables. The dynamic window display is used in the merchant systems user interface that comes with Project Phoenix. The system is simply designed and easy to modify to suit your server needs. It uses your basic Node based design. It allows you to have required variables or skill level to access the Node or even the player responses. Allowing you to set up simple dialog to complex progressive dialogs. In this documentation I will explain the basics of how it is set up.
 +
 +
===Dialog Table===
 +
The dialog table is a global variable that will contain each of your dialog trees. This Table is located in the mods/ProjectPhoenix2/scripts/dialog/dialog.lua. The table name is Dialog. Once you create a new dialog table and
 +
add it to the global Dialog table, it will be a simple as adding a string object variable to any merchant in my merchant system. Lets take a look at setting up a conversation node shall we?
 +
 +
====Conversation Node Table====
 +
Below is a small example table of a conversation
 +
 +
Dialog.HelloWorld=
 +
{
 +
StartNode =
 +
{
 +
NpcText="Hello World",
 +
Responses=
 +
{
 +
{
 +
Text="Hello Mr Npc, What else do you know?|GotoNode|WhatElse",
 +
},
 +
},
 +
},
 +
WhatElse =
 +
{
 +
NpcText="Click continue for some fun.",
 +
Responses=
 +
{
 +
{
 +
Text="Sure lets see what is next|GotoNode|StartNode",
 +
},
 +
},
 +
},
 +
}

Revision as of 05:16, 24 July 2019

Welcome

The dialog system consists of a group of tables, functions and variables. The dynamic window display is used in the merchant systems user interface that comes with Project Phoenix. The system is simply designed and easy to modify to suit your server needs. It uses your basic Node based design. It allows you to have required variables or skill level to access the Node or even the player responses. Allowing you to set up simple dialog to complex progressive dialogs. In this documentation I will explain the basics of how it is set up.

Dialog Table

The dialog table is a global variable that will contain each of your dialog trees. This Table is located in the mods/ProjectPhoenix2/scripts/dialog/dialog.lua. The table name is Dialog. Once you create a new dialog table and add it to the global Dialog table, it will be a simple as adding a string object variable to any merchant in my merchant system. Lets take a look at setting up a conversation node shall we?

Conversation Node Table

Below is a small example table of a conversation

Dialog.HelloWorld=
{
	StartNode =
	{
		NpcText="Hello World",
		Responses=
		{
			{
				Text="Hello Mr Npc, What else do you know?|GotoNode|WhatElse",		
			},
		},
	},
	WhatElse =
	{
		NpcText="Click continue for some fun.",
		Responses=
		{
			{
				Text="Sure lets see what is next|GotoNode|StartNode",		
			},
		},		
	},
}