The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Dirty saves: Causes and Cures
      #1909624 - 10/29/03 11:49 AM

If you're new to modding and haven't read this before, please read it now: 'prevention is the best medicine...'.

If you have seen this before, there's nothing new: I just wanted a more descriptive subject so I could find this without having to look at half the 'plz hlp me', 'I have a question?', etc. posts in my Favorites list...

----------------------------------------------------------------------------

Modders frequently show up here asking about problems with mods they're working on. One very common type of complaint is unexplained changes in their mod as they're working on it: doors disappearing, two or more copies of NPCs, changes that show up in the Construction Set but not when they test the mod in the game, etc.

The following is my standard reply to many of those posts:

----------------------------------------------------------------------------

Most likely, what you have is a dirty save game. To fix it, go back to a saved game made before you first installed the mod, and do all your testing from there.

Note: the mod should be fine; the problem is the dirty save.


Rule #1: Before you load your mod to test it, make a separate saved game without the mod installed. Then use that saved game to do all your testing.

Rule #2: Don't save your game while testing a mod. Only save the game once the mod is finished and you're sure you aren't going to make any more changes.

Rule #3: Once a mod is part of your saved games, don't edit it.

Note:

If you're going to be doing much modding, it's probably safest to create a special saved game that you use just for testing mods. Load that saved game when you want to test a mod, and remember not to save it with any test mods enabled.

----------------------------------------------------------------------------

About 'dirty saves':

A dirty save is what you get when you edit (or update) a mod after it's already included in your saved game. The saved game contains data that doesn't match the data in the new version of the .esp file, so the save is now 'dirty'. You can wind up with duplicated items, disappearing items, containers that lose their contents, and various other problems.


Editing a mod after it's included in your saved game is probably THE biggest cause of major foulups for inexperienced modders, and it's probably the single most common cause of problems that people post about here.

Search the two Construction Set forums for a lot more about dirty saves.

----------------------------------------------------------------------------

Note:

When you're editing an area that's already part of the game, it's safest to only add NEW objects, rather than editing anything that's already in the game. Editing NPCs, containers, etc. that are already in the game is a good way to cause problems with saved games, to cause conflicts with other mods, and to possibly break something that's important to the game.

