Jump to content

Enable/Disable Mods


Recommended Posts

I did some searching and looked over the Already Suggested and Not to Suggest lists and didn't seem to find anything similar to what I have in mind, so I'll tentatively throw it out there. What I would like is a way to enable and disable mods easily. Sins of a Solar Empire has a specific mods folder where you just edit a .txt file to choose which mods you want before launching (this is just a use example that I can think of as I don't mod games frequently, and NOT plugging another game). I'm sure there are many ways it can be done. Now, this may be really stretching it, but I had an idea where, when you launched a new game, you could select which mods you wanted enabled. That way you could have a completely vanilla KSP save going and one with piles of fancy mods, depending on what kind of mood you were in. I know there are some mods that people may want incorporated into the whole game/current saves, so perhaps there could be a separate folder or way to install those mods so they would appear no matter what.

I just want to know whether this is possible, as it would make KSP much more mod-friendly in my opinion. Thanks for your consideration :)

Link to comment
Share on other sites

I've got a way I do this now (one stock install, one install with all the mods and everything else symlinked to the stock install, and then additional installs that are symlinks to the stock install and the various mods. It works, but it's a hassle.

I'd like to see this, with one minor addition. I'd want to see the list of mods that are active/deactive be on a per-save basis, so that I could just pick which save I want and load it instead of trying to remember which set of installs I was using on that save.

Link to comment
Share on other sites

Just create a copy of your KSP stock folder somewhere

Good to know this works. I was thinking about asking. This would still be more convenient though, as my available HDD space is dwindling

It works, but it's a hassle.

[...]

I'd want to see the list of mods that are active/deactive be on a per-save basis

Do you have a thread or anything explaining that in more detail?

I was going to mention this as well if I got the impression it was possible. There could at least be a description box in addition to the name of the save file where you could make notes about what mods you have.

Link to comment
Share on other sites

Do you have a thread or anything explaining that in more detail?

Not at this time. I'm considering doing a powershell script to make this easier to do, but for now, this is about as detailed as I can think of.

1) Have a stock install somewhere

2) Create a folder for your "all mods" install.

3) use the mklink command to symlink everything from the stock install that you don't want shared. So symlinks for every file/folder in your top level KSP directory except for GameData, Parts, Plugins, Resources, Internals, and optionally saves and Screenshots. Make a new folder for each of those that you don't symlink.

4) inside the GameData directory, create a symlink to the Squad directory in your stock install

At this point, you should have a functional second stock copy of KSP. I recommend testing it and making sure it's basically functional before proceeding, it's pretty easy to mess up the symlinks when you're doing it manually. Once you're happy with the basic install, go ahead and install every mod that you want to use. Test again.

Now that you've got a second install with all the mods you want, you can create a third install with just the mods you want by repeating steps 1-4, and then adding a fifth step.

5) inside the GameData directory, create a simlink to the mod folder inside the "all mods" install for any mod you want for this install.

At this time, you've got one real stock install, and by updating that, you're updating all your installs. Further, you've only got one real install of each mod, so by updating the one real mod install, you update any installs that use that mod.

The downside of this is it takes more work to set up and to change (adding a new mod to all installs can involve a lot of typing). Which is, of course, why I want to do a powershell script to make things simpler.

Link to comment
Share on other sites

put mod options in that little window you get when you start a save. your options would be, 'stock only', 'all mods', and 'let me pick which mods to use'. could probibly just use radio buttons. if you select the last one, you get a popup window that gives you a list of all items in the gamedata folder with checkboxes next to them so you can select the ones you want.

what this little thing does is generates a folder exclusion list. so when you load all the files in all the folders under gamedata, check and see if they are excluded, and if they are, skip them. though you may need to populate the game database after you start/load a save, rather than when the game first starts up.

Edited by Nuke
Link to comment
Share on other sites

Only one issue with that -- Unity loads everything on startup. For that to work, the main menu would need to be before the loading sequence, and one would effectively have to restart KSP entirely to change save files. A minor gripe, but hopefully they figure out how to work around that nuisance before they attempt something like this.

Link to comment
Share on other sites

I've been entertaining this idea for a while, I am glad you suggested it.

put mod options in that little window you get when you start a save. your options would be, 'stock only', 'all mods', and 'let me pick which mods to use'. could probibly just use radio buttons. if you select the last one, you get a popup window that gives you a list of all items in the gamedata folder with checkboxes next to them so you can select the ones you want.

what this little thing does is generates a folder exclusion list. so when you load all the files in all the folders under gamedata, check and see if they are excluded, and if they are, skip them. though you may need to populate the game database after you start/load a save, rather than when the game first starts up.

I guess something like that would be best. We could have the launcher work as the main menu and select the save before Unity loads all the data. Or disable files after they are loaded, perhaps against some all-stock whitelist of sorts, or select plugins respectively.

Link to comment
Share on other sites

Only one issue with that -- Unity loads everything on startup. For that to work, the main menu would need to be before the loading sequence, and one would effectively have to restart KSP entirely to change save files. A minor gripe, but hopefully they figure out how to work around that nuisance before they attempt something like this.

when the game starts it would just load graphics and data needed for the splash screen and menus. game database population would just happen after you loaded a save. this also means any mod not selected in your save will not need to be loaded.

I guess something like that would be best. We could have the launcher work as the main menu and select the save before Unity loads all the data. Or disable files after they are loaded, perhaps against some all-stock whitelist of sorts, or select plugins respectively.

you could handle the save loading in the launcher i suppose, but there is no reason that an in-game mod select cant work. you just need to slightly change the order in which the game initializes stuff. right now the game database seems to get initialized first. the game database seems rather flexible, it can accomplish feats like loading mods on the fly, so i dont think there will be much of an issue initializing it elsewhere. game would start with a short load (system configs, interface graphics, splash screens), almost immediately give you a menu, and then when you load a save, the database initializes (using an inclusion list) with a long load.

you would set up an exclusion list on the creation of the save, anything not on that goes into an inclusion list. both lists would be stored in your save file. if a mod is on neither list then it is a new mod and the game lets you decide what to do with them (via a yes/no dialog), and this updates your lists. then on load you only load folders with names on the inclusion list.

you can take it a step beyond that and have full in-game mod management with install/update/uninstall and spaceport integration. but that is certainly not a requirement.

Link to comment
Share on other sites

Only one issue with that -- Unity loads everything on startup. For that to work, the main menu would need to be before the loading sequence, and one would effectively have to restart KSP entirely to change save files. A minor gripe, but hopefully they figure out how to work around that nuisance before they attempt something like this.

"Data Files" on a pre-launch menu like all the Elder Scrolls games?

Just create a copy of your KSP stock folder somewhere so you have two installs, then mod one.

Whilst this is the solution for now, not everybody wants to (or is able to) keep multiple copies of a 1GB+ folder.

Link to comment
Share on other sites

Only one issue with that -- Unity loads everything on startup. For that to work, the main menu would need to be before the loading sequence, and one would effectively have to restart KSP entirely to change save files. A minor gripe, but hopefully they figure out how to work around that nuisance before they attempt something like this.

Everything inside the GameData folder is manually loaded by KSP, not Unity. The game developers have full control over that process because they designed it.

Link to comment
Share on other sites

  • 3 months later...

How about a way to enable or disable the folders in the game data folder? Perhaps if the main menu was implemented into the launcher in some way. Or even just select what folders to access when starting a new save.

I mean the game data folder is basically our mod folder.

Link to comment
Share on other sites

Not at this time. I'm considering doing a powershell script to make this easier to do, but for now, this is about as detailed as I can think of.

1) Have a stock install somewhere

2) Create a folder for your "all mods" install.

3) use the mklink command to symlink everything from the stock install that you don't want shared. So symlinks for every file/folder in your top level KSP directory except for GameData, Parts, Plugins, Resources, Internals, and optionally saves and Screenshots. Make a new folder for each of those that you don't symlink.

4) inside the GameData directory, create a symlink to the Squad directory in your stock install

At this point, you should have a functional second stock copy of KSP. I recommend testing it and making sure it's basically functional before proceeding, it's pretty easy to mess up the symlinks when you're doing it manually. Once you're happy with the basic install, go ahead and install every mod that you want to use. Test again.

Now that you've got a second install with all the mods you want, you can create a third install with just the mods you want by repeating steps 1-4, and then adding a fifth step.

5) inside the GameData directory, create a simlink to the mod folder inside the "all mods" install for any mod you want for this install.

At this time, you've got one real stock install, and by updating that, you're updating all your installs. Further, you've only got one real install of each mod, so by updating the one real mod install, you update any installs that use that mod.

The downside of this is it takes more work to set up and to change (adding a new mod to all installs can involve a lot of typing). Which is, of course, why I want to do a powershell script to make things simpler.

I've created a windows batch file that does this. Code is below. Just paste it into a batch file, edit the SOURCE and DEST variables, and run it!

Note that I have linked ALL folders except GameData and saves. If you don't want certain folders linked (as suggested by Eric S) either remove the line, or simply delete the link after it's been created. If you want to link the Saves then simply add that line in (I'm sure you can figure it out!)

Also I'm not entirely sure whether the Extras folder exists in the stock game or if it was added by a mod I installed! Just remove the line if it's not stock!

Hope that helps


SET SOURCE=C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program
SET DEST=C:\Games\KSP Modded

MKLINK /D "%DEST%\sounds" "%SOURCE%\sounds"
MKLINK /D "%DEST%\Ships" "%SOURCE%\Ships"
MKLINK /D "%DEST%\Extras" "%SOURCE%\Extras"
MKLINK /D "%DEST%\Screenshots" "%SOURCE%\Screenshots"
MKLINK /D "%DEST%\Internals" "%SOURCE%\Internals"
MKLINK /D "%DEST%\Resources" "%SOURCE%\Resources"
MKLINK /D "%DEST%\Plugins" "%SOURCE%\Plugins"
MKLINK /D "%DEST%\KSP_Data" "%SOURCE%\KSP_Data"
MKLINK /D "%DEST%\PluginData" "%SOURCE%\PluginData"
MKLINK /D "%DEST%\Launcher_Data" "%SOURCE%\Launcher_Data"
MKLINK /D "%DEST%\Parts" "%SOURCE%\Parts"
MKLINK /D "%DEST%\Subassemblies" "%SOURCE%\Subassemblies"
MKLINK /H "%DEST%\settings.cfg" "%SOURCE%\settings.cfg"
MKLINK /H "%DEST%\MuMechLib.dll" "%SOURCE%\MuMechLib.dll"
MKLINK /H "%DEST%\Launcher.exe" "%SOURCE%\Launcher.exe"
MKLINK /H "%DEST%\KSP.exe" "%SOURCE%\KSP.exe"
MKLINK /H "%DEST%\KSP.log" "%SOURCE%\KSP.log"

MKDIR "%DEST%\GameData\"
MKLINK /D "%DEST%\GameData\Squad" "%SOURCE%\GameData\Squad"

MKDIR "%DEST%\saves"
MKLINK /D "%DEST%\saves\training" "%SOURCE%\saves\training"
MKLINK /D "%DEST%\saves\scenarios" "%SOURCE%\saves\scenarios"
Pause

Edited by Atoning Unifex
Added in training and scenarios folders
Link to comment
Share on other sites

I believe that there may be somewhat of a mod manager in the next update. There's something to do with mods and the game launcher coming in the next updates. I think it's plausible, the mods are stored in separate folders from the stock game (in their own folder in the Gamedata folder), they could probably make it so that you can tell it to not load certain files from there. But I know not how to program, so I'm not sure if this is possible. I think this is what they do in games with such options though (such as Civilization V, Sins of a Solar Empire, etc.)

Link to comment
Share on other sites

  • 1 year later...

At the very least I think KSP should implement a system similar to arma, where you place the entire mod folder in the game folder without merging the two, and then activate the mod in game with a checklist. This also makes the removal of unwanted mods a lot easier, as you can just delete the folder.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...