Then I should not include the master ESM even when the program requests it and I just have to combine the ESPs?
Yup, any esm's that are master files will simply be required as master files for the new merged mod, from what I am aware from reading about merging mods, you should never include esm's in merged mods.
I never do, if you use the xedit script to merge them it will show the esm files as part of the list as it automatically loads the masters for all mods, but only select the esp files for the armour/weapons mods you want, merge them.
What I normally do when merging mods is create a working directory, unzip all the mods into individual mod directorys, then work through the mods moving each mesh/texture directory to where it should be, rename readme files to the name of the mods esp, and move them into a directory called readme, do the same for screenshots, if there is only one name it after the mods esp, if there are multiple then create a new directory called screenshots, then create a directory under that called the mods name and move them into that.
After doing all that, I will the zip it up, making sure that non of the original mods zip files are included, and install that into mo, this will activate all the esp/bsa and such, do what edits on the individual esp I want to, move each edited esp to the optional esp directory, till all the edits are done, it makes doing edits much less of a chore as it can be done mod by mod so you seem to be getting somewhere, rather than looking at potentially thousands of edits in one mod.
After doing all that then I will merge the mods esp, excluding all esm, though to be honest most armor mods do not have esm, the only one off hand that I know of is the Art of Magic, though that mod I would not merge anyway as it is large enough in its own right to leave it alone.
When you do the merge and copy the assets, which the xedit merge script will allow, you can then zip that file up, and install it, if you use mo, you should then be able to see which mods it overwrites, which should be all of the mods you merged.
Currently working on my first UUNP merged mod after switching from CBBE to UUNP, got about 20 or so esp to edit before merging.
My edits are, add heavy/light/clothing versions where they are not already present;
Add male appropriate meshes where not included.
Edit keywords for consistency, so player made armour that is like dragonplate but keyword it to things like leather/iron.
Create crafting/tempering recepies for each armor piece, and make them appropriate to the armour, ie if the armor has the stats of dragonplate then it will require the same materials to craft as dragonplate does including appropriate smithing perks.
Edit price, weight etc for consistency with vanilla costs.
It does however take quite a bit of time, doing it to armour mods that add, 1 set 4 items are pretty quick, doing it to something like aradia kato however takes ages, as that mod has a lot of base items, editing each item and doing the other changes takes quite a bit of time.
Why, because I use lootification to add them to npc/enchanted loot items, last thing I want is some lv1 bandit equipped with armor/weapons that are as good as daedric/ebony or such because of dodgy keywords in their settings, and if you use perkma/skyre, you can end up with some seriously over powered gear, because of values in the armor/weapons sheets.
Thanks a lot! You were right, first I tried to combine the ESP files with the Master File inside the merged package but errors appeared. Then I made a new package including only the ESP files and works wonderfully! the Master File is required without being inside the merged file, it's like magic!
Does this work the same good for more complex mods? like in mods with scripts?