Conversations

Information about conversations.

Tutorials

There are a lot of good tutorials out there on basic conversation creation. Here are just a few that I've found useful that deal explicitly with tutorials.

Also be sure to check out the conversation sections in the more general tutorials listed in the Getting Started section of this site.

Machinations: Conversation Tutorial

BetterThanLife over at Machinations.org has posted a tutorial on conversations. This tutorial teaches you how to implement conversations, and then goes into some of the more advanced details of creating different types of dialog conversations. The included module, gives three distinctly different examples. An explanation of the use of 'static cameras' is also given and shows how they aren't as 'static' as many think.

Download the zip file with a pdf and example module here: http://www.machinations.org/NeverwinterNights2/ConversationTutorial.zip

(Thanks to Usheen for pointing out the new, working link.)  

NWN2Toolset: Conversation Tutorial

NWN2 Toolset has a great section on conversations.

You can find it here:
http://www.nwn2toolset.dayjo.org/ToolsetTuts/conversations.html

Cutscenes

Cutscenes in NWN2 generally happen through a combination of conversations, conversation switches, and camera control. I'll try to expand this more later, but here is a general procedure:

  1. Create your area, creatures, effects, etc.
  2. Create your conversation. Check with the other guides and tutorials listed on this site for more information about how to create a conversation. The one key thing to remember is that every conversation node is basically a camera shot.
  3. Set up your OnClientEnter cutscene script for the area, remembering to attach it to the area. You can make the speaker either the main NPC who will be doing the talking, or create an Ipoint to act as the speaker.
  4. Next place your static cameras. Check out this page on camera control for more information.
  5. Finally, bring it all together with a conversation switch script that you can reference on each node to control the action.

Cutscenes, multiplayer and OnClientEnter

Kid Gloves asked a great question on the official forums about cutscenes and multiplayer. Nimdolf gave this answer:

Well after playing the OC with my friend online, it works like this. Whoever triggers the cutscene gets to control it, pick what to say, etc. and all of the other players see the cutscene also and what choices you choose. If you join the game midway through a cutscene however you must wait until it is over to do anything.

Check out the thread:
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=521668&forum=1...

jackyo123: Cutscene Tutorial

jackyo123 posted a cutscene tutorial here:
http://nwvault.ign.com/View.php?view=NWN2Tutorials.Detail&id=65

This tutorial document (in rtf format, for those who hate MS-Word) and associated .MOD file walk a basic toolset user through their first cutscene, with animations, movement, etc.

It explains:

- Triggering cutscenes
- Setting up cutscenes that the Player isn't part of (NPC to NPC)
- Camera controls
- Animations
- Basic use of included scripts
- Some snags that you can avoid, that are associated with Cutscene creation

There is *no* scripting in this tutorial, and no scripting knowledge is required. But you should have a basic familiarity with the Toolset.

 

nwn2toolset: How to make cutscenes

NWN2 Toolset has this tutorial, which might help those trying to figure out cutscenes: How to make cut scenes by Montgomery Markland of Rogue Dao Studios.

An overview of setting up a cinematic-style cutscene conversation

What you will need:

1) A conversation
2) A blocking script
3) A way to begin your cutscene (either a speak trigger, an on_client_enter script or something else)
4) Plus the area, npcs etc., etc., etc.

Check it out here:
http://www.nwn2toolset.dayjo.org/ToolsetTuts/blueprints/staticcams/cutscenes.html

FRW: Conversation Tips by David Gaider

Some time ago, Papermonk posted some tips about conversations from David Gaider. I recently ran across it and thought it might be good to revisit. Here's a quote from his intro:

I assume most of you know who that is - if not, he's one of the big design boys at Bioware and had his hand in BG2 a LOT, among other things.

Mr. Gaider joined CODI briefly (before being pulled back to insane grinds at BW) but before he left he really helped us figure a few things out.

Rylock's Conversation Tips

1) If you have a large character to write, TEMP dialogue is your friend.

Don't worry about getting caught up in the details right at the beginning. You'll get bogged down with how something is said rather than just getting the structure together... which is important when the NPC has a lot to say. Write a single line that covers each starting condition ("This is what I say when you first meet me!") and then write really quick lines afterwards that cover only the basics of what you're trying to get across. You can go back afterwards and flesh the lines out and add "flavour" routes in the dialogue later.

2) Write comments.

Even if you're doing the scripting yourself, write comments... write comments whenever scripting is needed, either for a starting condition, somebody's supposed to perform an action, a variable should get set here and so forth. You will thank yourself later.

3) Don't repeat yourself unless you have to.

