How to make province-specific dialogues

All tutorials and guides related to TES III: Morrowind modding
Post Reply
User avatar
Le Grimacier
PT Modder
Posts: 10
Joined: Sun Jan 11, 2015 6:25 pm

How to make province-specific dialogues

Post by Le Grimacier »

When you create a NPC for a province mod, you will be confronted to generic topics. Unfortunately, you'll find a lot of references to the province of Morrowind, like local rumors, names of daedrics ruins or other NPCs, etc... If you just use the NoLore variable to get rid of them, NPCs from other mods will be able to use your dialogues if the conditions are not very strict. And you are lazy. ;) You don't want to multiply dialogues lines to match every possibility.

When you create a new NPC, add him the little script NameoftheProvinceLore (replace NameoftheProvince with the name of your province. Ex: Elsweyr, Cyrodiil or Skyrim)

Code: Select all

Begin NameoftheProvinceLore
   short NoLore
   short NameoftheProvinceLore
End NameoftheProvinceLore
The NoLore variable will get rid of generic topics and the NameoftheProvinceLore variable give you an easy way to filter yours dialogues.
When you create a new dialogue, add the condition Local NameoftheProvinceLore = 0 and your dialogue will be displayed only for a NPC having the script. So, you could create your own rumors, advices, etc...
This is valid for a generic dialogue. Of course, if the conditions are already specifics (like using the ID or depending of a place), you don't have to use the filter.

For a scripted NPC, just add the two variables at the beginning of the script and he will be able to show your topics too.

User avatar
SGMonkey
Site Admin
Posts: 293
Joined: Thu Dec 25, 2014 1:56 am
Location: Great Britain

Post by SGMonkey »

This sounds like a pretty logical idea. Is anyone using this method? For P:C or SHotN?

Seems like a good way to filter out unrelated chatter. How practical is this?

User avatar
Infragris
Project Administrator
Posts: 1396
Joined: Fri Jan 02, 2015 7:51 pm

Post by Infragris »

Not sure, but SHotN might have. I was planning to apply this for P:C, once NPC claims leave planning stage. It seems a bit unwieldy to attach a script to almost every NPC, but the alternatives are much worse.

User avatar
SGMonkey
Site Admin
Posts: 293
Joined: Thu Dec 25, 2014 1:56 am
Location: Great Britain

Post by SGMonkey »

That's what I was thinking. Applying a script to every single NPC seems like massive overkill.

Isn't it possible to filter by Region? I know it is by cell name. SO you could filter say "Daggerfall" and any cell named with that at the beginning would also be filtered right? Say "Daggerfall, House Name"

Not done dialogue for a long time.

User avatar
TerrifyingDaedricFoe
PT Modder
Posts: 110
Joined: Sun Jan 04, 2015 10:07 pm

Post by TerrifyingDaedricFoe »

You could do that, but unless you named every cell "High Rock, Daggerfall, House Name" you'd have to duplicate every line of dialogue for every region.

I think that's right.

User avatar
SGMonkey
Site Admin
Posts: 293
Joined: Thu Dec 25, 2014 1:56 am
Location: Great Britain

Post by SGMonkey »

Noooo, im not suggesting naming every cell in High Rock "High Rock" that's ridiculous.

Its not possible to filter by region either.

User avatar
TerrifyingDaedricFoe
PT Modder
Posts: 110
Joined: Sun Jan 04, 2015 10:07 pm

Post by TerrifyingDaedricFoe »

SGMonkey wrote:Noooo, im not suggesting naming every cell in High Rock "High Rock" that's ridiculous.
Yeah, I was trying to point out how it might be technically possible but you wouldn't want to do it. I think that method would also have the disadvantage of giving every cell on the map one of those city square thingies.

So yeah, scripting it is. It would be less of a pain if you could give NPCs more than one script. As it is you have to remember to add the lines for province-specific dialogue to any custom script you give an NPC for a quest or whatever.

User avatar
SGMonkey
Site Admin
Posts: 293
Joined: Thu Dec 25, 2014 1:56 am
Location: Great Britain

Post by SGMonkey »

I imagine if every single NPC had a script attached it have an effect on the performance?

User avatar
Infragris
Project Administrator
Posts: 1396
Joined: Fri Jan 02, 2015 7:51 pm

Post by Infragris »

I've been investigating dialogue further and scripting every single npc with a provincelore condition really seems to be the only option. Not only are there a lot of Morrowind-specific topics, we also have to deal with a large set of generic global greetings that won't fit. These would have to be superseded by province-specific versions, and there is no reliable way I know of to limit these new greetings to NPCs in one province. Another thing for the OpenMW wish-list, maybe.

Post Reply

Return to “Tutorials and Guides”