Good Modding Practice: checking mods

Good Modding Practice: checking mods

We love Morrowind, we love mods and more often than not we mod it until we break it.
This article is all about good modding practice, in this instance how to check that a mod is cleaned, error-free (to some extent) and compatible with the rest of the modlist.

Some steps described below may seem, and indeed be superfluous but I want to be as thorough as possible.

Getting/installing the tools.

These are not, by far, all the modding tools but they are the one we can use to clean mod and remove conflicts. This is not a full tutorial on these tools, just what we need to clean mods. A lot of these tools can be installed anywhere so long as you point them to the morrowind.ini or data files. As a rule, I tend to install such tools on my Morrowind/tools/ folder to keep thing neat.

Wrye Mash

Installation: Morrowind folder
Usage: this is our modding hub. Might be daunting at first to use but it is the most powerful tool we have.

Testool

Installation: Morrowind/tools
Usage: clean plugins

tes3cmd

Installation: Morrowind/Data Files
Usage: clean mod, merge levelled lists, fix defogged cells

Construction Set

Installation: Comes with your Morrowind unless you are running the Steam version of Morrowind. In which case, download this version from the Nexus and install in your Morrowind directory
Usage: Dialogue Result Box check, export/import dialogue

mwedit

Installation: Morrowind/tools/mwedit
Usage: Re-compile scripts in a plugin, optimise syntax of scripts

tesPCD

Installation: Morrowind/tools
Usage: detect or fix conflicts

mlox

Installation: Morrowind/tools/Mlox
Usage: auto-sort load order, report on missing files and conflicts, customise load order

Setting things up

I assume now you have downloaded and installed the tools above.
Wrye Mash already knows how to start/use utilities like MGE and tes3cmd and MLXO, we are going to teach it to open the other utilities for us.

  1. Go to the Utilities tab of Wrye Mash
  2. Click "Actions" then "new".
  3. Navigate to the application you want to add
  4. click open, then ok
  5. Repeat for all your tools except MLOX and tes3cmd (and MGE).
    teachMash

Double clean

You'll want to clean your new mod with tes3cmd AND testool. Each utility cleans stuff that the other missed.

With tes3cmd

As show above, Wrye Mash will detect tes3md and run its main function (clean and merge levelled lists) straight from Wrye Mash UI.

  1. Open Wrye Mash, go to the 'Mods' tab.
  2. Right click on the mod you want to clean. (You can also select multiple mods) and click "Clean with tes3cmd.
  3. A window open where you can see a progress bar and a report.
  4. When the progress bar is full, your mod is clean and you can close the window.
  5. Optionally, you can Save Log if you want to keep the details about what's been cleaned.
    techCleanWrye

With TESTool

  1. Launch TESTool. Agree to using Morrowind.ini
  2. Head over to options if you haven't before.
    Select "Don't change plugin filenames" so that Mlox recognises the mod
    Select "Retain file time, when cleaning": so, if your load order is already sorted, you don't have to change it again.

Abot's explained that Restricted Dialogue and cell cleaning are not needed so long as the mods you are cleaning do not dirty vanilla dialogue. If you are unsure about this, go ahead and tick Restricted Dialogue Cleaning.

  1. Click execute and select the plugin or plugins you want to clean.
    teschCleanTestool-1

Dialogue check

Dialogue Result Box Errors

When talking to npcs, besides the dialogue itself, you may be given an item, given multiple options, journal updates, new dialogue topics, etc. All those things are store in the Construction Set Result Box. An error means that you'll get a warning in game, and whatever was supposed to happen, well... doesn't. It might break a quest; it might make you little poorer.

  1. Load the mod in the Construction Set
  2. Open the dialogue window
  3. Click "dialogue check"
  4. take notes of the errors reported
    The following are from the base game itself and can be ignored (don't worry, it just works):
    -rat
    -women
    -stock certificate
  5. Close, DO NOT save
  6. Open the CS again, open the dialogue, fix the errors that were reported.
    These errors are typically syntax related (a " is missing) or typos related (the mod is told to look for an object called "mymod_bottle01" it doesn't exist, or was named "mymod_bottle".
    If it's all klingon to you, head over to the Morrowind Modding discord, someone is bound to be able to help you.
    teschCleanTestool

Typos and spelling

  1. Open the CS
  2. Go to files, export data, dialogue, new dialogue

You can also export/import dialogues as well as scripts directly from Wrye Mash: right-click on the mod>Export>Dialogue

  1. type a relevant title and save the document
  2. open the document with your favourite text editor and go for a spellcheck
    It will have problems with all the Morrowind functions such as "additem" or bits of script in the Result Box like "[CRLF];LoopGroup, Idle4, 1, 1" . Likewise, a whole bunch of words (Dunmer...) will be unknown, simply ignore all.
    Be very careful not to make any undue modification.
  3. save in .txt format
  4. Back in the CS, import dialogues back.
  5. Save
    TeachCSimportDialogue

Script check and tidy

  1. Open MWEdit
  2. Tick Morrowind, Tribunal and Bloodmoon (a single click is enough)
  3. Tick the mod you want to check, make sure it is active
  4. click ok
  5. Go down to the Scripts tab
  6. Double click on the script you want to check, it will be highlighted in green (i.e from the mod that is currently active)
  7. auto-format the script (will indent properly for better readability)
  8. compile the script
  9. fix the issues if you know how, or ask for help on the Morrowind discord.
  10. save the script
  11. save the mod under a different name
  12. export the scripts from the new esp using Mash/Export/Scripts
  13. import back the scripts to the original mod
  14. open the original mod in the CS, re-compile there, and save.

Scripts with globals need to be recompiled twice.

teachMWEdit

Conflicts: TESPCD

I'll assume you have read the read me of the mod to learn of known incompatibilities.

  1. open TESPCD
  2. Click on "CheckType", then Single check.
    This means we are going to check for conflicts with one mod only. The full check mod will compare every selected mod with every other mod: it can get really messy with a lot of mods selected.
  3. Go to options, types and disable levelled items and levelled creatures>> these conflicts will be solved with merged levelled lists
  4. Right-click on "Master Plugin" and select the mod you want to check, click open
  5. Right-click "plugin files" and select every mod you intent to use.
    Be sure to NOT add merged object and multipatch / merged levelled lists.
    In the selection window, I strongly recommend ordering the files by "last modified" which should be closest to your load order. This way TESPCD's report on which plugin overrides which will be more accurate.
    teachTESCDP

Understanding the reports

IMPORTANT NOTES

  • Thanks to Tes3Merge, a great many conflicts will be solved: if a mod adjust the price of a weapon, and another changes it model, Merged Object.esp will edit the weapon giving it both modifications.
  • However, if two mods change the value of the same weapon, then the mod loaded last will prevail (even with Merged Objects.esp)
  • This applies to all record except dialogues and landscapes that are not handled by tes3Merge

You will need to check each conflict and decide if 1/ tes3merge will sort it 2/re-arranging the load order will solve the conflict 3/ you need to edit one of the mods

  1. Double click on a mod from the "Esp file" and the "Overriding esp File" to see how each mod modifies a given object.
  2. Compare each attribute and see which is modified by the plugin
  • Case 1: both mods have the exact same entry > nothing to do
  • Case 2: each mod modifies a different attribute (one changes the model, the other the price) > let tes3Merge solve this
  • Case 3 : both mods modify the exact same attribute of the object.

A lot of the data comes in a string of letters and numbers. You can use this page from the UESP wiki as a reference but personally, I prefer to open the MWedit that lets me look at 2 mods to see the details plainly.

a/ Modify you load order (last mod loaded wins) MAKE A NOTE OF THIS!
b/ Click "delete entry" from the detail window of the mod you do NOT want to keep, confirm.

This effectively removes the reference from the plugin. This means that should you download a newer version of this plugin, the conflict would be back.

dialogues and landscapes

  • For landscapes, we'll need to open the Construction Set to see what's happening and whether we need to do something or not. A lot of the time, you will find a land tear. Here's how to find them and fix them
  1. take note of the 2 conflicting mods and the cell they both modify.
  2. load both mods, make the last one active
  3. open the cell and look around the edge from various angles: land tear are not visible from every angle
  4. open the landscape editor, tick soften and reduce the radius to 1.
  5. left click along the tear to bring the edges together
  6. save

be careful to not right-click, you would change the texture. If that happens, a simple control+Z will undo it.

  • Dialogues are... messy. Each line of dialogue in the game is sort of double referenced in relation to the line that comes before and after. What it means effectively is that the line above and under one added by a mod become modified by said mod, even though... well, it's not.
    tescdp will report conflicts in dialogue that are clearly completely different, with different filters. There is nothing to do about those.
    When there is an actual conflict, it can be in the dialogue line, the result box or in the filters (i.e. conditions for the line to be spoken).
    Case 1: minor differences: one mod adds flavour text, the other adds something to the result box.

You can edit the dialogue in the CS or MWedit and add extra information from mod 1 into mod 2.
Case 2: One mod is a quest, the other is flavour dialogue, syntax correction.
Load the quest mod last. Make a note of the order
Case 3: Both mods make some serious edits. Unless you know the CS dialogue window well AND understand what both mods are trying to achieve, it's best to call these 2 mods incompatible and pick one.

Load Order

MLOX is great though mostly ignorant of more recent mods.

  1. Open mlox_base.txt and mlox_user.text
  2. take your list of conflicts where load order is the solution
  3. Search through both mlox text files to see if they already have a rule about the conflicting mod. If they do, great. Job done. If not…
  4. Check the read me of both mods to see if they have load order instructions
  5. Add a new order rule to mlox_user.text
    This from Mlox documentation:

You can add any of mlox's rules to mlox_user.txt, but for people that want to customize their load order, the [Order] rule is probably all that is needed. Here is a simple example:
Let's say you want to make sure that mlox always puts plugin "Foo.esp" before "Bar.esp". Just create a simple text file called "mlox_user.txt" in your mlox directory (using Notepad or whatever) containing the following:
[Order]
Foo.esp
Bar.esp
From now on, when you press the mlox update button, mlox will make sure that this is the order for those two plugins. Note that the [Order] rules in mlox_user.txt (your personal rules) take precedence over the rules in mlox_base.txt.

  1. Save

Profit

... Just as soon as you have cleaned the mod again if you did any edits on it.

patreon