Clean Mods... DIALOGUE!!!

MMRD Site


Free Graphic Programs


My Homepage


JOG

After spending yesterday evening with fixing Dialogue of some Quest plugins that base on Tribunal.ESM v1.4, I really need to write this...

Dialogue is linked by this Hidden "Info ID" numbers:

If you look at a Dialogue Info/Response in TESAME, you see three entries:

INAM = the ID of this Dialogue Line
PNAM = the ID of the previous Line
NNAM = the ID of the next Line.

As long as the dialogue line has a PNAM and NNAM entry, the game looks for those next and previous lines in the current dialogue chain and places the new line somewhere between them. This works fine even if two plugins make a new line of dialogue at the same place. The two new lines will be placed between the old ones without any troubles.

Even when one of the plugins/Masters has a dialogue line with only a NNAM entry, there is no problem, the game puts this line on the very top of the Dialogue-Chain.


What happens when two plugins/masters try to come on top,
is best described by an example:

Original lines:

---(top)
ABC
DEF
XYZ



Plugin 1: (newer file date)

---(top)
1:A
1:B
1:C

ABC
DEF
XYZ



Plugin 2: (older file date)

---(top)
2:A
2:B
2:C

ABC
DEF
XYZ



Resulting Dialogue chain in Game:

---(top)
2:A
2:B

1:A
1:B
1:C

ABC
2:C
DEF
XYZ



The game exchanges the lowest Line of Plugin2 (the older one), with the next original line, And places the other lines on top of the dialogue chain. So there might be problems, if Plugin2 depends upon the "2:C"-line coming before "ABC".


Even worser when both plugins add bottom-lines:


Original lines:
ABC
DEF
XYZ

---(bottom)

Plugin 1: (newer file date)

ABC
DEF
XYZ

1:A
1:B
1:C

---(bottom)

Plugin 2: (older file date)

ABC
DEF
XYZ

2:A
2:B
2:C

---(bottom)

Resulting Dialogue chain in Game:

ABC
DEF

2:C
XYZ
2:A
2:B

1:A
1:B
1:C

---(bottom)

Again the now undefined "lowest" line of Plugin2 is exchanged with the nearest original line to restore a working dialogue-chain, but now the dialogue sequence of plugin 2 is corrupted.


In the beginning we thought it to be more "clean" if we store only one original dialogue line in our plugins, but this proved to be a mistake.
Tribunal did the same as we, and corrupted most of the Dialogue-intensive plugins.

Bloodmoon hasn`t that many new top/bottom lines, and most of us have learned our lesson, so there were almost no conflicts between Bloodmoon and older plugins.



Another common mistake is using the "copy" command to make a new
dialogue line, and then continuing to change/make copies of the
lower line (the original one, with the original Info ID)

---(top)

ABC (the copy of the ABC line with a new ID, but the old text)
2:A
2:B

2:C (id of original ABC, but text was changed)
DEF
XYZ

For a text-oriented human it looks like a clean plugin, but for the game, that only cares about the ID-Numbers, it`s just another plugin that tries to put its own line on the top of the linked-list...


If you followed me till now, you can figure out what happens when you
load this plugin together with another one with top-dialogue:

---(top)
ABC (the New ABC line)
2:A

1:A
1:B
1:C

2:C (Original ABC-Line)
2:B
DEF
XYZ




The dialogue sequence of plugin2 is destroyed, because the original top-line and the next plugin-added line are exchanged, but this time you ( the author of plugin 2) have a hard time to find the bug, because you first need to find out that you changed the original line instead of your new one.


