Editing an ESM / Merging an ESP to an ESM

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Editing an ESM / Merging an ESP to an ESM

Post by scrawl » 21 Aug 2015, 22:23

Doing some research for bug #2884, I need to edit Morrowind.esm.

OpenCS doesn't seem to be at the stage yet that it can read and save the file 1:1 (I tried it, hundreds of errors upon starting MW and then a crash).

TES-CS has a "Merge to Master" option, but it doesn't seem to work for me. What I did:
- File -> Data Files ... -> Click on my plugin and "Set as active file"
- Click "Merge to masters"
- Select Morrowind.esm in the dialog that opens
- Select OK
Nothing happens.

TESAME, as far as I can tell, can only merge several plugins into one, but can't merge to masters. Either way, it crashed with an error message when I tried to open my plugin.

Anyone knows of any other (working) tools?

User avatar
psi29a
Posts: 4629
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Editing an ESM / Merging an ESP to an ESM

Post by psi29a » 22 Aug 2015, 00:19

I ran into this with OpenMW-CS and talked with Zini and cc9cii about it. It is on his list of things to do...

I know that cc9cii has a branch that does unspeakable things to esp/esm files... please correct me if I'm wrong.

Cramal
Posts: 186
Joined: 19 Sep 2014, 13:37

Re: Editing an ESM / Merging an ESP to an ESM

Post by Cramal » 22 Aug 2015, 00:58

In the last 10 days, they have been some commits from Marc Zinnschlag preparing the creation of a "merge tool" in open-cs (like https://github.com/OpenMW/openmw/commit ... 47360728a0) .

I don't know exactly how much this tool is working on his local branch

User avatar
cc9cii
Posts: 476
Joined: 28 Mar 2013, 04:01

Re: Editing an ESM / Merging an ESP to an ESM

Post by cc9cii » 22 Aug 2015, 06:19

scrawl wrote:Doing some research for bug #2884, I need to edit Morrowind.esm.

OpenCS doesn't seem to be at the stage yet that it can read and save the file 1:1 (I tried it, hundreds of errors upon starting MW and then a crash).
I am unable to replicate this (although I'm on a branch just after 0.36.1). What I tried:

1. Edit A Content File
2. Choose Morrowind.esm
3. Save then exit
4. Run Morrowind.omwgame from the launcher
5. I stopped after chargen & saving. Is there a particular location where you crash?

I guess you're trying to modify some stuff between steps 2 and 3. If you can detail them I can try to reproduce at my end.

EDIT:

Morrowind.esm 77,967 kB
Morrowind.omwgame 77,457 kB

So we might be losing something while saving...

User avatar
Zini
Posts: 5536
Joined: 06 Aug 2011, 15:16

Re: Editing an ESM / Merging an ESP to an ESM

Post by Zini » 22 Aug 2015, 09:52

The TES-CS merge feature should be working. I don't know why you have problems with it. Also, I have never seen TESAME crash. Very strange.

Anyway, OpenMW-CS should save files correctly, except for deleted records. I am not aware of any other missing features. If there is something going wrong that needs to be examined.

I am indeed currently working on a merge tool for OpenMW-CS. I pushed some additions yesterday that implemented most of the actual merging, with the exception of the following record types: TopicInfo, JournalInfo, Referencables, References, Land, LandTextures, Pathgrids. These are unfortunately all a bit more complicated and I will have to address them individually. Might take a while.

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

Re: Editing an ESM / Merging an ESP to an ESM

Post by scrawl » 22 Aug 2015, 10:12

@cc9cii: run the result through vanilla MW, not OpenMW (i.e. rename omwgame to an esm). This got me tons of errors relating to missing objects referenced by INFO's and then a eventually crash.

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

Re: Editing an ESM / Merging an ESP to an ESM

Post by scrawl » 22 Aug 2015, 11:08

Example of an error I get:

Code: Select all

Object "general darius" not found for dialogue type
Topic
Info "EMPTY"
The object "general darius" does exist in the file.

I think vanilla might be more sensitive to the order of records in the file. I'll try moving things around to see if that helps.

User avatar
cc9cii
Posts: 476
Joined: 28 Mar 2013, 04:01

Re: Editing an ESM / Merging an ESP to an ESM

Post by cc9cii » 22 Aug 2015, 11:11

Right. You're trying to find out vanilla's behaviour. I'll see if there's a quick fix for the errors.

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

Re: Editing an ESM / Merging an ESP to an ESM

Post by scrawl » 22 Aug 2015, 11:23

I think vanilla might be more sensitive to the order of records in the file. I'll try moving things around to see if that helps.
That fixed the missing objects error. Now I have missing cells. Another tweak to record ordering should do it.
Edit: missing land textures. Last one, I think.
Edit2: land textures aren't being saved correctly. Looking into fix.

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

Re: Editing an ESM / Merging an ESP to an ESM

Post by scrawl » 22 Aug 2015, 11:56

That's too bad. Now I have everything loading without errors, but still a crash at the end. Not sure how to proceed. Anyway, will push the fixes so far.

Post Reply