Introducing the Driftmoon Mod Switcher!

Introducing the Driftmoon Mod Switcher!

Postby Amarth » Fri Jun 18, 2010 10:48 pm

Image

Download:
http://www.olog-hai.be/files/driftmoon-mod-switcher.exe

Notes:
Requires a recent .NET framework version, I think 3.5. Might require to be run as administrator if your Driftmoon directory is protected (eg in Program Files).

Features:
* Automatically tries to detect the Driftmoon installation directory! (If it's in program files)
* Remembers your Driftmoon directory! (If it behaves like it should)
* Lists your installed mods! (If nothing goes wrong)
* Change your current mod! (If the options file isn't too exotic)
* Install a new mod! (If you have previously downloaded and extracted it somewhere)
* Install a Light Mod, a mod which doesn't ship all the heavy files but copies them over from the main mod!

Why?
Created because I didn't want to mess around with administrator mode and notepad and everything. That sucked. Trivia: I first named it driftmoon-mod-installer but then Windows 7 kept bugging me with "it looks like this hasn't installed correctly!" so I just renamed it an now Windows 7 is silent. Sometimes I wonder what kind of drugs they distribute at Microsoft.

Changelog:
01/09/2010: Color-code the listbox and remove the current mod UI elements, "please wait" window gets closed on error now
30/08/2010: Add installing from light mods, add log output, fix some bugs
18/06/2010: Initial release

Source:
Under GPL v3. Found at http://github.com/verhoevenv/driftmoon-mod-switcher

Usage:
Make sure Driftmoon is not running. Run from anywhere, probably as administrator. Click "change" on the top right if the detected Driftmoon directory is wrong or doesn't appear. The current mod (in the options file of Driftmoon) is shown in bold in the list. Doubleclick in the list of installed mods on the mod you want to switch to. Start Driftmoon and play mod. To install a new mod, download the mod, unzip or unrar to somewhere, then click "install downloaded mod [...]", navigate to the extracted folder and the mod should be installed.

The list is color-coded:
* Bold means the mod currently playing
* Default black means the mod is ok and can be made the play mod
* Gray means the mod is missing some dependencies, based on the readme. Double-click to install the dependencies
* Red means at least one dependency of the mod could not be found in mainmod. This should not happen
* Green means this is not a mod directory, but has a mod directory one level down. This is for those weird people who package their mod like this and then extract the mod in the Driftmoon folder, thinking the program can magically detect what is going on. Well, it can now. Double-click to install the mod properly.
* Purple means a directory that is none of the above. Like when you stash your porn in the Driftmoon directory.

Bugs:
Report bugs in this thread or on IRC. I am not responsible for damage but I doubt any will be caused. Not serious damage anyway.
* It is absolutely possible to install random directories as "mods", then probably get Driftmoon to crash. There's a basic check built in but just don't do this.
* Messed up options.ini files might cause the tool to get confused
* Not sure what happens when you install a mod that already is installed.
* The refresh mods button doesn't actually work.

Feature requests:
Feature requests also here or on IRC, but preferably here.
* Needs a progress bar when installing mods.
* Making it download and install mods (ie a modbrowser) is a possibility but not needed with the fewmods we have now, and perhaps that problem already will get solved by Ville.
* I might support unzipping automatically. Not unrarring though. Licensing issues.

Current mods:
Port Potomac by Pete
Trials of Darkness by Endymion (newest version has compatible light versions)

Enjoy!
Last edited by Amarth on Wed Sep 01, 2010 11:27 pm, edited 5 times in total.
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Endymion » Sat Jun 19, 2010 2:45 pm

Changing and installing mods seems to work perfectly fine :) and certainly makes it a lot easier to switch between mods, but it never remembers my Driftmoon directory so I need to set it again every time I open it.
Endymion
 
Posts: 35
Joined: Fri Mar 21, 2008 12:25 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Amarth » Sun Jun 20, 2010 1:08 am

Endymion wrote:it never remembers my Driftmoon directory so I need to set it again every time I open it.

Fixed in new version. Just redownload from above.

EDIT: Source released. See http://github.com/verhoevenv/driftmoon-mod-switcher
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby ville » Mon Jun 21, 2010 11:39 am

Ooh! Very nice. :) I really am going to add the functionality to the game launcher, but it will be months or possibly half a year from now, so this should be useful until then.
User avatar
ville
Admin
 
Posts: 1011
Joined: Fri Feb 21, 2003 11:49 am

Re: Introducing the Driftmoon Mod Switcher!

Postby Amarth » Mon Aug 30, 2010 9:14 pm

New version, which allows the installation of (compatible) light versions of mods.

Light versions are versions that don't ship with all files, but reuse files from the main mod. This way, download size can be minimized, easily going from 40-ish MB to 5-ish or less.

For modmakers: to get the tool to copy over some data from mainmod to your mod, include a readme file (defined as a text file which name contains "readme" somewhere) in the root folder of your mod. In this file, list on separate lines, and with nothing else on that line, the paths you want copied. You can add both directories and single files. The rest of the readme is ignored, only the lines which contain nothing but a path are used, so you can keep the readme human-readable. For an example, see the lite mods of Endyminion, if he already updated his post with the newest versions.

Have fun.
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Venom31 » Tue Aug 31, 2010 9:47 am

Amarth wrote:...a text file which name contains "readme" somewhere...

This may be pretty ambiguous. I think it doesn't need that "human-readability" - just a normal readme.txt and some installation.dat or something with the format you specified. Just a thought.
Venom31
 
Posts: 230
Joined: Sat Sep 26, 2009 1:36 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Amarth » Tue Aug 31, 2010 11:26 am

It is pretty ambiguous. But the requirement of having paths on a line each should not give too many false positives. And if it does give false positives I'll be in contact with the modmaker soon enough.

I don't want to put a burden on modmakers with yet another hard protocol.

Besides, this is only for a few months, until Ville gets his in-game mod functionality working. And if that doesn't happen for any reason we can still review the process.
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Venom31 » Tue Aug 31, 2010 11:58 am

Amarth wrote:It is pretty ambiguous. But the requirement of having paths on a line each should not give too many false positives.

No-no, you mean it will read all text files with "readme" in name looking for the specified format? If so, it's ok, even more if the paths may go not from the beginning but somewhere in the end :P
Venom31
 
Posts: 230
Joined: Sat Sep 26, 2009 1:36 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Amarth » Tue Aug 31, 2010 12:22 pm

Yes it will read all files with "readme", and yes it will search all lines in all these files for paths to install.

Well, only readme files in the root directory of your mod.

If the installer doesn't do what you expect it to do, there's some logging output in the bottom textbox now, so you can hopefully see what goes wrong. With all of the fuzziness going on now (apart from searching all readme-like files, there's also some searching for the exact mod dir, and maybe some other parts where there's some leeway), it was pretty much needed to have the program show you what was going on.
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Amarth » Wed Sep 01, 2010 6:46 pm

New version! Hopefully fixing some confusion Endymion has been having.

Now to start refactoring the code...
User avatar
Amarth
 
Posts: 1240
Joined: Sun Aug 01, 2004 11:24 pm

Re: Introducing the Driftmoon Mod Switcher!

Postby Vacuus » Thu Sep 02, 2010 3:51 am

I like how much you've downplayed something that took so much effort to implement :P
User avatar
Vacuus
 
Posts: 181
Joined: Sun May 29, 2005 9:45 am


Return to Driftmoon

Who is online

Users browsing this forum: No registered users and 1 guest

cron