Email: Password:
Forum » Introducing the Driftmoon Mod Switcher!

Introducing the Driftmoon Mod Switcher!

Amarth 10 years ago

<!-- m --><a class="postlink" href=""></a><!-- m -->

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) or if you have the pre-order version (it requires registry stuff).

* 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!
* Auto-detects Driftmoon version! For those cheap bastards who still have the preview version. Only semi-tested.

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 and now Windows 7 is silent. Sometimes I wonder what kind of drugs they distribute at Microsoft.

15/11/2010: Add support for pre-order version, which uses the registry to store the current mod
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

Under GPL v3. Found at <!-- m --><a class="postlink" href=""></a><!-- m -->

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.

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.
* Might profit from some tooltips in addition to the color-coding.

Current mods (pre-order version):

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

Endymion 10 years ago
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.
Amarth 10 years ago
"Endymion" said:
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 <!-- m --><a class="postlink" href=""></a><!-- m -->
ville 10 years ago
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.
Amarth 10 years ago
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.
Venom31 10 years ago
"Amarth" said:
...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.
Amarth 10 years ago
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.
Venom31 10 years ago
"Amarth" said:
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
Amarth 10 years ago
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.
Amarth 10 years ago
New version! Hopefully fixing some confusion Endymion has been having.

Now to start refactoring the code...
Vacuus 10 years ago
I like how much you've downplayed something that took so much effort to implement
Amarth 9 years ago
New version! Now maybe compatible with new Driftmoon!

Note that you almost certainly need to provide Administrator rights to the program now, due to the mod being stored in the registry since the new version.

It'll try to autodetect if you are still running the old versions. Mods don't seem to be compatible so I have no idea why you'd want to, but hey. Power to the people.
ville 9 years ago
Great work Amarth!

The registry shouldn't need admin rights, since the Driftmoon registry is in the user specific section.
Amarth 9 years ago
It does, however. I think the reasoning is that my program has no rights to modify your program's settings. Well, at least on Windows 7 it's like that, might be different on other Windowses.

I also make a checksum of the .exe to determine the version, this also seems to require admin rights when it's in Program Files.

Of course, everyone is free to experiment, if it works without admin mode for you, great. If I did something wrong and anyone can provide a patch to make it need less permissions, even better.
MageKing17 9 years ago
"Amarth" said:
I also make a checksum of the .exe to determine the version, this also seems to require admin rights when it's in Program Files.
Vista and Windows 7 don't want anything doing anything to the Program Files folder, basically. I never install anything there unless it was made for Vista/Win7 and takes it into account.
Forum » Introducing the Driftmoon Mod Switcher!

Post Reply

Your email:
Your name: