PC 20.4 new mod folder location

I have another idea, cos i'm digging in the DLL. This might be better for Alloc if he's lurking in here.

If TFP could make the ModManager.loadModsFromFolder method PUBLIC, then we can harmony patch the LoadMods method to make the game load overhauls from different directories.

Which then might be better for users regarding vanilla + several other mods for people who want that.

Just spitballing an idea. It puts a bit more work on us modders, but it might benefit users.

 
There's also a command in unity to just pull the games data path, which is what TFP are doing.


That's great if you're using Unity. Folks who are just making tools and installers using Python, C++, JOVIAL, Assembly Language, etc... can't call on Unity. I believe every runtime environment can find OS environment variables.

I'd suggest "symbolic links" to Mods folders as a solution, but that only helps Macs and Linux. The Windows equivalent is a Shortcut, but I'm not sure those are as seamless.

 
That's great if you're using Unity. Folks who are just making tools and installers using Python, C++, JOVIAL, Assembly Language, etc... can't call on Unity. I believe every runtime environment can find OS environment variables.

I'd suggest "symbolic links" to Mods folders as a solution, but that only helps Macs and Linux. The Windows equivalent is a Shortcut, but I'm not sure those are as seamless.
Except the game is literally built in unity, so what does python or anything else have to do with it?

Oh, and windows can do symlinks. I've done it before.

 
Last edited by a moderator:
I have another idea, cos i'm digging in the DLL. This might be better for Alloc if he's lurking in here.

If TFP could make the ModManager.loadModsFromFolder method PUBLIC, then we can harmony patch the LoadMods method to make the game load overhauls from different directories.

Which then might be better for users regarding vanilla + several other mods for people who want that.

Just spitballing an idea. It puts a bit more work on us modders, but it might benefit users.
I don't think it is a good idea to let the mod developer choose the dir. Bad for other platforms than windows, bad even for windows users when the mods dir suddenly appears at arbitrary places

PS: I just realized that even on Windows that %appdata% dir is per user, right?

So there is already a lowtech possibility to have installations with different mods, one per windows account. Or am I missing something?

 
Last edited by a moderator:
please don't make it take only %appdata% as mods source - for many people C: disk is a smallish SSD built MOSTLY for windows, i don't want it to be cluttered with mods, let alone that issue that people brought - inability to change mods on the run (expect for copying and deleting them - AGAIN on system drive, potentially shortening it's lifespan)

 
I don't think it is a good idea to let the mod developer choose the dir. Bad for other platforms than windows, bad even for windows users when the mods dir suddenly appears at arbitrary places

PS: I just realized that even on Windows that %appdata% dir is per user, right?

So there is already a lowtech possibility to have installations with different mods, one per windows account. Or am I missing something?
Yep, it is, but that's not an acceptable workaround since most users barely know what a zip file is. ;)

 
Except the game is literally built in unity, so what does python or anything else have to do with it?

Oh, and windows can do symlinks. I've done it before.


Because people write all sorts of apps to interrogate game files to do things like generate maps, install POIs, and more. They don't have to write them in Unity.

When those tools are distributed and installed, one of the first things those apps have to do is find the game files and/or the Mod files. The location of the game files has been highly variable, thus the Mods folder has been too. The recent change provides a way for tools to find the Mods folder because the advertised path includes the %APPDATA% environment variable. That is a handy thing.

I get that many people want to be able to have many different Mods folders for different installs. That's why I suggested using an environment variable created and installed by the game, instead of %APPDATA% which has other uses. Better, teach the game to look for a %7D2DMODS% environment variable pointing to a Mods folder, and if found use it. If not found, then use %APPDATA%. Then, folks who need to relocate the Mods folder, can just define that environment variable. If you want 20 different overhaul Mods, install them in different places and change the variable.

Symlinks in Windows?

Oh, well if they're fully functional, then we've got lots of options. Just make %APPDATA%/7days2die/Mods a symbolic link to wherever you really want your Mods folder to be. If you want to change between different Mods folders, change the symbolic link.

The last I messed with Windows symlinks, they weren't fully functional, but that has been a long time ago. Glad to hear there might be some support. Thanks!

 
I did then in Win 7, so yeah, they're functional.

HOWEVER, this is still not a viable alternative. You have no idea how many people I have to walk through manually installing mods because they seriously don't know how to deal with zip files.

A lot of the suggestions thus far are way above the tech level of most users based on my experience as both a mod author AND tech support for a gaming company.

 
Ease of installation is a reason to make an installer. How does the installer know where the Mods folder is? It can either...

  • ask the user -- as you say they don't know where it is, or
  • ask the environment -- provided for by TFP's use of the %APPDATA% environment variable.
But the complication is that %APPDATA% is a Windows convention shared by many applications. The user cannot change it, even if they knew how, because they clearly won't want all there other apps using that variable to put stuff elsewhere.

Ah, but you can make the Mods folder a symbolic link to someplace else. Then %APPDATA% remains useful.

Alas, as you say, a novice user probably cannot make a symlink either.

But, of course, those same users cannot find the game files either. So advocating keeping the existing system really isn't making anything any better. It is just the status quo.

An independent installer or mod manager could manage symlinks.

Eventually maybe the Game's Launcher will know of a registry of Mods and install the Mods via a built-in Mods manager. Well, we're probably not there yet. :)

 
The current method is WAY easier than AppData.

