Glitter’s BG Mod Making Mod-along, Part III

Time for dialogue! We’ll be writing dialogue for our quest-giving character, Tannia!

Alas, it is that time of modding. I’m always intimidated by writing dialogue, to be honest with you, which is why I usually do it last.

My Writing Process

I usually go through and outline/summarise all the dialogue first, and then go back a few times to add detail.

Pass 1: Summary

Tannia, in the Council of Six building in the Government District of Athkatla. If the PC talks to her, she’ll say that she’s looking for a friend who was taken by the Cowled Wizards–but the Wizards say that they didn’t take him.

The Player might notice something odd–the Wizards admit to taking Imoen and Irenicus, after all. Denying they took someone is out of character for them.

The PC can ask for more information, or just say “sucks to suck, lolbye”.

If asked, Tannia will say that her friend is a spellcaster prone to “accidents”. She won’t ever confess that he’s a wild mage. She’ll say that he was last seen in Trademeet, but mysteriously vanished. Please, won’t you look for him?

After the PC accepts the quest, if talked to again, Tannia will ask the PC to go to Trademeet. Once her friend is found, Tannia will reward the PC and leave the map.

If the PC refuses the quest initially and then talks to Tannia again, she’ll have the same conversation as the first time around. Note that there is a variable called NumTimesTalkedTo(X), where X is the number of times that the NPC has been talked to. If we wanted, we could write another dialogue for the second time the PC talks to Tannia after rejecting her quest, the third time, fourth time, etc, but I’m not going to do that because I don’t want to. But with this variable, you could make a reverse-Noober NPC, where you pester him to see all his dialogue options.

Anyway.

Pass 2: Actual Dialogue

Alright, now I’ve fleshed out the dialogue and written the words that Tannia says and various responses for the PC. This is how I format my dialogue trees in Word, but you do whatever makes sense to you:

Obviously, there’s more than just this page, but you get the idea. Sometimes I’ll make another few passes to polish/improve the dialogue, but this is a little quest mod and I think this dialogue is fine for our purposes.

Implementing the Dialogue

The game reads dialogue from dlg files, which are, in turn, made from .d files. There’s a whole bunch of different ways to format .d files, but I’m only going to show you how I do it, which I learned from the mod The Gorgon’s Eye. If you want to see other ways of formatting dialogue, go ahead and open different quest mods’ files and see what’s there.

Anyway, we’re gonna open Notepad and make our dialogue file.

All dialogue files begin with, well, the BEGIN command, and then the dialogue file’s name. I’m calling my dialogue d_ggNMQG. the d_ is for dialogue, gg is for Glittergear, N is for Gone Nuts, and MQG is for Main Quest Giver (aka Tannia). Again, you do whatever naming conventions you want.

This is what a dialogue file looks at it’s most absolute basic (taken from my Fowl Wish mod):

I think I forgot to mention comments until now. A “comment” is something that the computer ignores when reading files. Comments are useful because you can make little notes to yourself. COMMENT YOUR SHIT. Your future self will thank you. Start comments with //.

Anyway, here we have the BEGIN command and the name. If True() (which the answer is always yes), then we begin the line of dialogue that the Nobleman says, and then we exit the conversation. The end. This Nobleman will always say that one line of dialogue, no matter what. You’ll notice in my dialogue files, I use ~ ~ as my quotation marks. Some people use /* *\, but~ ~ is faster and easier to type. So that’s what I use.

Anyway, let’s start Tannia’s dialogue file. After much copy/pasting, this is a screenshot of what I’ve got:

You’ll see me use a global variable in the second text line–GGNMQ. This is the variable that I’m going to use to track the PC’s progress through the quest. Right now, the variable is at 0 because the quest hasn’t begun yet.

You’ll also see a lot of ++. The ++ signifies a player’s dialogue choice. You can include paramaters here, so that a particular dialogue option only shows up at certain times. For example, here’s a dialogue option from A Fowl Wish that only shows up when the party has more than 1999 gold:

You can have all kinds of different criteria and combinations–class, race, alignment, reputation, etc etc. But this is a simple mod, so we aren’t going to bother with that right now.

You’ll also see a lot of GOTO 3 or GOTO 1B and etc etc. This tells the game where to jump to in the dialogue file for the next part of the conversation.

There’s also something that happens should the PC decide to accept the quest:

We’ve got two commands to note here– SetGlobal and EXIT. SetGlobal will advance our quest tracker integer, and EXIT ends the conversation. Again, there’s a lot of other DO commands, like giving XP, taking items, leaving areas, etc etc. We’ll get to all that later.

But anyway, now we have Tannia’s quest-giving conversation done. I gave her a quick little line to say for the period of time between (1) accepting the quest and (2) solving the mystery. I also decided that our missing mage/polymorphed squirrel’s name is Estelin. Seemed like an ok name to me. Anyway, here it is:

This dialogue will only fire when GGNMQ is 1, but GGNMQ will only be 1 after the quest has been accepted and before the mystery is solved.

You might notice that I started with BEGIN 10 instead of some other number–I believe we were on 4 above? Anyway, the number is arbritary, but I like to increase the number by 10 at every quest stage. It’s a habit I picked up in Morrowind modding–giving yourself lots of “space” between stages makes it easier to go back and add stuff in later. But you do you, as always.

Getting the Dialogue in-game

This will be very similar to our .baf scripts.

  1. Make a new folder in the GoneNuts directory called dialogues
  2. Name your dialogue and add a .d at the end of it
  3. MAKE SURE “ALL FILE TYPES” IS SELECTED
  4. Profit.

Here’s a screenshot:

Aaaand here’s our dialogue file, all nice and happy in its folder:

Next, just like the .baf files, we have to load this into the game via our GoneNuts.tp2 file. So we’re going to go open that up and add the line:

COMPILE ~GoneNuts/Dialogues/d_ggNMQG.d~

You can put it wherever. I like to have all my scripts up top, then my dialogue, then my creatures, then my items, then whatever else. Just a preference of mine, but the order doesn’t matter (at least, not for something like this so far as I know).

Now our tp2 file looks like this:

Now do the ol’ uninstall/reinstall thing. If you have any errors, you may have made I typo. I got a warning notification because I had a GOTO 2 in the .d file, but no actual 2 for the computer to go to. So I went back and added that.

Anyway, once that installs, we’re going to open NearInfinity and find Tannia. We’re going to go to the Edit tab, find the dialogue row, and update to our shiny new dlg file, like so:

Save Tannia, and exit NI.

Next, go into your override folder and find her via her unique cre ID (GGNMQG.cre). Copy/paste this into your GoneNuts/creatures folder and overwrite the old Tannia. I don’t know why this is necessary, but it is. If you don’t do this, your NPC will not have the new dialogue in-game.

Now w uninstall the mod, and then reinstall the mod. Let’s talk to Tannia:

Yay!! It’s working!

Be sure to test every dialogue option, just in case you made an error somewhere.

But congrats! You can make an NPC, edit them, place them, and give them dialogue!

[Back to the Table of Contents]

One thought on “Glitter’s BG Mod Making Mod-along, Part III

Leave a comment

Design a site like this with WordPress.com
Get started