[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
IceBlinkEngine.com • View topic - Understanding dialogue nodes

Understanding dialogue nodes

Discuss the IceBlink Toolset

Understanding dialogue nodes

Postby youngneil1 » Tue Dec 25, 2012 1:21 pm

Now while the dialogue system is still under heavy construction, I cant help but being curious how the nodes relate to each other:

There's four numbers per node it seems: IdNumber, Index, OrderNumber and LinkTo.

IDNumber looks like a historic counter of nodes, providing unique ID for refernece. I guess it 's unrelated to dispaly order of nodes from looking at the examples?

Index and Order Numberr seem to be relevant for nodes on the same heirarchy level of the tree. Not certain what the differnec eis here.

Linkto migth be a jump to node with the referenced IDnumber, creating loops?
__
It seems the ndoe sare played, startign at the top of the tree, going down. Waht happens when a sub-branch is entered?
__
Also there seem to be [keywords] in the dialogue text window, that actually have a function, like [CONTINUE] or [END DIALOGUE]
__
Then to each node there cna be condtions and actiosn attched. This allows to skip nodes higher in the tree untill their condtions are actually met.
__
Color seems to indicate the speaker?
__
When are nodes actually parallel choices?
__
That's what I gather from a quick look so far - any furher input is very welcome (must be on my way now..).
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Understanding dialogue nodes

Postby slowdive » Tue Dec 25, 2012 6:20 pm

-IdNumber is a unique number assigned to each node which is used as a unique tag.

-Index and OrderNumber are basically the same thing except that the index is the order of the node in the node List<T> and OrderNumber can be anything and won't actually change the order in the list (unless I use my sort function which will use the OrderNumber to sort the List<T>). They have their uses for the move up and down functions which assigns new OrderNumber values to the nodes and then sorts them based on the OrderNumber values.

-LinkTo is used for jumping from one node to another place in the conversation (very useful and saves you from having multiple copies of the same dialog tree in your conversation). Again, the system is very complicated and still needs work. I need to add lots of notes to myself in the code, because I often forget what I was thinking when I coded certain functions :lol:

The [CONTINUE] is not a keyword, just typed in. The [END DIALOG] automatically shows up when the node is the end of the line.

The only parallel nodes are PC nodes, NPC nodes can only show one and are determined based on the conditionals you assign.

The rest of your observations are correct. dialog starts at the top and checks conditionals to stay at the node or pass down to the next NPC node. You can also have some of the PC nodes only show up as choices based on conditionals (maybe a node only shows up if you have an item, are a certain race or class, pass a skill check, have INT > 13, or run a custom script that returns a TRUE or FALSE based on any kind of check you want) .
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3174
Joined: Wed Nov 21, 2012 11:58 pm

Re: Understanding dialogue nodes

Postby youngneil1 » Tue Dec 25, 2012 6:54 pm

Most helpful explanations, again. It will be much fun using this system, especially as the conditions and actions attachable to each node should allow for quite varied and context sensitive dialogues.

I will probably do some kind of mindmap/visiochart for more complex adventures (i have the feeling it will soon get very complex how different dialogues and quest choiches / progress are related to each other).
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Understanding dialogue nodes

Postby youngneil1 » Mon Dec 31, 2012 4:01 pm

Loving that "Paste as Link" button, will save lots of time. Just as an explanation for those wanting to try it out themselves:

1. Choose and mark the node to which you want your dialogue to jump (destination link).
2. Copy that with the "Copy Node" button.
3. Choose and mark the node from where you want the jump to happen (start link).
4. Press the "Paste as Link" button. Voila - done.

This will insert the destination link as grey text underneath the start link. The beauty here is that the dialogue parser will actually jump to the original destnation link and continue the conversation from there on. Practical advantage is that you can jump in your conversation and don't have to retype old passsages again and again.
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Understanding dialogue nodes

Postby kamal » Mon Dec 31, 2012 9:43 pm

This sounds similar to the nwn2 dialog editor, which slowdive is familiar with. The nwn2 dialog editor is pretty flexible.
kamal
Backer
Backer
 
Posts: 10
Joined: Thu Nov 22, 2012 8:20 pm

Re: Understanding dialogue nodes

Postby slowdive » Tue Jan 01, 2013 5:05 am

User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3174
Joined: Wed Nov 21, 2012 11:58 pm

Re: Understanding dialogue nodes

Postby Dorateen » Mon Apr 29, 2013 3:07 pm

I'm going to bump this thread with regard to conversations in the Alpha3 version.

Something simple that has been eluding me so far. What is the proper method to select the root NPC node at the beginning of the conversation to fire only once? Thus, the next time the conversation is triggered, it will start with the fall-through NPC node.

I take it there is a ga script that might have to be included on the PC nodes, that will prevent the line from being used again?

In Alpha2, I noticed that the first NPC line had a conditional set to true if the NPC was already talked to. But I'm not sure that would be the case for how conversations are working now.
User avatar
Dorateen
Backer
Backer
 
Posts: 1002
Joined: Mon Nov 26, 2012 2:08 pm

Re: Understanding dialogue nodes

Postby youngneil1 » Mon Apr 29, 2013 4:49 pm

I am using the scripts gcCheckGlobalInt.cs and gaSetGlobalInt.cs for controlling the flow of a conversation:

gcCheckGlobalInt.cs looks for a certain variable set to a value, while gaSetGlobalInt.cs sets a certain variable to a value.

Usually I place conversation branches that shall only happen after certain conditions are met (gcCheckGlobalInt.cs for a certain variable for a certain value) at the top. The parser (usually going from top downwards: paste as link as exemption) will hit them first, but ignore them because their conditions are not met. Rather down below it will finally find a non-condtional beginning of the conversation, perhaps with several choices. Some of these choices will use the action gaSetGlobalInt.cs to set variables that are required for the higher branches in the conversation tree. So next time the conversation is triggered, the parser will stop at a higher level branch and the conversation will take a different flow (perhaps the base level from the first time triggered will never be reached again).

Also using "not" in conditions (combined with gcCheckGlobalInt.cs ) or "!" (as parameter in gcCheckGlobalInt.cs for equals not) will allow the start conversation elements to be at the top of the tree structure and to start them only once, being skipped next time, because you set the value checked for in the not-conditions in a choice further down below to the value checked against.
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Understanding dialogue nodes

Postby Dorateen » Tue Apr 30, 2013 1:17 am

Once again, I thank you, youngneil1. Your write-up was very helpful in understanding how the ga set global and gc check global int scripts work. It kind of reminds me of the way journal entries worked in NWN2 conversations (which is why I never bothered with global ints). In this case, the variable is like the tag of the journal entry, and the int would be the ID number. I'm not sure if that's completely analogous, but that's how I am looking at it.

I just want to post the last bit that stumped me before it all came together, in case it might be helpful to other builders.

When running the gcCheckGlobalInt on the conditional of the top NPC node, there are 3 parameters to be passed. Parm 1 is for the variable, and Parm 2 is for the compare type, whether the variable is equal to, less or greater than, or not equal to. In this case, a simple = sufficed. Then Parm 3 is for the Int number itself. It was the middle part I had missed previously.

So now I feel I have everything equipped to finish work on the demo conversations and encounters.

Although I do want to add a new class, and maybe some new items, but that will be a whole nother bag of tricks...
User avatar
Dorateen
Backer
Backer
 
Posts: 1002
Joined: Mon Nov 26, 2012 2:08 pm


Return to General Toolset Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron