User:DavidJCobb/Binary search (troubleshooting)

From the CreationKit Wiki
Jump to navigation Jump to search

Sometimes, you may run into a problem or incompatibility with one of your mods and have no easy way to know what's causing it. In these cases, you'll want to use a binary search, wherein you cut your list of mods in half, and then cut those halves in half, and so on, until you find your target mod. If you have a large mod list, then this will still be a slow process, but it's much faster than enabling and disabling mods individually.

Conducting a binary search[edit | edit source]

If your mod manager supports "profiles," or hot-swappable mod lists, then duplicate your profile and act on the duplicate.

  • Disable half of the mods that you currently have enabled, ignoring any "core" mods or mods that act as dependencies (e.g. USLEEP, SkyUI).
  • Test to see if your bug is still occurring.
    • If the bug still occurs, then the problem is caused by at least one mod in the half that are still enabled.
    • If the bug stops occurring, then the problem is caused by at least one mod in the half that are disabled.
      • Swap your two halves: disable mods that were enabled, and enable mods that were disabled. Again, ignore "core" mods and mods that act as dependencies.
  • Repeat these steps until you've narrowed things down.

You can generally omit mods from this process if they're obviously unrelated to your problem. For example, a retexture won't cause skeevers to react to your Amulet of Mara, and a perk overhaul won't turn trees into blobs of purple squares.

Keep the limits of a binary search in mind: it's best for narrowing down problems that are caused by one mod, so if your problem is caused by a group of mods, you may not be able to identify all of them individually through this process alone. It's also not useful for diagnosing the causes of corrupted saves.

Ideal test procedure[edit | edit source]

These steps should allow you to run quick tests without having to sit through a long introduction. It will allow you to test on a fresh playthrough; removing mods from an existing savegame often causes problems of its own.

  • Start the game, and open the command-line debugger in the main menu.
  • If your test doesn't involve combat, use the TDetect, TGM, and TCAI commands to ensure that you don't get into fights.
  • Use the COC command from the main menu to go to a cell suitable for your test. The game will create a default character for you.
    • If you can conduct your test anywhere, then Elsweyr and QASmoke are simple interior cells that should load quickly.
    • If you need to be outdoors, WhiterunExterior01 is an easy cell to remember.
    • If you need to be in a city, WhiterunOrigin and RiftenOrigin are easy cells to remember.
    • If your problem involves quests or similar events misbehaving, then do not use COC. Start a new game normally.
  • Use console commands to give yourself whatever gold, items, and other resources you need.
    • You can technically make these changes before COCing out of the main menu, but they will be reset.
  • Test whatever situation led to your problem occurring.

When dealing with bugs in Skyrim mods, just about anything is possible. You may want to try these steps out before you take the time to do a binary search, just in case your problem is specific to your savegame (in which case a fresh test wouldn't replicate it easily) and not a general issue with your mod list.