Undelete References

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

So, you want to fix the Deleted References in a plugin?

The easiest way to do this is to use TES4Edit->Undelete and Disable References. See Cleaning a Dirty Plugin for more details.

The older, harder way to do this may still provide some valuable information.

  1. Make a copy of the plugin, such as MyPluginNoDeletes.esp.
  2. Take a look at the Deleted Refs using the CS. Select MyPluginNoDeletes.esp from the Data Files selection window in TESCS and click "Details". This gives a list of all FormIDs in the plugin. Drag the Deleted column wider so you can see it, then sort on that column. All the Deleted FormIDs will be listed at the top.
  3. If there's just a few Deletes here, write down all the cell names and FormIDs of cells where the deletions are (you'll have to expand the FormID column to see that). You can now mark these ignored (select them, press delete key) and load the file to undelete (i.e., this removes the deletions).
  4. Or, if you know there are bunch of Deleted Refs that need to be fixed, you could skip Steps 2-3 and simply use Wrye Bash to Undelete Refs in the NoDeletes plugin.
  5. Compare the NoDeletes plugin with the original (open the NoDeletes plugin with TES4Edit, select it, right-click->"Compare to", select the original file).
  6. Select Oblivion.esm, right-click->Hidden (also hide any other plugins/masters you're not comparing).
  7. Apply Filters to show where the differences are between the plugins you're comparing (they should be the only ones not hidden when you do this).
  8. Toggle "Hidden" back off on Oblivion.esm.
  9. Find each of the Deleted records and right-click->"Copy as override into" from the original master (i.e., Oblivion.esm) into a temporary file (i.e., something like TempUndeletes.esp).
    • Note that when a door is edited, its record may be moved to the cell it teleports to. For instance, when you edit the door from Anvil to Salmo the Baker's, the Anvil door record will be in Salmo's in the .esp, but in Anvil in Oblivion.esm.
  10. While you're doing this, check each of the references for any Enable Parent or Teleport Target (for doors) settings. These fields must be cleared (right-click->"Remove" in TES4Edit) to make the undelete safe.
  11. Also while doing this, move the objects far out of the way. For example, you can change the Z position value to -9000 or more (if you move it too far, TESCS will give warnings about potentially invalid Z values).
  12. Save changes and quit once you've got them all copied and fixed up TempUndeletes.esp.
  13. Open TempUndeletes.esp in TESCS and either follow your written list of cells or look for cells marked with an asterisk (changed). Note that if you undeleted some persistent refs, these won't always cause the parent cell to get marked with an asterisk.
  14. On the Cell View Window, 'Interiors' is already selected, after 'World Space'.
  15. In the left table, click on the FormID column header to order cells by FormID.
  16. Scroll down in the table and select the first cell you need to change. All the objects within that cell appear in the right-hand table.
  17. In the right-hand table, scroll down the list looking for entries with an asterisk, or if you kept a list of FormIDs then click again on FormID column header to order objects by FormID and scroll down the table to find it.
  18. Optional step: Double-click it to see the reference in the Render Window.
  19. Right-click the list entry and select 'Edit' or go to the Render Window and double-click the object. Either will cause the Reference Window to appear.
  20. On the Reference Window, place a checkmark on 'Initially Disabled', then click 'OK'.
  21. Repeat this process for each undeleted reference.
  22. Save your changes and quit TESCS.
  23. Double-check your changes in TES4Edit by examining each undeleted reference to make sure it is properly moved and/or Initially Disabled, has no Enable Parent, no Teleport target, etc.
  24. Copy these undeleted records from TempUndeletes.esp back into MyPluginNoDeletes.esp.
  25. You can do this one-by-one using TES4Edit's "Copy as override into" or (if there's a lot and you're lazy) rename the file to MyPluginNoDeletes.esu and use TES4Gecko's "Apply Patch" to get them all at once.
  26. Test your changes in-game.