[RELZ] Bain for Mash

Post » Sat May 28, 2011 1:06 pm

Bain for Mash
Screenshot: http://wrye.ufrealms.net/images/Wrye_Mash_Bain.png
Download: http://wrye.ufrealms.net/#WryeMash
Docs:
* http://wrye.ufrealms.net/Wrye%20Mash.html#InstallersTab
* http://cs.elderscrolls.com/constwiki/index.php/Bain (Written for Wrye Bash, but mostly applies to Bain for Morrowind.)

Bain is a full featured mods installer now available in Wrye Mash. It you've been using Mash's Replacers featue, this is better. A LOT better. If you've used OBMM or MWMM, I think that you'll find Bain superior to them in many ways (though not all ways, e.g. BSA editing). If you've been using the (recently released) Bain for Oblivion, you'll find this almost identical. (Lets take a moment to give thanks to the guy who invented Cut and Paste! Bain for Oblivion took me a month to write. Bain for Mash took me about eight hours to adapt from the Oblivion version.)

I'll assume here that most people are not familiar with OBMM (or Bain for Oblivion), so here are the highlights:
* Bain installs and uninstalls mods.
* It does not require special formatted archives, but will instead work with downloaded zip, 7z and rar files. (But not ace files or exe installers -- you'll need to convert those.)
* To add a given mod package to Bain, just drop it in the Oblivion\Installers directory and then go the Mash Installers tab.
* Bain has certain requirements for the directory structure of the archives it scans. About 90% of mods will work with no changes. Others will require some re-structuring. Bain provides some commands to make this quite easy.
* Aside from mod archives, Bain supports mod projects. Physically, these are just unpacked archives, i.e. directories. However, Bain also provides some special commands that make it easy to convert archives to projects, and to synchronize projects with the Data Files directory. In other words, Modders will find projects very useful for managing their mod projects.
* Bain has a basic concept of package order. Packages with lower order will not overwite mod packages with higher order.
* Bain also has several "annealing" features. I.e. if a given mod package has overwitten files installed by lower order mod packages, and that package is then un-installed, Bain will automatically reinstall the files from the lower order mods that were previously overwritten.
* Bain provides extensive conflicts reporting information. When you review mod pacakges, you'll be able to see for exactly which files they conflict, which files are missing, which are mismatched, etc.

PS: A moment of appreciation to Timeslip -- he's always been helpful to me with sharing code and giving advice; More than that, his tools have inspired me to do more. MGE in particular, when I first tried it a couple of months ago, really inspired me with an idea of how long these games can live. That in turn kicked me into a long term simplication project for Oblivion modding. Bain for Mash is a spinoff of that. So, it all kind of comes back around, huh? Group Hug! :) And he's been very nice about my "Replace OBMM with Bain!" campaign.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Sat May 28, 2011 3:51 pm

Refreshing page ... Refreshing page ... Refreshing page ... can you tell I'm really eager to try this out? ;)
User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Sat May 28, 2011 2:23 pm

Whoa! I didn't know a new version was being worked on! I can't wait for this. I use Mash all the time :woot:
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Sat May 28, 2011 9:15 pm

So this new version will install mods as well as everything else? Any chance it will create a merged objects esp?
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Sat May 28, 2011 11:41 am

Ah fantastic, you have managed to turn my utterly craptastic day into an okay one. Thanks for giving this to us! :goodjob:
User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Post » Sat May 28, 2011 2:42 pm

As you all know, I'm really not active in Morrowind anymore. Mash had all of two releases in 2008 (vs. hmmm... (this is going to be scary) 107 releases for Wrye Bash). However, the recent addition of Bain to Bash was very easy to port to Mash, and I do still play MW somewhat.

So, in short... No, this is not a sign of more Mash releases. Pretty much a one-off. I might keep my eye open for a few more "really easy to do" opportunities, but don't hold your breath. (RL. And I'm pretty busy on Oblivion projects.)

Value of Mod Installers: I was pretty late to appreciate mod installers. But they really have advantages (especially when you want to try a large mod, and then quickly uninstall it if you don't like it).

Value to Players: Bain is really nice. I'm not exactly short on ego, but trust me, Bain is pretty sweet. Easy to use and very powerful. The ability to see exactly how various mods are conflicting is just very useful.

Value to Modders: I'm still an active modder, so when I designed Bain, I designed it to be as useful to modders as it is to players. In a real sense, you now use Bain as a modding project manager. It just makes it dead easy to organize and release your mods. It's even useful for dealing with those little mini-pacakages that different members of a mod team exchange between themselves.
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Sat May 28, 2011 8:10 pm

Awesome.... I can't wait to try this out.... downloading now :D
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Sat May 28, 2011 8:29 am

Thank you!


:)
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Sat May 28, 2011 5:00 pm

Hmm, so far I have not been able to get it to work. I only get a Notepad-like window flashing up shortly. I reinstalled Python 2.5 and "wxPython 2.8.0.1 ANSI for python 2.5" and updated the Shortcut to mash.py accordingly. I also removed all traces of the previous Mash installation in case something was interfering with the new one. Here's the bugdump - what am I doing wrong?

F:\Games\Morrowind\Mopy>mash.py 0
Traceback (most recent call last):
File "F:\Games\Morrowind\Mopy\mash.py", line 19, in
app = masher.MashApp(stdOutCode)
File "f:\Programme\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7748, in __init__
self._BootstrapApp()
File "f:\Programme\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 7345, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "F:\Games\Morrowind\Mopy\masher.py", line 3205, in OnInit
size=settings['mash.frameSize'])
File "F:\Games\Morrowind\Mopy\masher.py", line 2678, in __init__
self.notebook = notebook = MashNotebook(self,-1)
File "F:\Games\Morrowind\Mopy\masher.py", line 2599, in __init__
self.AddPage(InstallersPanel(self),_("Installers"))
File "F:\Games\Morrowind\Mopy\masher.py", line 2336, in __init__
details=self, style=wx.LC_REPORT)
File "F:\Games\Morrowind\Mopy\balt.py", line 944, in __init__
gList.SetImageList(icons.GetImageList(),wx.IMAGE_LIST_SMALL)
File "F:\Games\Morrowind\Mopy\masher.py", line 555, in GetImageList
indices[key] = imageList.Add(image.GetBitmap())
File "f:\Programme\Python25\Lib\site-packages\wx-2.8-msw-ansi\wx\_gdi.py", line 6101, in Add
return _gdi_.ImageList_Add(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "hbmpMask" failed at ..\..\src\msw\bitmap.cpp(1757) in wxInvertMask(): invalid bitmap in wxInvertMask
User avatar
scorpion972
 
Posts: 3515
Joined: Fri Mar 16, 2007 11:20 am

Post » Sat May 28, 2011 4:30 pm

General Bainification: While most mods will work immediately, other mods will need to be restructured somewhat. Bain docs give some guidance for this, as does the CS page linked to in the first post.

I'm hoping that major modders will release their projects in bain-friendly structure (note that a bain-friendly structure is also manual install friendly). But of course, there are many mods that are no longer being updated that would benefit from Bainification. For Oblivion, I've actually gone ahead and re-packaged and re-released some such mods (esp. popular/complicated ones). Someone might want to take on a similar project for Morrowind -- keeping permissions in mind of course.

However, MW mods aren't nearly as complicated as the most complicated Oblivion mods (worst that I've seen so far there is Better Cities which required division into 42 separate sub-packages :eep:). So it's relatively easy for folks to do their own re-structuring.

Still a group effort might be nice.

Getting Started: Warning First, I haven't fully tested all features of Bain for Mash yet. But the Oblivion version is well tested, and the features that I tried for MW-Bain have been fine. But let me know if you run into bugs.

Now, as for getting started on your own... Here's what I've been doing, and I'm far from done...

* Dropped all of my old mod archives in the Installers directory.

* Go to Bain and slowly scan over them. If you luck out and get some greens, you can "Install Missing" on them immediately.

* Some mods require a bit of restructing. Use "Unpack to Project", then open the resulting project and restructure as needed. Keep doc sweeping in mind. Usually simple archives will work, but sometimes you'll need to define subpackages. E.g. Sil's clothing vendor has a non-alpha override. So that got divided into two subpackages:
00 Main
01 Non-Alpha

* Since I renamed a lot of my installed mods in the past, I have to use the http://wrye.ufrealms.net/Wrye%20Mash.html#ModNameAliasing feature a fair amount. I'm still chugging through that, but its fairly easy to do if you have the spreadsheet and Mash open at the same time.