The best advice I can give, is: Always place your new dialogue-lines in the middle of the topic. never use the top or bottom, and avoid the second line, because you easily can confuse the original top-line and the copy. Confusing is no problem as long as your new lines aren`t at the top or bottom of the linked list...


Addition:

Above I wrote that it doesn't matter when you change the text of the original Dialogue-ID as long as you stay away from top/bottom, but this isn't true. As soon as a plugin with a later file-date also contains this ID (no matter if the second plugin has the original text, or changes the original-ID itself) Your dialogue line will be completely removed from the game...

So as a rule: Hands of the top and bottom lines, and when you use "copy" to create new lines always edit the upper line...

BTW: for those that don't know yet: You can see the "Info-ID" I'm talking of, when you maximize the column between "info" and "Disp/Index"

============================================================


EMMA

Aha!

I remember I ran into something like that long ago.

As far as I can remember the Info-ID was connected to the text in the dialog line and would change if the text in the dialog line was altered. .

I was about to release both first version of Witchgirl Adventure and an early version of Girlfriend Breton mod. In both cases, I had put the greetings in section 5. Now, one of the greetings started the same way in both mods, and was the very same for several words.
When I tried to run both mods at the same time, the greeting in the older one never showed up - it was completely overwritten.
Now, if I remember this correctly (it was almost a year ago), I found a solution that worked in this case:When I somewhat changed the text in the older greeting, the "Info-ID"-number also changed, so, as far as I could understand, the "Info-ID" should be related to the exact letters in the dialog-entry.

Now, this problem of course happened mostly because I was the author of both plugins. Probably, no-one else would have started a greeting in exactly the same way as I (as people think in different directions and use different words). So, if my conclusions are OK, a dialog line would only be overwritten by a newer mod if a dialog line in the newer mod starts with exactly the same words.

Now, I definitely don't claim that my conclusions are right (especially as this happened really long ago) but I would love to hear someone elses (JOG!! ) opinion on this.


In this case, with Girlfriend and Witchgirl, I had initially also used a few topics in BOTH mods. This turned out to cause a similar problem: the topic initially wouldn't show up at all in the older mod. But, when I added the topic also by an "AddTopic" command in the dialog result-box, it would show up even if overwritten. However, in the older mod, the topic wouldn't be highlighted in the dialog. So, I of course rewrote all the topic names. But I learnt how vital it is to always use "AddTopic" in the resultbox.

Oh, and if I'm not mistaken, you can also see the Info-ID in the Details list for the mod in TESCS.

======================================================


JOG

Sorry, you're wrong

The Info-Id always stays the same, it isn't dependent on the text contents, or a changed Entry would mess up the dialogue-chain for all other plugins, and a copy of an entry would have the same number.

Example:

Morrowind.esm only, Greeting1, top

Code:
----------------------------------------------------------

[You have failed your Oath of Silence] 204811946427354207051
Who's there? 12152275822093636854
All is silence.... 1588813549227325295
----------------------------------------------------


When I use "copy" on "Who's there" I get a copy of this line with a new random ID-number

Code:
---------------------------------------------------

[You have failed your Oath of Silence] 204811946427354207051
Who's there? 243027979162761791
Who's there? 12152275822093636854
All is silence. [...] 1588813549227325295
---------------------------------------------------


Changing the text has no effect on the number, but if you make the mistake and change the text from the line with info-ID 12152275822093636854, which is the original number, you're in danger that another mod that contains a line with this number will overwrite your line.

===================================================================

EMMMA

Quote:
----------------------------------------------
Sorry, you're wrong
----------------------------------------------



Hehe, no need to be sorry about that, I'm often wrong .

Still, what I said about two (almost) identical greetings in two different plugins is a fact - the older greeting will be overwritten by the newer. Same goes for identical topics.

Thank you for the explanation about copying dialog lines in your last posting. It sorted out a number of things that I was uncertain about. For instance, this should mean that there's no harm in copying dialog lines that all belong in my own mod, at least not as long as I make sure that the "original" of my dialog lines is above the copied dialog lines.

I would like to ask one more question, that I believe could be of general importance:

Say that I have made out my mod as below.

[You have failed your Oath of Silence] 204811946427354207051
THIS IS MY DIALOG LINE!!! 243027979162761791
THIS IS MY DIALOG LINE!!! 243487333791627617
Who's there? 12152275822093636854
All is silence. [...] 1588813549227325295

Now, I want to change it in order avoid problems for other users, who might be using several dialog intense mods.

Would it be sufficient just to move the line "Who's there?" and "All is silence" upwards (so that they will once again be number 2 and 3 in the dialog chain). OR should I also click "new" and re-write my first dialog entry so that it will have a new ID-number (as it is now in the 4th row in the chain instead of the 2nd)?

==================================================================

JOG

The numbers are completely random and just there to determine how the dialogue lines link together. So just move the original lines up, and all is fine. As long as you don't change the original lines that have the same Info-IDs on every modder's computer...

Sure, there is a tiny chance that you make a new line, get a random number, and another moder gets the same random number as yourself, but when this happens, it's most likely that the moon will drop down and smash the other ones house and computer before he can release his mod

=================================================================

Wizthis

First, Thanks Jog & Emma

For those of us (Like me) who came late to class.

1) In "Greetings". If I wished to add a new greeting, is it better to avoid certain "groups" like Greeting 0, Greeting 1...and place the new greeting in 8 or 9? This would ensure not messing with ;ALWAYS LEAVE THIS TOPIC AT THE VERY TOP OF GREETING 1 and things like that-Yes-No??

2) This also include "Topics" , or is this just good practice for "Greetings" editing?

3) In a Dialogue tutorial, it uses extensive "copy" and edit. Is it better practice to just do "New"?

4) And last question for us dense people.
Placing a "new" Greeting in the middle to be safe means:
Scroll to the middle of all the dialogue in a group and place your new dialogue there?

Whoops!... ...one more:
5) Will TES Tool fix any of these problems, or make it worse when dialog merging?

Thanks again.

=============================================================

JOG

1. Greetings 8/9 are a problem 'cause they don't apply very often. Greeting 1 and 5 are safe and most common, just heed the rule that you put your new lines between two old ones, and when making copies alway edit the upper one.

2. Yes, it also applies to topics, you just have a lot more conflict potential with Greetings 'cause every mod uses them.

3. No, I also always use Copy+Edit, just make sure you edit the upper line.

4. Yes. It's okay to have your new line at the 3rd line from top or bottom, just stay away from the top and bottom lines, and be very careful when you edit the 2nd lines.

5. No idea. But it's very unlikely that a tool can solve existing conflicts. (to do so you need to change the IDs) As long as one mod's dialogue is 100% clean, there is no problem with merging (the game does the same when you load the mods together) but two unclean dialogues will cause the problems I described above.


Again:

* One mod with "unclean" dialogue will cause absolutely no problems.

* Two mods, one "clean" one "unclean" also have no conflicts, as long as the "clean" mod is older than the "unclean" one.

* When an "unclean" mod is older than a "clean" one, the clean mod might remove dialogue from the unclean one.

* Real problems begin when you have at least two "unclean" mods. Then the dialogue-sequence of the older one will be changed.



The nasty thing about the whole business is that the maker of an "unclean" mod won't notice it as long as he doesn't run any "clean" mods that are newer than his one or other "unclean" mods...

========================================================================

Unknown Poster

Quote:

1) In "Greetings". If I wished to add a new greeting, is it better to avoid certain "groups" like Greeting 0, Greeting 1...and place the new greeting in 8 or 9? This would ensure not messing with ;ALWAYS LEAVE THIS TOPIC AT THE VERY TOP OF GREETING 1 and things like that-Yes-No??




Emma posted some advice on using the different Greetings sections in this post (RTS - See below), in the Comprehensive Dialogue Thread..

The whole thread has a lot of useful tips and info about dialogue, and is highly recommended reading for anybody doing dialogue in mods (after doing a tutorial, such as Srikandi's, to get the basics of dialogue down).

A bit more on Greetings...

I strongly advise against making any Greetings changes that will affect existing NPCs: it's just too easy to break quests or cause other problems in the game.

Filter your Greetings so they will only be used by NPCs added by your mod and ignored by everybody else. One obvious way is to use the IDs for your NPCs as one of the Speaker Conditions. You can also use new factions (created by your mod), new classes, new races, new cells, etc. as Speaker Conditions to restrict new or changed Greetings to just NPCs added by your mod.

==============================================================


EMMA

Concerning existing topics:

This is only my personal point of view, but I would be afraid to generally use the existing topics. Why? Well, if most modders did that, there would be enormous amounts of "broken dialog strings" when loading/using more than one mod. Hopefully mostly harmless, but if every modder uses the same topics, there must in the end be a huge risk that things interfere with each others. Dialog from newer plugins will always be placed above those from older plugins, and if the newer plugin is filtering a dialog condition for a whole group, say all Blades, that will definitely interfere with the dialog for your Blade npc. So, personally, I prefere creating my own topics.

Greetings sections:

Question 1: There is one quest in the main game when you are not supposed to talk to anyone. If you put your dialog above the first dialog line in greetings section 1, you will still be able to talk to "your" npcs. If it's your personal plugin, it probably doesn't matter to you, but it might be frustrating for others if you upload it... But I wouldn't say it's a big deal.

Bethesda claims that you can use the greetings sections as you wish. But it's only partially true. If you for instance put your greetings in section 9 and the player already is Nerevarine, he will never get the right greetings as the "nerevarine greetings" are in a previous greetings section.

These are Bethesda's general conventions on where to put different kinds of greetings:

- Forcegreeting-Greetings: GREETING 0
(No checks here, the Greeting is started by script, and the script might
get problems if this greeting isn't showed, because "Who's There" or
a disease/crime line comes first. Put scripted Greetings always here)

- Greetings that check if the player is seen but ignore whether the
Player is a naked, criminal, diseased vampire: GREETING 1

- Greetings that ignore only diseases and crime: GREETING 3

- Standard-Greetings: GREETING 5 - Generally a GOOD PLACE to put your greetings.
(Here, the Game already made sure, that the player is seen by the NPC
and he isn't naked or a vampire, not diseased and no wanted criminal)

- Generic NPC-Faction-Greetings: GREETING 6

- Generic NPC-Class-Greetings: GREETING 7 (Nerevarine-greeting)

- Generic Player-Outfit-Greetings: GREETING 8

- Generic Location-Greetings: GREETING 9


You last question: It sounds to me (but I'm merely a layman) that your approach to dialog making so far must be very safe.

(One poster was unidentifiable because of forum poster name deletions.)



[Page visit counter]
Built by ZyWeb, the best online web page builder. Click for a free trial.