If you do want to edit an existing NPC or another object that's part of the original game, do your testing with a character that has never been anywhere near the area you're modifying: not in the same cell or in any adjacent cells (if you're modifying something in an exterior cell).

----------------------------------------------------------------------------

There's a fairly extensive discussion about avoiding dirty saves, and other tips on 'clean' modding, in this thread:

http://www.elderscrolls.com/ubbthreads/showflat.php?Cat=&Board=tesconstsethelp&Number=1845185&fpart=1&PHPSESSID=

And if you're going to be doing much modding, I'd recommend reading the Construction Set forum regularly: there are a lot of very common problems (such as dirty saves) that frequently trip up inexperienced modders, and reading the CS forum may help you avoid some hassles.


--------------------
How to avoid the most common problem encountered by new modders: Dirty Saves: Causes and Cures

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1910326 - 10/29/03 03:51 PM

Again, nothing new: just adding some more 'dirty save' info that I've typed in from scratch too many times...

If I ever do come up with anything new on dirty saves that the regulars here may not already know about, I'll post it separately from this thread.

I'm just using this thread as a 'Dirty Save UnFAQ' thread, to keep all this in one place.

----------------------------------------------------------------------------

Common question:

I made a mod to give new clothes to an NPC, or new items for sale to a merchant NPC. The new items show up in the Construction Set, but they don't show up in the game.

What's going on?

----------------------------------------------------------------------------

If you've already interacted with that NPC, or possibly just been in the same cell, their inventory is stored in your saved game and won't be changed by the mod.


The data in an .esm or .esp file just sets the initial condition of the NPC (and everything else in the game) when you start a new game. Once you've interacted with the NPC (or most other objects) in the game, the data is stored in your saved game for future use.

When you load up your game: first it reads in the data from the .esm files, then from the .esp files, and then it updates that based on what's in your saved game. So if you've interacted with the NPC already, the NPC's data from your save will be used instead of the data in the .esm and .esp files.


What you can do is change the clothing on NPCs your character hasn't seen in the game yet, or create new NPCs to wear the clothes. Or you could start a new character after you've dressed up the NPCs to suit you.

And if you're trying to give a merchant new items to sell:

You can put them in a container (in the same cell) that the merchant owns. Use a new container (with a new ID) you've added to the game yourself.

You can leave them out in the open, in the same cell, and set their ownership to the merchant.

Note:

When changing ownership (or other reference data) for an object, close the properties sheet by clicking the 'close' button (the small 'X' in the upper-right corner). NEVER click on the 'Save' button for any object that you didn't give a unique ID to, unless you know exactly what you're doing. (Clicking the 'Save' button will change every copy of that object in the game, not just the one reference you're working with.)

----------------------------------------------------------------------------

Not all data about an NPC or other object is stored in your save game files. For example, the head and hair data isn't saved. That's why the various mods that change NPC heads/hair can change the look of NPCs even after you've dealt with them.

NPC inventory, the contents of containers, and a lot of other data is saved in your save game when you interact with that object, so changing it in a mod won't have any affect once you've dealt with that object.

----------------------------------------------------------------------------

I don't have any kind of complete list of what data actually gets saved in save files, just some speculation.

As a rule of thumb, I would guess that data that can only be changed by loading a mod, but not during the normal course of playing the game, probably won't be saved. For example, NPC head and hair normally can only be changed by using a mod; there's no way to change them while in the game. So there wouldn't be much point in saving that information in the save game files.

On the other hand, the inventory affects what an NPC can sell and what you get as loot when they're dead, and that can change during the normal course of playing the game. So inventory data certainly has to be saved. And scripts can move almost any object in the game world around, add new items to the game world or remove existing objects, etc. So a lot of data about what objects are in the game world also has to be saved.

As I said, this is just speculation on my part.

--------------------
How to avoid the most common problem encountered by new modders: Dirty Saves: Causes and Cures

Edited by DinkumThinkum (10/29/03 05:44 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


Srikandi

Master

Reged: 03/15/02
Posts: 5292
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1912071 - 10/30/03 03:37 AM

Pin! Pin! Pin!

Although if this does get pinned, it should have a different title... generally, the people who have the dirty save problem don't know that's what they have.

D, how about retitling it to "Help! Things are disappearing and/or doubling!" or something like that?

--------------------
Srikandi's Morrowind: my mods, TESCS Item Index, tutorials


Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
CaveRat
Curate

Reged: 09/17/03
Posts: 535
Loc: Cave
Re: Dirty saves: Causes and Cures [Re: Srikandi]
      #1912309 - 10/30/03 06:27 AM

Excellent info!

Dinkum, you might wanna paste the links to all those usefull threads you made into your sig, and then just tell people to check your sig.

--------------------
Squeak?!

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Argent
Disciple

Reged: 02/05/03
Posts: 1854
Loc: Australia
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1912771 - 10/30/03 10:32 AM

That's some top-notch info you've compiled there DT.
I second two of Sri's motions; one that this should be pinned, and two that the title needs to be changed.

CaveRat has posted a link to this thread from a post that is only 4 posts above this one (at time of writing).


--------------------
Immersive Architect: Make Morrowind your world builder.
Morrowind Tech

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Malhavoc
Acolyte

Reged: 08/29/03
Posts: 135
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1913854 - 10/30/03 05:01 PM

great post. i just edited a loaded mod (i know, i know) for a cell i visited previously (seyda neen docks v.5.0) and reduced a merchants gold from 7500 to 750. i figured it wouldn't change my game and was surprised to see him with 750 gold.

any idea as to why this happened?
i'm guessing he's a duplicate and the original is walking around with 7500. it shouldn't work correct?

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Klinn
Diviner

Reged: 11/19/02
Posts: 2319
Re: Dirty saves: Causes and Cures [Re: Malhavoc]
      #1914761 - 10/30/03 09:16 PM

Why did it work? Did the character you were testing with ever actually interact with that particular NPC? If not, info like that would not yet be in your save game. If your character has already bartered with the NPC, well, I dunno - you got lucky?

...Klinn


Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Malhavoc
Acolyte

Reged: 08/29/03
Posts: 135
Re: Dirty saves: Causes and Cures [Re: Klinn]
      #1915015 - 10/30/03 10:59 PM

Got lucky I guess. I traded with him previously and he still has the junk I sold him.

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Re: Dirty saves: Causes and Cures [Re: Malhavoc]
      #1915031 - 10/30/03 11:07 PM

Quote:


Got lucky I guess. I traded with him previously and he still has the junk I sold him.





As Klinn said, you got lucky!

A fairly common complaint here is "I gave a merchant a whole lot more gold in the Construction Set, but it's not showing up in the game! What's wrong?".

Which happens (usually) when you use a mod to change the barter amount after you've already dealt with the merchant.

How you missed out on this I have no idea.

--------------------
How to avoid the most common problem encountered by new modders: Dirty Saves: Causes and Cures

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Rolach
Diviner

Reged: 09/21/03
Posts: 4956
Loc: Here
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1915041 - 10/30/03 11:12 PM

About time you got this in it's own post, pin this sucka!

--------------------
GOTY

If I'm not here I'm playing DragonRealms a text based MMRPG.

My little mod page (Thanks to ChaosBlade for hosting!)


Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Malhavoc
Acolyte

Reged: 08/29/03
Posts: 135
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1915809 - 10/31/03 08:48 AM

Quote:

Quote:


Got lucky I guess. I traded with him previously and he still has the junk I sold him.





As Klinn said, you got lucky!

A fairly common complaint here is "I gave a merchant a whole lot more gold in the Construction Set, but it's not showing up in the game! What's wrong?".

Which happens (usually) when you use a mod to change the barter amount after you've already dealt with the merchant.

How you missed out on this I have no idea.




Nor do I. I hunted around last night and couldn't find any duplicates of him which was my only explanation. It shouldn't matter if reduced his gold rather than increased it correct?

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Malhavoc
Acolyte

Reged: 08/29/03
Posts: 135
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1915820 - 10/31/03 08:56 AM

Another related problem I'm having is that Seyda Neen Docks v5 alters the land in Seyda Neen. Basically, it raises some land for some new buildings. I have my own mod My Modifications which runs last (except for list merger and a GMST fixer). SoI went in and reduced the merchant's gold (via My Modifications as the active file with Seyda Neen Docks v. 5 also loaded). Now the new buildings are sitting in the water. My guess is because My Modifications has the original land settings and is over-writing SN Docks because by modifiying the merchant i changed the cell. Would this make sense?

and if so, how do i get a mod like My Modifications to run last and make select entries to various cells (little tweaks like merchant gold reduction) without over-writing any landscape changes from other mods?

My apologies since this is off topic.

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
proweler
Curate

Reged: 11/26/02
Posts: 573
Loc: Far away from every body that has knife and wants to stand behind me
Re: Dirty saves: Causes and Cures [Re: Malhavoc]
      #1917596 - 10/31/03 08:15 PM

When moddefieng NPC's in the game do this instead.

1. Select the NPC you want to change, ravir in this case and give it a new ID, like "1Pr_Ravir"
2. Make your changes and add this script to the new NPC
3. Place the NPC at the same place as the original NPC

Note that this only works for uniqe opjects, not for containers, gaurds, dreamers or soldiers.

Begin ReplaceRavir

short DoOnce

if (DoOnce = 0)
...Ravir -> Disabel
...set DoOnce to 1
endif

End ReplaceRavir

Anybody else that tried to change ravir the normal way will be kept out and anybody that does it this way will see 2 ravirs


--------------------
Prowler Scribe of Many Scribs & Down to Earth Bosmer ShadeWalker; Warrior, when I feel like it, I might walk up to, summoning armor every step. Mage, when I feel like it, I might walk up to, absorbing magic step by step. Thief, weither I feel like it or not, you'll never see anything but an arrow tip under your chin.

Edited by proweler (10/31/03 08:20 PM)

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1947572 - 11/10/03 02:47 AM

Quote:


If you have seen this before, there's nothing new: I just wanted a more descriptive subject so I could find this without having to look at half the 'plz hlp me', 'I have a question?', etc. posts in my Favorites list...





Nothing new: just another post on dirty saves I want to save someplace where I can find it easily.

NOTE: If anybody has a good explanation of how to use the 'Details' list in the Construction Set to clean a dirty save, feel free to tack it on to this thread. All I know is that you change the extension from '.ess' to '.esp' so you can view it in the Construction Set, but I've never actually gotten around to looking at a save game in the editor.

Most of this thread is aimed at modders: how to avoid dirty saves while testing mods you're working on. This post is aimed more at mod users.

----------------------------------------------------------------------------

Responding to "Melted_Snake", posting in the Mods forum (thread was "Help! *Falls into hole*")
Quote:


Well I just installed Sigrad tower and I had veylalia(sp?) turned on and I turned it off because it was in the same place as silgrad. But the places I visited on veylalia are still there and silgrad is cut off at those places. Can I use the advance editor to fix this some how? I'm like earaseing those places?





As what's-a-name said, you have a dirty save problem.

Even though you've uninstalled the veylalia(sp?) plug-in, a lot of information about that plug-in is still included in your saved game. That's why it's still showing up in the game. I have some suggestions, but I am far better at avoiding dirty saves in the first place than I am at cleaning up the mess after it's already happened.

----------------------------------------------------------------------------

Uninstalling a mod once it's part of your saved games is risky. Sometimes it won't cause any problems, other times it may be impossible to continue playing without the mod installed.

The safest and most reliable way to deal with this is to go back to the backup save game you made just before you first installed the veylalia(sp?) plugin, and start over from there with the new plugin installed instead.

----------------------------------------------------------------------------

If you don't want to start over from your backup save game, you can try to clean an existing save game. Back it up first, and don't save over it.

1. Load up a saved game made with just the veylalia(sp?) mod installed (i.e., from before you installed the Sigrad tower plugin). Enable the veylalia(sp?) mod, but NOT the Sigrad Tower one.

2. If you have any items that weren't part of the mod stored in a container or cell that was added or changed by the mod, get it out of there.

3. Dump everything out of your inventory that was part of the veylalia(sp?) mod. If you're not sure which (if any) items came from that mod, then just drop everything you have. Dump it somewhere that's not part of the mod, wasn't affected by the mod, and isn't adjacent to a cell affectected by the mod. (Some of that may be overkill, but better safe than sorry.)

4. Put your character in a small interior cell that's not part of the mod, etc. (see #3 above for the .etc part).

5. Now save the game (with your character in that interior cell) and exit the game.

6. Now start the game, and leave BOTH plugins disabled. You'll probably see a ton of error messages (because the game is trying to find all the objects, etc. that were part of the veylalia(sp?) mod. Click past them.

7. If the game manages to load without crashing, spend a lot of time playing it (with both plugins disabled) to see if it's working right.

8. Once you're satisfied the game survived, go ahead and install the Silgrad tower plugin and continue playing.

NO guarantees that the above will work, that it wil make your game playable, or that it will eliminate all problems caused by uninstalling a plugin.

----------------------------------------------------------------------------

There's a second method for cleaning a saved game using the Construction Set, but I've never tried it and don't know the details.

Edit: Corrected the following based on Argent's post and expanded it a little:

What other people have posted is that you can change the extension of the saved game from '.ess' to '.esp'. Then open the editor, go to the Data Files screen (from the File menu), and use the 'Details' list and the Delete key to ignore all references to the plugin you want to get rid of. DO NOT try to actually load the save file into the editor; just clean it from the Details list. Then hit the Cancel button to exit without loading the save file.

See Argent's post a couple posts further down for a few more details on this.

I've never used this procedure, so I can't offer any more than the above. (My strategy is prevention: avoiding dirty saves is easier and more reliable than trying to clean up the mess aftewards.)


----------------------------------------------------------------------------
Another edit:
----------------------------------------------------------------------------

Dave Humphrey just posted the following in another thread; I've pasted it in here to make it easily findable if some one needs to fix textures after removing a mod.

----------------------------------------------------------------------------

Dave Humphrey
Curate

Reged: 06/18/00
Posts: 540
Loc: Toronto, Canada
Re: Help a mod appreciator... [Re: Iudmin]
#1948028 - 11/10/03 09:35 AM Edit Reply Quote

When you install the original game, all the landscape textures (and other data files) are in the big Morrowind.Bsa file. When a mod like Green Morrowind changes the textures they place the new textures into the game's Data Files\Textures path. The game notices the new files and loads them from there instead of the BSA file.

In order to revert back to the original texture you can do one of several things. First, you can delete the textures you don't want from the textures path. Of course, you should be careful to just delete the appropriate textures otherwise you might break other mods.

The second, and possibly better, method, is to copy all the original textures from your second CD (labelled Construction Set I believe). The old textures will overwrite any replaced textures and things will get back to normal. Of course this will overwrite any replaced textures (but not new ones) so if you just want to revert your landscape textures but not anything else you'll have to copy the files back selectively.

If you're hard up and lost the 2nd CD, you can also extract all the textures files from the Morrowind.Bsa file.

--------------------
Dave Humphrey - Unofficial Elder Scrolls Pages, serving the ES community since 1995.
MWEdit - Alternate plugin editor NIFTexture
Script Functions

----------------------------------------------------------------------------
----------------------------------------------------------------------------

--------------------
How to avoid the most common problem encountered by new modders: Dirty Saves: Causes and Cures

Edited by DinkumThinkum (11/10/03 09:45 AM)

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
CaveRat
Curate

Reged: 09/17/03
Posts: 535
Loc: Cave
Re: Dirty saves: Causes and Cures [Re: Klinn]
      #1947744 - 11/10/03 05:35 AM

Quote:

If not, info like that would not yet be in your save game. If your character has already bartered with the NPC, well, I dunno - you got lucky?




Lucky?

No way.

Merchant's maximum budget ( the value you set in CS ) does not get saved in the savegame. (checked in the hex editor). Game apparently only saves the current budget ( at the point of saving. )

If you changed the value in CS, and don't see the change in the game, it is probably because of how game handles budget 'restoration' (within 24 hours). Sell some items to him, sleep for 24 hours, and eventually his budget will be as you specified in CS. (at least it always works for me)





--------------------
Squeak?!

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Re: Dirty saves: Causes and Cures [Re: CaveRat]
      #1947782 - 11/10/03 06:17 AM

Quote:


Merchant's maximum budget ( the value you set in CS ) does not get saved in the savegame. (checked in the hex editor). Game apparently only saves the current budget ( at the point of saving. )

If you changed the value in CS, and don't see the change in the game, it is probably because of how game handles budget 'restoration' (within 24 hours). Sell some items to him, sleep for 24 hours, and eventually his budget will be as you specified in CS. (at least it always works for me)





Makes sense to me, although I haven't tested it yet.

As often as this has come up (raising merchants' maximum barter gold is always popular), I'm surprised nobody ever pointed this out before. The general 'assumption' (yes, I know...) has always been that it was just one more saved game problem.

I stand corrected!

--------------------
How to avoid the most common problem encountered by new modders: Dirty Saves: Causes and Cures

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post
Argent
Disciple

Reged: 02/05/03
Posts: 1854
Loc: Australia
Re: Dirty saves: Causes and Cures [Re: DinkumThinkum]
      #1947879 - 11/10/03 07:16 AM

Quote:

change the extension of the saved game from '.ess' to '.esp'. Then load it into the editor and use the 'Details' list to remove all references



Should replace load with view; I've never been able to load a save file into the editor. It gets to 99% and then crashes with an error.
The file contents can be viewed from the Data Files|Details list like you say, but this doesn't require the file to be loaded. Assuming you know what you're looking for, it's possible to toggle some records as ignored (like NPC_ or SCPT records) but you can't remove cell references, and often it's these that fatally corrupt save games.

If you are after more control over editing a save file, like deleting cell references or copying your custom made spells/enchanted weapons to a plugin file, then I higly recommend The Morrowind Enchanted Editor.

To quote Farren 'It's like TESAME on steroids'. I reckon it's had a healthy dose of growth hormones too!

--------------------
Immersive Architect: Make Morrowind your world builder.
Morrowind Tech

Post Extras: Print Post   Remind Me!   Notify Moderator   Email Post


DinkumThinkum

Diviner

Reged: 09/19/01
Posts: 4770
Loc: Luna Penal Colony
Re: Dirty saves: Causes and Cures [Re: Argent]
      #1947970 - 11/10/03 08:48 AM