Mods / Vintage Story - Mod Organizer 2 Support Tools

Tags: #Other #QoL #Utility
Author: Qwerdo
Side: Both
Created: Sep 8th 2024 at 11:34 AM
Last modified: Apr 2nd at 9:42 AM
Downloads: 280
Follow Unfollow 34

Latest release:
VS MO2 Support Plugin v2.2.0.zip


This suite adds support for vintage story in mod organizer 2 (MO2) and offers extra functionality.
Using this tool, you can more easily organize your mods and manage different mod presets and profiles.

 

 

Features:

  • Easily install mods in MO2
  • Organize your mods in any order you'd like
  • Add seperators to categorize your mods.
  • Add notes to any mod to help organize.
  • Use different profiles for different modpack installations.
  • Install mods directly from the modDB using 1-click-install
  • Update mods with 1-click-install
  • Manage mod config presets

 

 

Spoiler! How it works: (not important if you don't care)

When you install a mod with MO2 it isn't actually added to vintage story's mods folder. Rather, it has it's own seperate folder inside the MO2 program.

MO2 uses a virtual file system. This means that when you start vintage story, it will take all the mods you installed through MO2 and makes virtual links to
vintage story's mods folder. This means that vintage story will think the files are in the right place when physically, they're installed in MO2. Once you close down vintage story, all the virtual links are removed again and you will have a clean VS installation.

 

 

 

How to install:

Obviously, it requires MOD ORGANIZER 2 , Scroll down to the downloads and download either the 7z file or exe file to install.

I recommend getting the 7z file and extracting it to it's own folder. This helps with isolating functionality between different MO2 instances.
Download the archive here and put the contents in your MO2 installation. It should be 2 folders: "plugins" and "Vintage Story MO2 Support"


Just point MO2 to your vintage story install folder and it should automatically use the right folders for mods.
When you open it for the first time it should give you a short tutorial on how to use MO2.

 

How to use:

  • Setting up 1-click install:
    Run VS MO2 Manager.exe, enter both your Vintage Story installation path & your MO2 Instance path. (IMPORTANT: POINT THE MO2 PATH TO THE VINTAGE STORY INSTANCE, IF YOU'RE USING A GLOBAL INSTALLATION, THIS IS NOT THE MO2 INSTALLATION.)
    If you're not sure, you can open mo2 and click the little folder icon to the right of the profile selection and click on "Open Instance Folder". This shoudld contain a mods and dowloads folder besides a  bunch of other. This is where you should point it.

    Now you can press the "set ModDB Protocol" button and it will setup the program to use MO2 to install mods instead of the default vintage story.
    To reset the behaviour back to defauly, simply click the "Reset ModDB Protocol" Button.

    Now, when you press a 1-click install link on ModDB it will download the mod and move it into the appropriate folder in MO2. You might have to refresh MO2 to see the effect.
    By default, it will keep the old version in a folder in case you want to quickly revert.

    Optionally, you have the choice to have old versions deleted on downloading a new version, effectively updating the mod.
    You also have the option to keep any downloaded archives in MO2
    Simply tick the boxes to make your choice.

 

  • Manually installing mods:
    Included in this package is a custom installer plugin for MO2.
    This means that, when installed, whenever you install a mod through MO2 manually, it will simply make a new mod and move the archive to the correct folder without unpacking.

    To do this: Click the second button on the top toolbar with the disk icon. Point MO2 to the archive you want to install. The installer will take it from here and your mod will be installed correctly.

  • Managing config presets:
    You can manage different mod config presets using the tool as well.
    When first starting the tool, the dropdown menu will be empty. To save your current config files, press the "Save current set" button and enter a name.
    This will make a copy that you can always return to. Make as many presets as you like.

    If you want to load a preset you've made, select your preset in the dropdown menu and press the "Load selected set" button. This will make a backup of the files currently present in your mod config folder in case you didn't mean to load a new one
    It will then remove all old config files and copy all files of the selected preset into your mod config folder.

    Highly recommended to use in combination with MO2's profiles feature so you can match modlists with config presets

 

  • Migrating mods into MO2:
    Run VS MO2 Manager.exe. Click on the "Migrate Mods" button. This will prompt you to select a folder containing your mod zip files.
    Select your folder and it will import all your mods into MO2. It doesn't delete anything for safety reasons.

 

  • Starting VS Through MO2
    Once you have installed and organized your mods to your liking (don't forget to enable them), press the Run button on the top right (make sure Vintage Story is selected in the menu to the left of it).

 

For those who use the Mods Updater, If you press the button with the two cogs at the top of MO2, press the plus button on top and point to the exe file of the Mods updater. This will add the program to the executable list. Now you can run the program through MO2 just like you would launch the game and it will work with the virtual file system. The only caveat is that the newly updated mods will appear in the overwrite folder in MO2 all the way at the bottom of the mods list. You can simply double click overwrite and drag the files to their respective mods in the list to but them back in their place. I don't think I can make a workaround for this but it's a small problem.
Also, the plugin is setup to use vintage story's installation folder's mod folder, not the one located in the documents folder. You might have to configure Mods Updater to point here instead.

 

Reminders:
If you are using a global installation of MO2 that handles multiple instances of different games, there's a couple things to keep in mind:
- Point the manager tool to your instance installation and not your MO2 installation. See the "setting up 1-click install" for more info

- The installer plugin automatically has the highest priority and this is installed in the plugins folder. This means that it will also register for any other instances you might have and therefore use the custom installer there too.
   You will have to manually disable the plugin in the plugins menu of the other instances. Simply press the wrench and screwdriver icon on the top to go to the settings of the instance, go to the plugins tab, find "VS Archive Installer" under the installer section and disable it.
   It should now be back to default behaviour.

 

Known Problems:

  • Rare bug if the file contained in the ModDB API contains an illegal character (Very rare, only encountered once and will throw a very obvious error)

 

Planned Features:

  • Profile specific config files DONE!
  • Download directly to MO2 with click-to-install DONE!
  • Improved 1-click install support (no more re-archiving) DONE!
  • Custom installer plugin  DONE!
  • Smarter plugin behaviour

 

If you encounter any issues, bugs or anything else, please let me know.
The source code is included in the src folder if you're curious

 

Thank you to: VoiCat, ZTBot and Yallendallis for helping with testing

Mod Version Downloads Release date Changelog Download
2.2.0 105 Apr 2nd at 9:42 AM VS MO2 Support Plugin v2.2.0.zip

- Added a custom installer plugin, no more manually rearchiving files... yay

2.1.0 17 Apr 1st at 10:02 PM VS MO2 Support Plugin.zip

-Added support for managing config presets

2.0.0 17 Apr 1st at 6:08 PM VS MO2 Support Plugin.zip

- Rewrote the whole suite into a single exe with a neat UI.
- Python no longer required
- Changed description for clarity

1.3.0 50 Mar 23rd at 10:07 PM VS MO2 Support Plugin v1.3.0.zip

1-click-install now directly installs mods into the right folder with cleaned up names

Don't forget to run the URL Handler Tool first or the 1-click install won't work

1.2.0 14 Mar 23rd at 8:51 PM VS MO2 Support Plugin v1.2.0.zip

-Added Support for 1-click-install with MO2  Read the description for instructions

1.1.1 32 Mar 22nd at 5:53 PM VS MO2 Support Plugin v1.1.1.zip

Improved the python script for nicer looking folder naming by reading the modinfo.json directly

1.1.0 18 Mar 22nd at 2:26 PM VS MO2 Support Plugin v1.1.zip

Added a python script to make importing mods to MO2 easier

1.0.0 27 Sep 8th 2024 at 11:36 AM Vintage Story MO2 Plugin.zip

Inital Release


31 Comments (oldest first | newest first)

💬 Qwerdo , Jun 4th at 10:53 AM

Kainda Ah yes, sorry.

I meant that the tool i wrote won't work with 1-click install

💬 Kainda, Jun 3rd at 4:06 AM

Qwerdo Thank you so much!

On further testing, the game's built in mod manager and one click install DOES work, provided one is using the Linux version of the game (i.e. the one you get from Flathub). I still run it through Lutris though, to manually set the game to run via my GPU.

Its MO2 that doesnt work, nor (as far as I looked) has a linux version.

Gonna look at the DIscord.

Thank you so much!

💬 Qwerdo , Jun 2nd at 4:23 PM

Kainda I have some experience with linux but not really with MO2.

You might wanna check the MO2 discord for help.
However, i can tell you right now that the 1-click install won't work on linux since it uses windows' registry system.
I'm sure it's possible but i haven't spent any time looking into that. 
I'm a little busy the coming weeks but if I have time i might see if i can add an update for linux support

💬 Kainda, Jun 2nd at 11:21 AM

Thank you for the Plugin! I just learned of the MO2 because of it, saved me alot of headaches organizing my mods.

I have a question though. I just shifted to Bazzite (LInux, Fedora based). While Vintage story does have a Linux version, I cant seem to get Mod Organizer 2 working.
What I tried was running it through Lutris and Winetricks. Even had latest DirectX and C++ redistributable installed. No luck.

Do you have any suggestions? Any help in this regard would be greatly appreciated

💬 LyotBernandez, Apr 15th at 2:58 AM

@Qwerdo

Thanks for the help. Setting the default mods path did the trick. Just tried it out and it worked perfectly.

💬 Qwerdo , Apr 14th at 3:33 PM

LyotBernandez

Oh, and as for the overwrite file...

Whenever any file gets created/downloaded/generated etc. MO2 will put it in a special "overwrite" mod because it cannot know to which mod this file belongs to.
If it's not unique it will just replace the old one.

So what happens when you run mods updater is the following:
1. mods get virtually moved to the mods folder.
2. mods updater checks for updates.
3. mods updater deletes old mods
4. mods updater downloads new mods
5. MO2 adds these new mod zipfiles to the overwrite becuase they have a new unique name ("modname_v1.0.zip" --> "modname_v1.1.zip")

So the best thing to do is to double click the "overwrite" mod at the bottom of your MO2 mod list and drag and drop the updated zipfiles to their corresponding mod in MO2's modlist.

💬 Qwerdo , Apr 14th at 3:28 PM

LyotBernandez

By default i believe mods updater uses the default location of "C:/Users//Appdata/Roaming/VintagestoryData/Mods"
I configured the mod organizer plugin to use the base game installation folder's mods folder for complicated reasons but it boils down to: Having your mods on the same disk as the game for effeciency.

To use mods updater with the mods you have installed through mod organizer, you have to add it to mod organizer's executable list.
To do this, press the button at the top with the cogs. This should prompt a new window. Click the plus button on the top left and select "add from file...".
Now you can point to where the mods updater executable is, wherever that may be.

Click OK or apply. Now next to the run button you should be able to select mods updater.
When you run mods updater through MO2, it will first (virtually) move your mods to the correct location, then run mods updater.
What's important is that mods updater is also configured to use the base game installation folder's mods folder and not the "C:/Users/I'm not sure if it prompts you the first time you launch it, but if not, You can edit the config.ini file in mods updater's folder to change the path under [ModsPath]

When mods updater just closes it probably means it's not finding any mods so check if you pointed it to the right location and that you're launching it through MO2.

Let me know if this works

💬 LyotBernandez, Apr 14th at 10:08 AM

I'm trying to get Mods Updater to work with MO2, but I it keeps closing itself on startup. I've already tried reinstalling it to have a new config.ini made, but that didn't work either. I don't have a mods folder in my documents folder, and have tried using the mods folder from MO2. Any help or guidance would be nice.

💬 ZTbot, Apr 2nd at 6:46 PM

The update totally fixed it for me and it works wonderfully.

💬 Qwerdo , Apr 1st at 6:10 PM

VoiCat Yallendallis

I've uploaded a new release if you guys could see if your problems still persist that would be great. There's no more python requirement and it doesn't use the batfile anymore but directly uses the exe. Next I'll be working on getting config files to be included.

💬 ZTbot, Mar 30th at 5:40 PM

Qwerdo Ill try both methods again and report back if it works.

💬 Qwerdo , Mar 29th at 10:42 AM

ZTbot This is what it should be doing already. I think the problem lies with the type of installation, portable vs global. As long as the MO2path you're entering contains the mods folder and the downloads folder from the vintage story instance it should work i think

💬 ZTbot, Mar 28th at 8:46 PM

Mine also says the same thing as Yallendallis, is there some way to work it to output the 1 click install to a specific folder like the mod folder or is that what it already does and we are messing up on our end?

💬 Yallendallis, Mar 28th at 4:09 AM

Yeah mine says: "C:\Modding\MO2\Vintage Story MO2 Support\VSDB_MO2_Handler.bat" "%1" Qwerdo

💬 Qwerdo , Mar 27th at 8:55 PM

ZTbot Yallendallis

I've never used MO2 without portable mode so i think that's where the issue lies. As for the paths. If you're a little techsavvy maybe you could help me figure something out. If you're one windows, type in "regedit" in the start bar. This should prompt the registry editor. On the left, you should be able to browse to "HKEY_CLASSES_ROOT\vintagestorymodinstall\shell\open\command\". Click on the command folder. In here should be an entry called (Default) of type REG_SZ.

The data field is what gets run in the windows shell terminal when a 1-click-install link is clicked.

Could you check what it says here for you?
Without any edits it should be "\Vintage story.exe" -i "%1"

This means that it will run your vintage story game with the -i argument and the %1 is the specific data that is given with the 1-click-install link (modname and version)

After you use the tool to change the protocol it should look like "Your MO2 Installation\Vintage Story MO2 Support\VSDB_MO2_Handler.bat" "%1"

The bat file only serves as an intermediary between the link and python because opening a python link with arguments gets real messy with apostrophe's. This should be fixed once i turn this into an .exe

 

Anyways, thanks both of you for the info so far!

💬 ZTbot, Mar 27th at 1:09 AM

Qwerdo So I was meant to select the instance for vintage story rather than just the file with MO2 in it? also here is the file path i had in the config file.  Also there was nothing in in the mods or download folder.

vspath = C:\Vintage story game\Vintagestory
mo2path = C:\Modding\MO2

💬 Yallendallis, Mar 26th at 1:13 AM

That said, just using it now, currently working fine! I'm quite glad about this project because I was just thinking this was a game due for mod organiser support 

💬 Yallendallis, Mar 26th at 1:02 AM

I had the same issue with the one click installer, maybe I missed it but it didn't seem clear to set the vintage story MO2 instance path instead of just the MO2 folder (which tbf might work if you use portable mode) regardless using the path provided when you open up the instance folder through the MO2 vintage story instance made the one click installer work for me. (I.e ...\AppData\Local\ModOrganizer\Vintage Story)

💬 Qwerdo , Mar 25th at 11:14 PM

ZTbot Did you set your VS directory and your MO2 directory using the tool? You have to enter the path without the .exe at the end (example: "E:\Games\Vintage Story" and not "E:\Games\Vintage Story\VintageStory.exe")
you can check the config.ini it should've generated for your current settings. it should look something like this:

[PATHS]
vspath = E:\Games\Vintagestory
mo2path = E:\Games\MO Instances\Vintage Story

Could you check if there's anything in either your "\<MO2 Installation>\mods\" or your "\<MO2 Installation>\downloads\" folders

I'm also currently rewriting the whole suite to be one package in an exe with a GUI and no python requirement so maybe that will solve it.

💬 ZTbot, Mar 25th at 9:49 PM

I followed the instructions for the python 1 click installation method and all that happens is that the bat file pops up for half a second and the mod is not even downloaded.

💬 VoiCat, Mar 24th at 12:22 AM

Qwerdo thank you for your efforts, I appreciate it

💬 Qwerdo , Mar 23rd at 10:17 PM

VoiCat I updated the suite a couple times. As long as you have python (Which is really easy to install) you can now use the 1-click install feature in modsDB to instantly install the selected version of the mod into the right place in Mod Organizer

💬 Qwerdo , Mar 23rd at 10:01 AM

Junrall It does not, but check what I wrote on Mods Updater in the description. If you run that every once in a while it will update all your mods for you.

💬 Junrall, Mar 23rd at 1:31 AM

lol. I don't suppose this checks for updates?? I laugh because I know the answer but have a smidgen of a smidgen of hope that this will check for updates.

💬 Qwerdo , Mar 22nd at 6:13 PM

VoiCat Hmm, i didn't think of that. I've been using the custom script it wrote. I just updated it so it makes the names a lot nicer looking. It processed my 143 mods in a blink of an eye

💬 VoiCat, Mar 22nd at 6:08 PM

Thanks for the updates, though installing mods can actually be less tedious than what you're describing: first of all, you can send downloaded mod archives to the download folder of MO2, then you double click it and it should give you the manual installation method, which opens up the mod's filetree, you right click the <mods> folder at the topc, create directory, name it wtv and put all the mod files under that new directory.

It's still tediuos, but less so than either of the ways you've described

💬 Qwerdo , Mar 22nd at 2:24 PM

VoiCat I wrote a quick python plugin that takes all archives in the chosen folder and copies them to their own folder. you can just put these folders in the MO2 mods folder and refresh in the program to quickly import it. Uploading it now

💬 VoiCat, Mar 22nd at 12:05 PM

Huh, weird. I'm still gonna use the existing version because I prefer this over say, VSLauncher, but I do hope you or someone else will release a better itteration of the idea (unfortunately I have far too little programming knowledge to do it myself)

💬 Qwerdo , Mar 21st at 9:17 PM

VoiCat I'm not sure how you found this mod since i put it on a hidden mode. It's not really working currently unfortunately. I've been thinking about writing a custom installer plugin that doesn't unpack the downloaded archive so that it will work natively with the game. Like you said, right now it's incredibly tedious

💬 VoiCat, Mar 21st at 11:32 AM

In terms of an actual feature, it'd be great if we could make profile-specific mod configs, though I'm not entirely certain if that's doable with how VS does things.

💬 VoiCat, Mar 18th at 9:23 AM

Hello, I found this utility and it still works.

I did notice that when installing a mod, MO2 inputs its files into mods' folder itself and you have to manually make a mod folder for them. It's not that much of a problem, but it is still tedious, so is there any chance this process could be automated?

 (edit comment delete)