* Other than that, I basically scan through my list of mod packages looking for mods that appear to be mostly installed and then do an "Install Missing" on them. Install Missing will install ONLY the missing files -- it won't overwrite any existing files. Which is useful since many mods have been cleaned and I don't want the cleaning undone. When you're scanning for such mods, the thing to do is turn to the Matchd tab, the scan down the mod package list. If you find one that looks installed, then turn to the Missing tab and see how much (if any) is missing there. If you're just missing a doc and/or esp, then you've probably got it mostly installed. If the esp is missing, then probably you just renamed the esp. In which case, use the Mod Aliasing thing. OR it may be that you installed the mod, and then merged it into a "collected clothes/armor/whatever mod". In that case, use espm filtering to turn off the esp since you're not using it anymore. That will likely reduce your missing list to just a doc file. Once you've figured that stuff, do a final check of the Missing tab, and if that looks okay, do the "Install Missing".

* As you gradually build up your list of mods, you'll likely end up with some Underrides and maybe some dirty mods. I strongly suggest that you DON'T anneal these away yet. Wait until you've got pretty much gone over the entire list and done an "Install Missing" on everything that looks right.

* Once you've finished with first pass through your mod package list, then try reordering mods as desired. In particular, make sure that in case of conflicts between various texture/mesh mods, that your preferred mod has a higher install order.

* At this point, you might want to start adding projects to protect your own files. E.g. you might create a "+Cleaned Mods" project to hold/protect all mods that you have cleaned. And of course, if you have your own custom mods, then create projects for them too. BE VERY CAREFUL NOT TO INSTALL OVER YOUR OWN CUSTOM MODS!!! Also generally, you want project packages for your own mods to be highest in install order, so move them up above the the ==Last== Marker.

* Finally, you may want to start uninstalling mods to remove the clutter related to them from the Data directory. It's probably best to start with the mods for which you're most sure that their resources are not being used by other mods. But if you make a mistake, you can always re-install them.

Okay, I realize that I just used a bunch of new terms (e.g. Anneal, Mod Aliasing). Those should become clear once you get a bit more familiar with Bain.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Sat May 28, 2011 12:08 pm

Psyringe: Bugger. Forgot to include the new icons. Hold on a bit for v82...
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Sat May 28, 2011 8:20 am

Psyringe: Bugger. Forgot to include the new icons. Hold on a bit for v82...

No prob. I'm looking at it this way; this will double the current number of Mash releases this year. ;)
User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Sat May 28, 2011 7:10 pm

Can't wait to try it out.
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Sat May 28, 2011 1:28 pm

Thank you, Wrye! :foodndrink:
User avatar
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Post » Sat May 28, 2011 9:31 am

New Version 82: Icons files
No prob. I'm looking at it this way; this will double the current number of Mash releases this year. ;)

:lol: Yep, that always cranks the number up.

Update: Yeah, the Bash code evolved quite a bit an is better at spotting those types of errors.
User avatar
Vicky Keeler
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:03 am

Post » Sat May 28, 2011 8:47 am

Finally, a definite handy & advanced tool for morrowind's mods management. Thanks! :goodjob:
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Sat May 28, 2011 4:36 pm

Downloaded 0.82. Mash starts now. :)

May have found another bug though: Immediately after Mash had started, I clicked on the "Installers" tab. This produced the following eror:

Traceback (most recent call last):
File "F:\Games\Morrowind\Mopy\masher.py", line 2541, in OnShowPage
self.GetPage(event.GetSelection()).OnShow()
File "F:\Games\Morrowind\Mopy\masher.py", line 2321, in OnShow
settings['bash.installers.enabled'] = balt.askYes(self,fill(message,80),self.data.title)
NameError: global name 'fill' is not defined

Mash didn't crash though. The installers tab was activated in the tab list, but wasn't displayed, the main display still showed the contents of the "Mods" tab which was selected when Mash started. I then switched to the "Save" tab, then back to the "Installers" tab. Now the "Installers" tab was displayed.

I then closed Mash and restarted it, and clicked on the Installers tab again. Now I didn't get the error. Instead, Mash started to scan my Data Files, which (given that this is a gargantuan 15 GB-installation) may take a while. ;)
User avatar
Izzy Coleman
 
Posts: 3336
Joined: Tue Jun 20, 2006 3:34 am

Post » Sat May 28, 2011 6:05 am

Downloaded 0.82. Mash starts now. :)

May have found another bug though: Immediately after Mash had started, I clicked on the "Installers" tab. This produced the following eror:

Traceback (most recent call last):
File "F:\Games\Morrowind\Mopy\masher.py", line 2541, in OnShowPage
self.GetPage(event.GetSelection()).OnShow()
File "F:\Games\Morrowind\Mopy\masher.py", line 2321, in OnShow
settings['bash.installers.enabled'] = balt.askYes(self,fill(message,80),self.data.title)
NameError: global name 'fill' is not defined

Mash didn't crash though. The installers tab was activated in the tab list, but wasn't displayed, the main display still showed the contents of the "Mods" tab which was selected when Mash started. I then switched to the "Save" tab, then back to the "Installers" tab. Now the "Installers" tab was displayed.

I then closed Mash and restarted it, and clicked on the Installers tab again. Now I didn't get the error. Instead, Mash started to scan my Data Files, which (given that this is a gargantuan 15 GB-installation) may take a while. ;)


I don't think it is a bug as mine did it also the first time. More than likely it needed to generate a file first before it was able to start scanning. Looking forward to this, as Mash is one of those programs I really can't play without.
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Sat May 28, 2011 6:37 am

New Version: 83 Bugfix (Hey! Maybe I'll get to 100 after all!)
This should fix that "fill" error.

Code History: Essentially Bash started out from Mash code base, but then evolved quite a bit from there. One of the things that I did at one point was to split some common functionality into separate files (bolt and balt). Those are now included with Mash package, but I'm no fully utilizing them yet. (Refactoring can cause errors of it's own as you fail to adjust everything.)

However, I'm doing a little refactoring now since I'm having to fix stuff anyway. (E.g. the "fill" function is something defined in balt.py.) You may see a few minor changes, but hopefully nothing will break. :rofl:

And I threw the version number into the title just so that I can keep track of which bugged version I'm releasing.

bnnfish: Nice to see you over on the Morrowind side too!
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Sat May 28, 2011 6:13 am

I'm glad you've been updating this :) It didn't work for me the first time. But it is going through and refreshing the installers now. It takes a while....
User avatar
luis dejesus
 
Posts: 3451
Joined: Sun Aug 19, 2007 7:40 am

Post » Sat May 28, 2011 4:05 pm

It took about three minutes for me. My Oblivion install took about five. But I don't have that many mods. Another Oblivion guy told me it took him about 17 minutes or so.

But that's a one time hit, thankfully.

BTW, it's not in the Morrowind docs, but it is possible to specify storing the Installers directory somewhere other than Morrowind\Installers. Useful for folks who want to store thei (perhaps huge) archive collection on another disk or partition. Specification involves copying bash_default.ini to bash.ini and tweaking the setting in it. See bash_default.ini for more info if interested.
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Sat May 28, 2011 7:55 pm

New Version: 84 Fix a bug. Screens Tab.
There was a bug in espm filtering of aliased mods. That's fixed now.

Ported screens tab over from Wrye Bash. (Another low haning fruit.) Forgot to include docs, but it's pretty obvious. Note that you can set screenshot related stuff through the column header menu.
User avatar
Luis Reyma
 
Posts: 3361
Joined: Fri Nov 02, 2007 11:10 am

Post » Sat May 28, 2011 6:01 am

* It does not require special formatted archives, but will instead work with downloaded zip, 7z and rar files. (But not ace files or exe installers -- you'll need to convert those.)

A suggestion here, quite a lot of compressed .exes can be opened using winzip or 7z. For example, most of Vagabond Angels stuff. I am not sure how the libs you are using work, however, have you considered attempting to open the .exe, and then throwing an error if that doesn't work?

Any chance of adding something like this?
http://www.gamesas.com/bgsforums/index.php?showtopic=837359
(Be warned, the code is horrible)


EDIT:
I still hold that you should ditch the shortcuts and go with a pyw file as a starter :P
User avatar
Syaza Ramali
 
Posts: 3466
Joined: Wed Jan 24, 2007 10:46 am

Post » Sat May 28, 2011 5:19 am

Sweet, this sounds very useful! I'm assuming that, unlike morrowind mod manager, this won't slow down dramatically when you get 100+ mods in there. That caused me to stop using mwmm and start installing mods the old-fashioned way, then using Mash to order the mod list. Now I can use one tool for everything again.

You've been such a blessing to the mod community ever since you joined! :bowdown:
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Sat May 28, 2011 4:04 pm

Shouldn't it be "Main for Mash"? :shrug:

Thanks Wrye and thanks Timeslip :thumbsup:
User avatar
Joe Bonney
 
Posts: 3466
Joined: Tue Jul 17, 2007 12:00 pm

Next

Return to III - Morrowind

cron