Too many times we get newbie writers here who will have dialogue where the same information comes up numerous times... and they'll write that information up each separate time. A little differently, to be sure, but it's the same info.

Don't do this to yourself. And don't delude yourself into thinking this makes better dialogue. Always recycle whatever you've already written if it's at all possible. One of the most common ways this is done:

"You want to ask me something, you go right ahead."
1 - PC question #1.
2 - PC question #2.
3 - PC question #3.
4 - I don't have any more questions.

After each question is answered, you loop back to the first line (the "You want to ask me..." or even a new line like "You want to know something else?" that has the same response links). Only when the PC is done with his questions and picks #4 will you then go back to the rest of the information the NPC has.

Recycling sub-menus like this will make your structure much, much simpler to understand (especially for you) than trying to have each separate question flow into everything else the NPC might have to say or do. If you do that, I guarantee you will run into situations where the player wanted to ask something else but the question is no longer available to him.

4) Don't use more Starting Conditions than you have to.

Now, this can be taken in one of two ways. While it can be good writing to have multiple starting conditions when the NPC is clicked on (he says something different based on updated circumstances and so forth), a good rule of thumb would be to include everything that the character needs in a single sub-menu as often as possible.

What do I mean? Another example:

"Greetings once again, <FirstName>. Missed something the last time we spoke, didja?"
1 - Do you know your way around this area?
2 - You mentioned that you lived in the building next door...
3 - I was told the building next door is brand new. Are you lying to me?
4 - You come to this bar often?
5 - What do you know about the other patrons here?
6 - So what's there to do for kicks around here?
7 - Want to play some cards, old-timer?
8 - I got that money that Traul owed you.
9 - I should go.

Now... obviously the player's not going to see all of these PC responses at the same time. You can look at that list and see clearly that some of these responses require some foreknowledge that the PC may or may not have. So you add Starting Condition scripts to them all.

1 - No script. It's always available. During the answer the NPC mentioned he lived in the building next door... set a variable on the PC to indicate that info is known.
2 - Only shows if the variable mentioned in #1 has been set.
3 - Only shows if the variable mentioned in #1 has been set AND another variable indicating the PC has spoken to someone else about the new building is also set.
4 - In this one the NPC will mention that yes, he has been coming here a while. Set another variable on the PC. #4 no longer shows once that variable has been set.
5 - Only shows if the variable mentioned in #4 has been set (or if you figure it's a generic enough question, scratch the variable and both 4 and 5 can always show). In the dialogue resulting from this, the NPC could mention that Traul owes him money and he hasn't been able to collect... whether or not the PC agrees to get the money, set a variable on him (he should at least know about it and be able to ask Traul).
6 - In this one the NPC mentions he likes to play cards and challenges the PC to a game. Set another variable on the PC. #6 no longer shows when this is set.
7 - Only shows when the variable in #6 is set. Goes directly to a game of cards.
8 - Only shows if the PC was able to collect money from Traul (after the variable was set in #5).
9 - Always shows.

...and so on. The benefit for doing all this? At the end of every section of dialogue for the NPC (and keep in mind each of these could go into its own sub-menu with separate questions and routes) you do not have to sit around and weigh exactly which PC responses apply in that situation. Link to them ALL and the dialogue will both sort itself out and flow naturally... and save you a lot of time.

5) Make sure the goods are readily available.

What do I mean by that? Simple... don't bury a good piece of writing somewhere where nobody will ever find it. Unless you intend for something to be an Easter Egg, don't give your NPC's specialized dialogue that will only show up once in a blue moon. If you want to add it later, then fine... but finish the damn thing first or you never will.

6) You can always add more later.

Yes, we are all perfectionists. We want the dialogue to include everything possible the very first time through. Well, suck it up, sister, because that isn't going to happen. Don't over-plan the dialogue... get in what you need, first, and add more stuff in later. And keep in mind not every NPC needs to know or tell everything imagineable.

Here are two additional points by Sethai:

7) Limit your text.

I don't know how it will work in nwn2, but in nwn it is best to limit your text to about 2.5 lines, so each section of dialogue never comes past the npc's portrait. Overflow into another node if need be. Huge blocks of text just look unproffessional and discourage the player from reading them. I try to follow the OC conventions, because it makes the game more immersive when you're not distracted by the little things.

8) Most obvious responses first

When, ordering your responses, try and put the most expected, non consequential response first (stuff like "continue" or "could I ask some questions?"); you don't want people to be 1ing through, and accidentally attack the quest giver. Put your "Goodbye" option at the bottom of the list so people know where to find it.

Here's the original post on the FRW forums:
http://nwcitadel.com/forums/showthread.php?t=227

 

