Save Edit - Cleaning, Merging lists etc.

Feedback on past, current, and future development.
TwilightOne
Posts: 2
Joined: 15 Sep 2016, 21:12

Save Edit - Cleaning, Merging lists etc.

Post by TwilightOne »

Hey, sorry if this has been asked and asnwered already, but I can't seem to get a good answer about this particular issue.

When OpenMW imports a savegame it converts it to its own - I imagine superior - format. But, some mods in active development and others need users to "clean" their saves or use Wrye Mash for other tasks such as merging. Problem is none of these tools work with OpenMW saves. So what are we to do in the meantime?

Is there a way to do this task with OpenMW? Is OpenMW smart enough to delete references when not used after deleting a mod from the load order? Can it auto merge leveled lists? Since Morrowind is a game that one can spend hundreds of hours on multiple playthroughs it would be sad to have an unusable save after some weird bug that halts progress or corrupts scripts, etc.

Thanks a lot for your awesome work and time answering this question.
Have a nice day! :D
Loriel
Posts: 179
Joined: 28 May 2015, 00:44

Re: Save Edit - Cleaning, Merging lists etc.

Post by Loriel »

Merging of leveled lists can be handled, specifically by a Python tool found at https://github.com/jmelesky/omwllf

See the wiki for more discussion at https://wiki.openmw.org/index.php?title ... st_merging (though this is likely to be moved from the wiki to other documentation in due course)

I can't comment on the "cleaning of save files" - whilst I recall it was a useful facility in Wrye Mash for vanilla Morrowind, I've not noticed the lack of it in OpenMW.

Loriel
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Save Edit - Cleaning, Merging lists etc.

Post by scrawl »

Is OpenMW smart enough to delete references when not used after deleting a mod from the load order?
When you load a savegame, all references that originate from a no-longer-active plugin are deleted. This process isn't (and can't be) perfect, though.
Since Morrowind is a game that one can spend hundreds of hours on multiple playthroughs it would be sad to have an unusable save after some weird bug that halts progress or corrupts scripts, etc.
You can usually fix anything with the console. I'd still use more than one save slot and have some backups, in any case.

As to the necessity of other tools, I think we'd need to know more about what they actually do in order to judge that.
User avatar
Amenophis
Posts: 320
Joined: 30 Oct 2011, 04:34
Location: Fortaleza - Ceará - Brasil

Re: Save Edit - Cleaning, Merging lists etc.

Post by Amenophis »

These days I was playing a quest mod when found a bug. After fixing the problem I loaded the old save without it, let OpenMW clean the old references and loaded the new fixed esp. The resulted save has a great problem: one npc that I have to kill is alive now but the game says is already dead.
The only solution now is load an older save never altered by the mod.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Save Edit - Cleaning, Merging lists etc.

Post by scrawl »

Apparently, we don't clean the death counter (getdeadcount) of non-existing IDs when loading a game.

I'll bet 5 septims that by tomorrow, a noble developer will have come to our aid and provided a pull request to resolve this nasty issue.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Save Edit - Cleaning, Merging lists etc.

Post by psi29a »

scrawl wrote: 13 Sep 2017, 19:41 Apparently, we don't clean the death counter (getdeadcount) of non-existing IDs when loading a game.

I'll bet 5 septims that by tomorrow, a noble developer will have come to our aid and provided a pull request to resolve this nasty issue.
You heard the man, first person to do this before tomorrow gets 5 septums!

Image
User avatar
Amenophis
Posts: 320
Joined: 30 Oct 2011, 04:34
Location: Fortaleza - Ceará - Brasil

Re: Save Edit - Cleaning, Merging lists etc.

Post by Amenophis »

scrawl wrote: 13 Sep 2017, 19:41 Apparently, we don't clean the death counter (getdeadcount) of non-existing IDs when loading a game.
Thank you, Scrawl. Can you look at the modded scripts, too? I think there is some issues with their variables keeping after the cleaning.
TwilightOne
Posts: 2
Joined: 15 Sep 2016, 21:12

Re: Save Edit - Cleaning, Merging lists etc.

Post by TwilightOne »

scrawl wrote: 13 Sep 2017, 17:50
Is OpenMW smart enough to delete references when not used after deleting a mod from the load order?
When you load a savegame, all references that originate from a no-longer-active plugin are deleted. This process isn't (and can't be) perfect, though.
Since Morrowind is a game that one can spend hundreds of hours on multiple playthroughs it would be sad to have an unusable save after some weird bug that halts progress or corrupts scripts, etc.
You can usually fix anything with the console. I'd still use more than one save slot and have some backups, in any case.

As to the necessity of other tools, I think we'd need to know more about what they actually do in order to judge that.
When you say that all references originating from the old esp are deleted, is that a new behavior by OpenMW or is Vanilla Morrowind doing the same? Can you please explain a bit more why this process isn't perfect? As in existing objects you gained (like gold) would stay with you even if you deleted an esp that gave a quest with a gold reward, but would removing the esp remove the quest from the journal and npcs added with it? If such plugin were to be reactivated, would the quest be able to be restarted as if it never was done in the first place with the OpenMW implementation? Are scripts kept track of in the OpenMW save file format and deleted from runtime when an esp that added them is removed?

So then, the OpenMW way is cleaning the save file in the same way that save cleaner software works by removing unused references and scripts? Just automatically without user input? Vanilla mods that require to clean a save to install/uninstall and such don't need the extra step like before by the user? And yes I'm keeping many saves and backups. ^^

I'm trying to understand more how this all works. ^^

Thank you
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Save Edit - Cleaning, Merging lists etc.

Post by scrawl »

When you say that all references originating from the old esp are deleted, is that a new behavior by OpenMW or is Vanilla Morrowind doing the same?
I think vanilla is doing the same, but I'm not sure (been way too long).
Can you please explain a bit more why this process isn't perfect?

As in existing objects you gained (like gold) would stay with you even if you deleted an esp that gave a quest with a gold reward, but would removing the esp remove the quest from the journal and npcs added with it?
In this example, the gold would remain, the quest / added NPCs would be gone.

There are a few more complications. Let's say the mod moves an object from a parent plugin to another location, and because of an unrelated change that object happens to get stored in your savegame - then it'll remain in the new position after the mod is removed. Creatures spawned by a levelled list are not going to be removed. Objects placed at runtime by scripts will not be removed.
If such plugin were to be reactivated, would the quest be able to be restarted as if it never was done in the first place with the OpenMW implementation?
Theoretically yes, assuming we don't have a bug somewhere and that quest isn't affected by any of the above gotchas.
Are scripts kept track of in the OpenMW save file format and deleted from runtime when an esp that added them is removed?
Yes.
So then, the OpenMW way is cleaning the save file in the same way that save cleaner software works by removing unused references and scripts? Just automatically without user input? Vanilla mods that require to clean a save to install/uninstall and such don't need the extra step like before by the user?
I have no idea how said software precisely works.
User avatar
AnyOldName3
Posts: 2666
Joined: 26 Nov 2015, 03:25

Re: Save Edit - Cleaning, Merging lists etc.

Post by AnyOldName3 »

I'm trying to do the thing that Scrawl bet someone would sort out within a day (it's been longer, so he lost that bet, and I want my five septims). I've hit a slight snag, though. I can't find anywhere where a list of all valid actors is kept indexable by ID (where ID is something like "tanisie verethi" in the case of the one guy I murdered in order to work out what the death count list was indexed by - apparently I'd never actually killed anything in OpenMW before today). The Actors class has a list of actors, but it looks like it might just be ones who're alive, and it's not indexed by the right thing, so I'd have to iterate through every element comparing IDs.
Post Reply