Jump to content

Make Vortex copy to non-mod folders


manicmoose99

Recommended Posts

Hello,

 

I'm trying to figure out how to support Vortex installation for my Valheim mod: https://www.nexusmods.com/valheim/mods/847

 

Valheim mods are generally through a framework called BepInEx, which exists under a folder of the same name in the game directory. Vortex automatically installs all the files from a mod into that folder it seems. However, I need to only install one file there, and the rest need to go in the base game directory <game_install>/valheim_Data/<subdirectories>

 

I'm trying to create a FOMOD to do so, but I haven't been able to get it to work. Here is a subset of what my config is looking like for what I've tried last to illustrate what I want to do:

 

<requiredInstallFiles>
<folder source="BepInEx\plugins" destination="plugins" />
<file source="valheim_Data\Managed\amplify_occlusion.dll" destination="..\valheim_Data\Managed\amplify_occlusion.dll" />
<file source="valheim_Data\Managed\netstandard.dll" destination="..\valheim_Data\Managed\netstandard.dll" />
<file source="valheim_Data\Managed\SteamVR.dll" destination="..\valheim_Data\Managed\SteamVR.dll" />
<file source="valheim_Data\Managed\SteamVR_Actions.dll" destination="..\valheim_Data\Managed\SteamVR_Actions.dll" />
<file source="valheim_Data\Managed\Unity.Subsystem.Registration.dll" destination="..\valheim_Data\Managed\Unity.Subsystem.Registration.dll" />
<file source="valheim_Data\Managed\Unity.XR.Management.dll" destination="..\valheim_Data\Managed\Unity.XR.Management.dll" />
<file source="valheim_Data\Managed\Unity.XR.OpenVR.dll" destination="..\valheim_Data\Managed\Unity.XR.OpenVR.dll" />
<file source="valheim_Data\Managed\UnityEngine.SpatialTracking.dll" destination="..\valheim_Data\Managed\UnityEngine.SpatialTracking.dll" />
<file source="valheim_Data\Managed\UnityEngine.XR.LegacyInputHelpers.dll" destination="..\valheim_Data\Managed\UnityEngine.XR.LegacyInputHelpers.dll" />
</requiredInstallFiles>

 

From this configuration, only the plugins folder gets copied, but it seems like alll of the other files are ignored. Any ideas on how I can achieve what I need here?

 

Link to comment
Share on other sites

After doing some research it seems like there actually isn't a good solution to this - I've seen some posts talk about just using a zip with the correct directory structure and changing the mod type to "ENB" in Vortex GUI will force it to install relative to game root - that almost worked except then the actual BepInEx plugin wasn't being installed to the BepInEx directory anymore for some reason - it's like it removed references to the BepInEx name and just put the plugins folder in the root - very strange... :sad:

Edited by manicmoose99
Link to comment
Share on other sites

Hey Pickysauraus - I probably didn't explain what my problem is very clearly. Here is my situation:

 

I have a BepInEx plugin mod where I have the regular BepInEx plugin. In the same mod I have files that need to be copied into <game_install>/valheim_Data in order for the mod to be initialized correctly. By default the way Valheim is configured with Vortex is that if it detects a BepInEx plugin, then it will copy all the contents to BepInEx, so I end up with this directory structure afterwards:

<game_install>/BepInEx/plugins/<my dll> <- this is good

<game_install>/BepInEx/valheim_Data <- I dont' want this, I need the contents of my valheim_Data folder to go into the actual game's valheim_Data folder

 

Probably some of the files I have in valheim_Data I could make work if I moved them into BepInEx with some reconfiguration of my mod, but there are a few that I don't think there is much I can do as they need to exist at the time the game starts before BepInEx loads any plugins to get things initialized correctly.

Edited by manicmoose99
Link to comment
Share on other sites

Hey Pickysauraus - I probably didn't explain what my problem is very clearly. Here is my situation:

 

I have a BepInEx plugin mod where I have the regular BepInEx plugin. In the same mod I have files that need to be copied into <game_install>/valheim_Data in order for the mod to be initialized correctly. By default the way Valheim is configured with Vortex is that if it detects a BepInEx plugin, then it will copy all the contents to BepInEx, so I end up with this directory structure afterwards:

 

<game_install>/BepInEx/plugins/<my dll> <- this is good

<game_install>/BepInEx/valheim_Data <- I dont' want this, I need the contents of my valheim_Data folder to go into the actual game's valheim_Data folder

 

Probably some of the files I have in valheim_Data I could make work if I moved them into BepInEx with some reconfiguration of my mod, but there are a few that I don't think there is much I can do as they need to exist at the time the game starts before BepInEx loads any plugins to get things initialized correctly.

 

 

This makes sense, because there are some Outward Mods that need this as well, otherwise they put EVERYTHING in the Bepinex Folder instead of one or two necessary files in the "Outward\Outward_Data\Managed\" folder

Link to comment
Share on other sites

I've got no experience with Valheim, but would guess you've got the same problem as with Skyrim, where the installer is "clever" enough to remove the \data\-directory then extracting the mod-files, unless you uses "Unpack (as-is)" but you can't really expect mod users to remember using this option.

 

The easy method to work-around Vortex deleting \data\-directory is, split the mod into two mod-archives, where first mod-archive has all the files going to games root directory (and sub-directories except \data) and the second mod has all files going to \data\-directory.

 

The more difficult method that hopefully would work is using FOMOD in the following way:

<file source="\root-directory-files\file1" destination="\plugins\file1" />
<file source="\root-directory-files\file2" destination="\plugins\file2" />
<file source="\data-directory-files\file1" destination="\valheim_data\file1" />
<file source="\data-directory-files\file2" destination="\valheim_data\file2" />
<file source="\data-directory-files\file3" destination="\valheim_data\file3" />

By not using \valheim_data\ in mod-archive you're at least sure Vortex won't put the files somewhere else during Vortex extracting of mod. Since \valheim_data\ now is part of FOMOD, hopefully Vortex won't change files destination, but you'll need to test what Vortex does in this case. Also, not sure if you in FOMOD need to create the \valheim_data\-directory before copying files or not.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...