However, the documents folder would be easier than both. Also, you can access it on Windows, Linux and Mac OS in .NET (which all 3 platforms support).

System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

;)

 
Last edited by a moderator:
If all of the folder selections could be picked from the command line or the config file then that would solve everyone's problems.  Put all your stuff in the folders you want to keep them separate, point the executable at the config file (or command line options) for the game you're playing and have fun.  Create a separate shortcut for each configuration you want and you're off to the races.  This way you could do everything with a single download of the game, assuming you're not butchering the EXE file.  :p

If TFP really wanted to get fancy they could create a ServerConfig folder and pop-up a selection window to pick your config file when you launch if you have multiple files in this folder (and haven't designated your config file with command line options).

 
However, the documents folder would be easier than both.
Better than appdata, I'd say, but it doesn't really feel like the right place either. As an oversimplification; appdata is for settings, docs is for files you're working on.

I guess the issue is, mods are really neither; for modlets appdata might work - especially if the game had functions to manage import and selection of modlets (with save games remembering their mod load out etc). That would leave overhauls in a weird spot; almost deserving their own appdata - entries.. hmm, could that be plausible? (Not sure if I'm actually asking you or just pondering... :) )

 
Oh, and windows can do symlinks. I've done it before.


You're right. Thanks for the update. It is the "mlink" command for those who are interested.

This makes a nice work-around for my Prefab Editor / Parts in Modlets issue.

cd C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Prefabs\Parts>
mklink ZZParts /d "C:\Users\zzton\AppData\Roaming\7DaysToDie\Mods\ZZTong Prefabs\Prefabs\Parts"





Thanks for the tip, @KhaineGB.

For those who want to put their Mods folder elsewhere, and have the knowledge to use the mlink command, this approach should work for you.

Whether it is the ultimate answer to life, the universe, and everything, I'll let the debate continue...

 
Last edited by a moderator:
You're right. Thanks for the update. It is the "mlink" command for those who are interested.

This makes a nice work-around for my Prefab Editor / Parts in Modlets issue.

cd C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Prefabs\Parts>
mklink ZZParts /d "C:\Users\zzton\AppData\Roaming\7DaysToDie\Mods\ZZTong Prefabs\Prefabs\Parts"





Thanks for the tip, @KhaineGB.

For those who want to put their Mods folder elsewhere, and have the knowledge to use the mlink command, this approach should work for you.

Whether it is the ultimate answer to life, the universe, and everything, I'll let the debate continue...
Unfortunately, this only helps to move the folder off the C drive and Appdata. We still need to solve the issue of how to run multiple versions of the game with different mod sets.  Sure you could write a batch to run before you change versions to re-direct the symlinks, but that's not a great answer either. 

Going to head out and update my client to test a couple of things.

 
Unfortunately, this only helps to move the folder off the C drive and Appdata. We still need to solve the issue of how to run multiple versions of the game with different mod sets.  Sure you could write a batch to run before you change versions to re-direct the symlinks, but that's not a great answer either. 

Going to head out and update my client to test a couple of things.


Right. It isn't a complete solution for everybody, but its a possible solution for some.

 
Now compile all this talk about mlink and %appdata% etc and then try to find a way to tell or explain to a player that has NO programming or any “folder” tech knowledge that just wants to play the game!!

Why over complicate something that has worked for now?

Just KEEP the mods folder in the SAME directory as the core game folder

This game has been presented as “easy to mod”

How is that going to be productive if by closing or minimizing the options of doing that?

its like cutting a leg off to upgrade the other so it can run faster...oh wait

 
Last edited by a moderator:
SUCCESS!!

Ok so I tested it, and it worked perfectly. Unfortunately it is again something that some people will not be able to accomplish. (Khaine isn't kidding about people incapable of simply copying files out of a zip into the mod folder. I spent a few hours the other day with someone on the exact same thing.)

Step 1 - Copy/rename serverconfig.xml. For this example I am using "a20serverconfig.xml". You want the file different so it isn't reset with an update.

Step 2 - Edit the file to replace the following section starting at line 40.

<!-- Folder and file locations -->
<property name="AdminFileName" value="serveradmin.xml"/> <!-- Server admin file name. Path relative to the SaveGameFolder -->
<!-- <property name="UserDataFolder" value="absolute path" /> --> <!-- Use this to override where the server stores all generated data, including RWG generated worlds. Do not forget to uncomment the entry! -->
<!-- <property name="SaveGameFolder" value="absolute path" /> --> <!-- Use this to only override the save game path. Do not forget to uncomment the entry! -->


Your new section will look something like this...

<!-- Folder and file locations -->
<property name="AdminFileName" value="serveradmin.xml"/> <!-- Server admin file name. Path relative to the SaveGameFolder -->
<property name="UserDataFolder" value="D:\SaveGames\a20" /> --> <!-- Use this to override where the server stores all generated data, including RWG generated worlds. Do not forget to uncomment the entry! -->
<property name="SaveGameFolder" value="D:\SaveGames\a20\Saves" /> --> <!-- Use this to only override the save game path. Do not forget to uncomment the entry! -->




Step 3 - Create the folder D:\SaveGames\a20\Mods

Step 4 - Go to your Steam Library, Right-click on 7 Days, and choose Properties.

Step 5 - Add the following to your launch options. -configfile=a20serverconfig.xml (Again, your file will vary on what you name it. This is the example.)

30b86457db2b0ca5010e677cb442a85c.png


Step 6 - Close the window, and start the game.

Now I can just use the config file in each separate folder, and tell the client where to go for all the data. No symlinks required. 

 
its like cutting a leg off to upgrade the other so it can run faster...oh wait
 well if you change a leg with wheel and engine....  we have to test that @Morloc could assist in this... operation? we are going cut his legs and replace them with wheel with engine... it will be so fun! for us ofc

SUCCESS!!

Ok so I tested it, and it worked perfectly. Unfortunately it is again something that some people will not be able to accomplish. (Khaine isn't kidding about people incapable of simply copying files out of a zip into the mod folder. I spent a few hours the other day with someone on the exact same thing.)

Step 1 - Copy/rename serverconfig.xml. For this example I am using "a20serverconfig.xml". You want the file different so it isn't reset with an update.

Step 2 - Edit the file to replace the following section starting at line 40.

<!-- Folder and file locations -->
<property name="AdminFileName" value="serveradmin.xml"/> <!-- Server admin file name. Path relative to the SaveGameFolder -->
<!-- <property name="UserDataFolder" value="absolute path" /> --> <!-- Use this to override where the server stores all generated data, including RWG generated worlds. Do not forget to uncomment the entry! -->
<!-- <property name="SaveGameFolder" value="absolute path" /> --> <!-- Use this to only override the save game path. Do not forget to uncomment the entry! -->


Your new section will look something like this...

<!-- Folder and file locations -->
<property name="AdminFileName" value="serveradmin.xml"/> <!-- Server admin file name. Path relative to the SaveGameFolder -->
<property name="UserDataFolder" value="D:\SaveGames\a20" /> --> <!-- Use this to override where the server stores all generated data, including RWG generated worlds. Do not forget to uncomment the entry! -->
<property name="SaveGameFolder" value="D:\SaveGames\a20\Saves" /> --> <!-- Use this to only override the save game path. Do not forget to uncomment the entry! -->




Step 3 - Create the folder D:\SaveGames\a20\Mods

Step 4 - Go to your Steam Library, Right-click on 7 Days, and choose Properties.

Step 5 - Add the following to your launch options. -configfile=a20serverconfig.xml (Again, your file will vary on what you name it. This is the example.)



Step 6 - Close the window, and start the game.

Now I can just use the config file in each separate folder, and tell the client where to go for all the data. No symlinks required. 
Ok and it would work if i would play with someone? I mean -  have second person to  change things diffrent?

 
Now compile all this talk about mlink and %appdata% etc and then try to find a way to tell or explain to a player that has NO programming or any “folder” tech knowledge that just wants to play the game!!


I'm probably being dense. Or maybe y'all are misunderstanding me. I wouldn't expect regular folks to do that. I'd expect some kind of installer and/or mod manager to do it. Those who distribute overhaul mods could standardize on a tool that changes the Mods folder under %APPDATA% to be a symbolic link to the overhaul mod dejour.

I'll duck out at this point for fear of flogging a horse. Regards and respect to all.

 
Back
Top