Difference between revisions of "How do you set up a scripted conversation between two or more NPCs?"

imported>Vagrant0
imported>Vagrant0
 
Line 111: Line 111:


Similar to above, but a bit less complicated, another way to approach this is to first setup the quest script with just a variable defined. For our purposes, we'll just use the variable (short) ''nuline''. Save that script, and attach it to your quest. Then have all your dialogues created in the order you want them spoken, setting up a condition of who you want to speak them, and adding a condition using the quest variable ''nuline''. Using that variable, make every new dialogue assigned to a new value of this variable eg. first dialogue uses a value of 1, second dialogue uses a value of 2, and so on. Now, you have a clean list of all the dialogues, in order.
Similar to above, but a bit less complicated, another way to approach this is to first setup the quest script with just a variable defined. For our purposes, we'll just use the variable (short) ''nuline''. Save that script, and attach it to your quest. Then have all your dialogues created in the order you want them spoken, setting up a condition of who you want to speak them, and adding a condition using the quest variable ''nuline''. Using that variable, make every new dialogue assigned to a new value of this variable eg. first dialogue uses a value of 1, second dialogue uses a value of 2, and so on. Now, you have a clean list of all the dialogues, in order.
(By creating them in the order they are to be spoken, you can then sort the list of dialogues by form ID to keep them viewed in that order. It also makes it easier, later when you have to figure out what sound files go with what dialogues since they will be sequential)
(By creating them in the order they are to be spoken, you can keep them viewed in that order. It also makes it easier, when you have to figure out what sound files go with what dialogues since they will be sequential)


The way that this method differs from what is mentioned above is that most of the nuts and bolts is in the result script of each dialogue, allowing for finer tuning, and less clutter in the quest script.
The way that this method differs from what is mentioned above is that most of the nuts and bolts is in the result script of each dialogue, allowing for finer tuning, and less clutter in the quest script.
Line 141: Line 141:
'''set <quest>.convTimer to <duration of sound file +/- a few seconds>'''
'''set <quest>.convTimer to <duration of sound file +/- a few seconds>'''


The first line is there to help the dialogue proceed to the next line after it has been spoken. The second line is there to further refine the timing between this dialogue and the next, and allowing for momentary pauses. Until you have sound files created or generated, you can just use an estimate as to how long you think that line will be spoken for. You can always adjust this later.
The first line is there to help the dialogue proceed to the next line after it has been spoken. The second line is there to further refine the timing between this dialogue and the next, and allowing for momentary pauses. Until you have sound files created or generated, you can just use an estimate as to how long you think that line will be spoken for. You can always adjust this later, in some cases, it may be gotten rid of all together if the pause seems to take too long.


(the ''convtimer'' part within the quest script is still needed to prevent the same line being looped in certain circumstances)
(the ''convtimer'' part within the quest script is still needed to prevent the same line being looped in certain circumstances)
Anonymous user