Silgrad Tower from the Ashes

Full Version: Dialogue Tutorial
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Right guys,

This is an instructions thread on how to do dialogue.

Please note that dialogue is NOT compulsory. It is entirely optional in each and every claim you make which involves creating an NPC. I create dialogue every time, and this is to help those of you who fancy having a go but don't know how - to learn.

To start off with, you need to open the quests window. To do this you go to the drop downs at the top of the CS and click on "Character", then scroll down to quests. Quests play an essential role in everything that an NPC does and says.
You don't go to the "Edit Base" option on the NPC and click "Dialogue". That only allows you to view the dialogue that the NPC says in given quests, hence you need to create a new quest.

Next, you go to the list of quests at the left hand side of the quest window and right-click on the list and select "New". You will then be asked to type in the quest ID. Type in BMXX------Dialogue (XX being your modder's abbreviation and ------ is what interior you're making) You can shorten Dialogue to Dial.
For example, for my Stormhold Tradehouse, I put BMJKStormholdTradehouseDialogue.
NOTE: You can use the same quest for all the NPCs in your claim

So, now that the ID is sorted, you next have to sort out the Quest Data, so make sure that you're on the Quest Data tab - it should be the default tab. The name is straightforward, and in this context isn't needed, but just put -------- Dialogue (so, using the same example as before, I would name it Stormhold Tradehouse Dialogue). Set the priority to 6, and leave the Script as "NONE", you don't need a script for this. Then you right-click on the Quest Conditions and create a new condition. Highlight the condition and open the condition function list and scroll down to "Get Is Playable Race". Select it and set the Comparison to == and set the value to 1.

That's the quest data sorted. :check:

Now you can ignore every other tab, except for Topics, which is where you're going to create the dialogue.

Now this is where it gets a little more complicated, but follow the instructions and it should be fine.
Firstly, you need a greeting, ie something that the NPC says when you talk to them. Examples in Oblivion are "Well met" and "What can I do for you?". Right-click in the Topic list to the left, which should be empty (see screenshot) and select "Add Topic". Scroll down to GREETING (note the capital letters - this is a scripted Topic by Bethesda that makes it what the character says to you straightaway). Don't alter the Topic Text, but right-click in the big info list below it and select new.

A window will pop up. This is the response that the NPC will give when you talk to them, so you can just type in "Well met", or you can make it an introduction if you want to do a more advanced dialogue, such as "Hello, I don't believe I've met you before, I'm *NPC Name*." If you can't fit everything you want in the available space, then type what you can, and you can continue it by right-clicking in the Response Details and selecting New (DON'T CREATE ANOTHER RESPONSE, JUST ADD TO THE EXISTING ONE - see screenshot) and then adding more dialogue.

Next, we need to create conditions. Conditions are essential to dialogue, because if there were no conditions, then every NPC would say every other NPC's dialogue.
Firstly, right-click on the Conditions list (which, again, should be empty) and scroll to GetIsID. Then click on the Function Parameters and a window will pop up. Scroll down to the ID of your NPC and select it. Make sure the Comparison is set to == and the Value is set to 1.

Now, only that NPC will say your greeting. If you made an introduction instead of a generic "Hello", then add the condition GetTalkedToPC, set Comparison to == and the Value to 0. This will make the NPC say this to you only if you haven't talked to them before. Now you can add a generic greeting (such as "Hello", just like before but as a DIFFERENT response and use the same Conditions (you can right click on the conditions and select Copy All Conditions and Paste them into the new response) and set the GetTalkedToPC Value to 1, so they will say the generic greeting every time you talk to them, as long as you've already talked to them.

Now, every dialogue should be interesting and contain info about the city or town where they live and other topics if you want to add them. So you can create a new Topic in the list where you added GREETING, and when you're on the Select Topic window, you can right-click in the list and select New and enter the ID of your new Topic, for example in Stormhold I use BMJKStormholdTopic.

Everything is the same now, except for the Topic Text at the top, which will be the ID of your Topic. Change it, because that is what your character will say when talking to the NPC. For example, I changed the Topic Text from BMJKStormholdTopic to Stormhold. Now you can add the Response(s), Conditions etc. which I taught you how to do before.

The only thing now is linking the Topics together. Currently there's nothing that links your GREETING to your Topic. Never right-click in the Add Topics at the right hand side, because that causes merging problems and bugs, so instead you go to the Result Script in the GREETING Topic and type in Player.AddTopic *Your Topic's ID* and click on Compile (If it says something along the lines of Syntax Error, then you typed it in wrong - make sure you leave the space between addtopic and your topic's ID. Capitals don't matter). Now when your NPC greets you, you will be able to ask them about your Topic.

Test it in-game. It should work fine. :goodjob:

If it doesn't, take a look at my Dialogue Quests in the latest version of the .esm for examples, or PM me and I'll help you sort it out.
Great work, JK. This is very valuable. =)
I agree this is very useful information. There is just one thing I would like to point out.

Quote:Originally posted by jucklesjenk
...When you're creating your own private mod, you would right-click in the Add Topics at the right hand side, but that causes merging problems, so you go to the Result Script in the GREETING Topic and type in Player.AddTopic *Your Topic's ID* and click on Compile...
Even if you are creating you own mod, you shouldn't use the Add Topics box because it is buggy. How the bug works exactly is that if your mod uses the Add Topic box on it's GREETING topic, any later loading mod which also modifies the GREETING topic will break the Add Topic box of your mod's greetings.

This could be fixed by loading your mod after every other mod which adds Greetings but then if there are two mods which use the Add Topic box in their Greetings, only one will be able to add their topics, no matter what the load order is. It's better to avoid this problem to begin with.

So basically, one must ALWAYS use the result script box to add topics (and fllowing on from that, one should NEVER use the Add Topic box). I had a link to this piece of information. I will try find it and then post it here.

EDIT: Here is the link to the information I mentioned:
http://cs.elderscrolls.com/constwiki/ind...dTopic_Bug
Thanks, XJ! :goodjob:
Thanks, guys.

The original post has been updated :check: