×
Меню
Индекс

MSFD Creating clean dialogue

 
(Thanks to JOG and Cyran0 for this information)
 
When you are adding dialogue to an existing topic (including Greetings, Voices, etc):
•     Be very careful in using a copy/edit based method. Never change an original line: only edit the copy (top line of the two). Editing the copy is safe, but the two may be easily confused.
•     It is preferable to "clean" the original dialogue lines (infos) on either side of the inserted dialogue. This can be done in "Details" view by toggling the "ignore" flag for the changes, or by using a third-party tool, as outlined in the 'Cleaning up your mod' section.
•     It is strongly recommended that you use only one insertion point wherever possible (you can usually achieve this by duplicating the text of original lines in new locations if need be).
•     If you are removing all entries you have added to a topic, or cleaning original dialogue of changes: use the details view, TESAME or a similar utility that will remove your changes.
•     If you are removing one or more lines you have added (but not all lines in a block), do not simply clean the changes. In order to ensure the info-IDs are updated correctly, you should delete the line(s) in the dialogue editor itself (right-click and delete, or 'delete' key when line is selected). The editor will update the IDs automatically. (If for some reason you cannot do this, you can move the dialogue line to be deleted as far away from all other new dialogue as is possible, then use ignore: moving the info will also update IDs automatically, and the original dialogue modified by the move may be cleaned as above. Alternatively, you can export the dialogue, edit as necessary and re-import it.)
 
Some explanation:
Dialogue is a linked list: each info contains its own ID-string, and the IDs of the previous and next lines. You can see this more easily by exporting the dialogue and viewing it in a text editor: the long numbers are the IDs, and the pattern should be obvious.
 
When you change an original line, the ID-string stays the same: this has a similar effect to the one modders are familiar with in different mods changing the same thing, or adding objects with identical IDs… The last mod to load wins. The text and conditions of the last mod to load will overwrite the text and conditions in other mods, dialogue from mods that load earlier and contain that line may lose its place, and some entries may be shifted to new (and usually highly problematic) positions in the list. (New entries themselves are highly unlikely to be subject to the same problem, as 'copy' or 'new' creates a new, randomly-generated ID for the new dialogue line: note that 'copy' does not copy the ID, it generates a new one. However, if you were to copy an .esp with dialogue, e.g. in order to reuse the dialogue for a different NPC, the dialogue would still have the same info-IDs as in the original mod and the two mods would be incompatible. This still applies if you change the topic IDs: you need to change the info-IDs as well!)
 
When you add dialogue to an existing topic, this in itself modifies the original dialogue around it as the CS updates the next/previous info-IDs to point to the new line. That changed original line can overwrite (or be overwritten by) the same line - including its links to the next/previous lines - in other mods when the game loads, causing dialogue lines to lose their place and be moved.
 
The way to avoid this (as much as is possible) is to clean the changes from the original dialogue. This will give errors when the mod is loaded in the CS ("previous/next string is different than expected for ID…" kind of errors)… but since the new dialogue lines still have the correct previous/next IDs the dialogue will (if all mods are clean) be correctly placed when loaded in either the CS or the game, and since the original dialogue is not changed it will not overwrite original lines for other mods. Problems can still arise in some circumstances, most particularly if an "unclean" mod loads later, but most modders will already be familiar with this problem in other areas (object property editing, for example, can be similar).
 
One problem which can arise with this method is that if your dialogue uses more than one insertion point, so that an original line has new dialogue both directly above and directly below, cleaning it will cause problems. The safer method is to simply copy the original line and use the copy, leaving the original below all your dialogue (and therefore unused by the game) - thus keeping a single insertion point.
 
Further notes:
Another point which I think fits the spirit if not quite the letter of 'creating clean dialogue' is this: It is not advisable (or, perhaps, not polite) to put your more generic dialogue higher in the chain than it needs to be, nor to filter any of your dialogue more broadly than necessary. This just leads to a game of one-upmanship as modders try to get their dialogue higher to prevent other mods breaking it.
 
If possible, avoid adding dialogue that will be used by existing NPCs (those not added by your mod) - and be especially careful of this in Greetings. It is often suggested that you use filters unique to your mod when creating new dialogue that is not filtered for actor ID, e.g. new factions, classes, or cells. While this is good advice in general, be aware that unless you prevent it, many players are likely to bring companions into your new cells - and those companions will have any dialogue that is filtered solely for that cell (usually not a desirable outcome). If possible, you may want add a nolore filter to prevent this (preferable to using the companion variable as some still use Morrowind-only companions, and almost all companions and other followers are nolore'd - but "not local companion >= 0" will still rule out the vast majority of companions). You can also filter dialogue for an otherwise-unrelated selection of NPCs from your own mod by using a uniquely-named local variable as a filter (but all those NPCs will need to have local scripts for this to work).