Multiplayer and NWN1 vs NWN2 style

sgt_why asked a great question about writing conversations that are multiplayer friendly. Check it out for yourself here:

http://nwcitadel.forgottenrealmsweave.org/showthread.php?t=1175

A decent amount of this comes down to the options on a conversation. Open a conversation and check the options window and you'll see several items of interest. The mains ones here are Multiplayer Cutscene and NWN1 style.

Here is a response that I wrote up for that thread and decided to repost here: 

The multi-player flag got a bad wrap because it was over used in the OC. If you don't have it set to multi-player, you should have it set to use the NWN1 style of conversation. A good rule of thumb seems to be:

  • If it's a cut scene where you want everyone to stay in place because people are moving around and there's a lot of scripting (or just because it's an important plot point and you want everyone to pay attention), use NWN2 style and make it a multi-player conversation.
  • If it's a standard dialog where you don't have scripting and don't need to "pause the game", leave multi-player set to false and use the NWN1 style.

Here is a good description by Nimdolf a while back on how multiplayer works in the OC:

"Well after playing the OC with my friend online, it works like this. Whoever triggers the cutscene gets to control it, pick what to say, etc. and all of the other players see the cutscene also and what choices you choose. If you join the game midway through a cutscene however you must wait until it is over to do anything."

Again, that is with the options set to NWN2 style and multi-player. If you don't have multi-player set to TRUE, they are not involved, but I think they are stuck in limbo. If you have the style set to NWN1 and multi-player set to FALSE, players can run around and talk to whomever they want.

Another point is to watch your conversation triggers. All too often you end up with rogues and rangers doing the talking because they are scouting ahead and there is no way to "hand off" the conversation. Usually this is fine. In important conversations where a party might elect a different PC to do the talking, however, let them start it on their terms and you'll take care of a lot of this.

 

The Journal

Here are some things to note about the journal:

1. If you are using campaign, you have to use a campaign journal. The module-level journal will not work.

2. You can either update the journal using the script ga_journal, or you can use the "Quest" field on the "Node" tab to browse and find your journal entry.

3. The players will not automatically get the XP defined in the Journal when they hit an endpoint. You have to manually award the XP by attaching the script ga_give_quest_xp to that dialog node.

 

Camera Control

Tips and tricks for controlling the camera during conversations.

Here is BetterThanLife's section on the camera from his tutorial on machinations.org:

Static cameras are basically cameras that you can place directly into the game
world and position like any other object. If you press the ‘Preview’ tab next to the
properties tab, you will get a rendering of what the camera is seeing, then you
can move it around to carefully position much like a director. You then use static
cameras by attaching them to lines in conversation dialog through the use of the
Node tab as explained in the previous section. You need to give your static
camera a tag name and then link it to the Node. From there you have the ability
to make the camera stationary (default), pan or track. While a static camera
might sound like it doesn’t move, if you use pan or track, it will either always face
the target (pan) or move along with the target (follow). Obviously in order for this
to have any use, the target would need to be moving. This is where the Action
tab comes into play. You might have a script that makes the actors walk as they
are talking, and have static cameras positioned about, following their movement,
so as to create a cut scene. (The camera’s target will be whoever the speaker of
the dialog line is). You can even choose the shot angle of the static cameras,
though I haven’t experimented with it, the names should be obvious as to what
they will do.

You may also want to check out this page concerning the conversation switch script template and how it works with camera control.

Static Camera Orientation

UPDATE: Patch 1.07 and MotB changed the way you interact with the camera. Now you just hold down the right mouse button and you can control both turn the camera and control the pitch. 

Kephisto posted a great set of instructions in the Toolset forum concerning the camera:

Holding down the control and shift keys then right dragging should roll the camera while holding down alt and shift with right clicking will pitch the static camera up and down.

You can rotate it towards the left and right like other objects as well. To raise and lower it hold down the alt button while moving them. All together you can put it in just about any position and angle you want.

If there are any problems it could be, just guessing, that your keyboard shift and alt and control keys may have a different configuration, but in general play around with those three keys when the static camera is selected and you'll discover a feel for it.

In case you may be wondering, I've already placed many static cameras behind NPCs, across treetops and roofs, angled upwards from the ground, and even upside down viewing a monster.

When you're ready to have even more fun, Inder, right click on the static camera and select properties in new window - which, believe it or not, will bring up another properties window of which you can select view and actually see exactly what the camera does, in real time.

From there it is a matter of selecting a line of a conversation and selecting that static camera. Overall, I hope you enjoy using them.

And further down:

Each line in a conversation, whether spoken by the player or the NPC, has its own properties. For example, please highlight any line in a conversation and look at the bottom left, which should have the four tabs : Conditions, Actions, Node, Animations.

While you have a line in your conversation highlighted (selected) please click on the bottom tab named Node. In the Node panel that comes up in the bottom left should be a wondrous amount of options, divided into three main categories : Behavior, Camera Settings, and Line. Click the left (plus) sign of the Camera Settings category.

Now you should see many options for the Camera Settings, for that one specific line of conversation alone. You are now able to set if you want the camera settings to be random or want the Movement Type to be None, Pan, or Track, or even if you want that line of conversation to use any of your Static Cameras or even if you want the visual shot to be a Close Up, Walk-by, Medium, Over the Shoulder, or even more.

Even without using a static camera, just about all the above options (and more) are still available. So if you want to have a specific part of a conversation have a certain look to it, you can merely select a specific option and leave it at that.

When using Static Cameras all that is needed is to place the desired static camera’s tag in the Static Camera field, which is listed in the Camera Settings of the Node panel. There is probably a better way to say all this but I hope at least this information helps.

And a follow-up by LysanderReturns:

Perfect summation Kephisto. Just to add one last step, you need to set the mode field on the node to "static camera" if you want to use a static cam or "user defined" if you want to choose one of the preset cams (like worms eye or walk by or whatnot).

Check it out: http://nwn2forums.bioware.com/forums/viewtopic.html?topic=514512&forum=1...

The invisible cameraman

You can use an invisible cameraman to control where the camera is facing and make the static cameras pan and track to follow the action.

Creating your cameraman

First create your invisible cameraman. Go to blueprints > creatures > special to find the "Attach Spell Node" creature. Place him in the area and give him the following attributes:

  1. First create your invisible cameraman. Go to blueprints > creatures > special to find the "Attach Spell Node" creature. Right click and choose "Copy Blueprint" > "Module" to create a module level blueprint.
  2. Change the new creature blueprint's identification fields to "c_cameraman." The full list would be:
    • Comment: {c_cameraman}
    • Template Resref: c_cameraman
    • Resource Name: c_cameraman
    • Localized Description: leave blank
    • Tag: c_cameraman
    • First Name: {c_cameraman}
  3. Make the creature a plot element by changing "Plot" to "True." This is just in case he gets stuck in a fireball or something, so that he won't start attacking the party.
  4. Place the creature in the area. (You can also spawn him in later via a script using CreateObject(). This would also allow you to change his tag.)
  5. Give the placed creature object a unique tag. If you are following campaign naming conventions, this might be in the form of "c_" + area_id + "_cameraman". If you have serveral cameramen in one place, consider using and "A," "B," or "C" at the end.
  6. Consider giving the placed creature object a name in brackets so you can easily find him in the toolset. You may want to use the tag as the localize name so it is easy to locate him in the creature list.

Using your cameraman in a conversation

Now you can select the cameraman via GetObjectByTag() in a conversation switch. This will allow you to move him around using AssignCommand() calls.

Place a static camera in the area and give it a unique tag. To get the camera to follow him we will use the Node tab on the conversation nodes. To do this open your conversation and go to the node you want perform a moving camera effect on. Follow these steps:

  1. Under the camera settings expandable field, click in the "StaticCamera" field to get a dropdown. Use this to find your camera and choose it. You can also just paste in the tag for your camera.
  2. Set the "Mode" field to "Static Camera"
  3. Go down under the "Line" section and set the speaker to be the tag of your cameraman. Note that this is the tag of your placed creature object, not your blueprint.
  4. Finally, go back up under the "StaticCamera" section and we will set the "MovementType." There are three types to choose from.
    • None - The camera will not focus on the speaker for the duration of the conversation node, but will alsi not move. Good to use if you want an establishing shot that doesn't focus on the speaker.
    • Pan - The camera will swivel left or right to follow the speaker. It will also pitch up and down. This is a nice way to follow the action from a static point. You should note, however, that the camera will level out to the horizon when you choose this, meaning that any custom orientation you gave the camera when you placed it (such as having the camera on an angle) will be lost.
    • Track - The camera will change position to follow the creature. Custom orientations seem to be kept with this option, but I have not played with this one as much. I'll follow up once I have more information.

References

Thanks to Deist who suggested the use of the Attach Spell Node creature. Originally I was trying to use the ScriptHidden flag, but found that the camera does not follow the creature if this is on.

Check out the full thread:
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=535548&forum=1...

Panning the camera to the sky

Here's a threat talking about how to pan the camera up towards the sky:

http://nwn2forums.bioware.com/forums/viewtopic.html?topic=535097&forum=1...