0 of 0

File information

Last updated

Original upload

Created by

TheManualEnhancer

Uploaded by

TheManualEnhancer

Virus scan

Safe to use

About this mod

Make your cfg mods more user-friendly. Provides a method of executing mod cfg files (in a new "Data/ModConfigs" folder) when the player loads into/starts a new game, when the game launches. and when the game is unpaused by the player (all to prevent the game overriding your .cfg values).

Requirements
Permissions and credits
Changelogs
This is intended to be a requirement for other modders to use, allowing them to execute their mod's .cfg files on game launch (to prevent the game from overriding cfg values on launch), when the player spawns in after loading/starting a game (to prevent level/map params from overriding cfg values), and when the player unpauses the game or skips time/sleeps (to prevent game settings changes from overriding cfg values).

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Normal mod users should only download this if another mod requires it (or if you are using my AutoCfg Loader Compatibility Patcher tool).

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


To package your mod to work with this, your .cfg file should be placed in a "Data/ModConfigs/" sub-directory of your mod's main root folder, and that directory should be packed in a .pak archive... For example:

KCD2/Mods/ExampleModFolder/Data/ExampleModArchive.pak/ModConfigs/ExampleModConfig.cfg


    └── /KCD2/
            └── Mods/
                    └── ExampleModFolder/
                            └── mod.manifest

                            └── mod.cfg

                            └── Data/
                                    └── ExampleModArchive.pak
                                           └── /ModConfigs/
                                                   └── ExampleModConfig.cfg



You should also still include a traditional "mod.cfg" file in your mod's root folder, for people that would prefer not to use this in order to use your mod (just be sure to remember to update both for mod updates).


\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


Installation:
  • Extract to main KCD2 install folder or install with Vortex.



Potential F.A.Q.s

How Does "Load Order" For Cfg File Execution Work?
  • It works the same as the game does (in alphabetical order by the mod's folder name). It works like this due to the fact that I am executing them through a game-provided method to scan the folders, so it loads (and executes) them in the same order the game would (lua methods would do the same, though, for anyone curious, but they do not work in the game's lua environment).

How Does Enabling/Disabling Individual Cfg Mods Via Console Commands Work? Does It Respect Original Mod Load Order When Enabling A Disabled Mod?
  • Yes, it respects the original mod load order when enabling a disabled mod. This is done by first reverting all changed CVar values back to their vanilla values (which I get at the start of the script before applying modded values so it uses your game's specific values as the vanilla values), then re-applying all enabled cfg mods in their original order, skipping disabled mods. Toggling the entire mod on/off does the same.
  • This means that whenever you disable/re-enable a cfg mod (or toggle the entire mod), it will always result in the same gameplay/visual experience each time it is toggled.

Will This Execute Commands/Lua Code, or Only CVars?
  • It will only execute CVars (Console variables) found in your files. It will not execute any commands or lines of lua code (commonly referred to as "cheats"). Basically (in layman's terms), it will only execute lines in the .cfg files that have an equal sign "=", such as `e_svoti_saturation = 1` or 'wh_ui_fps = 1`, but will not execute lines formatted like `#System.LogAlways("Hello")` or `player_revealFOW`... If you would like to execute commands/lua code on player spawn, you should use "After Load Cfg" by u/nimbul (both mods can be installed/used together)... Note: It will not hurt anything if the file contains commands/lua code lines, the script will just ignore them entirely... I feel this is best as I don't think most players would want the same commands executing each time they load into a game (but if you do, there are ways, as mentioned).

As A Mod Dev, Why Use This Instead Of My Own Script To Do This In My Own Mod?

  • It would slow down game load/launch/unpause times if a bunch of scripts tried to do this at the same time. It will even with just one script if the user has a lot of .cfg files, but multiple scripts all trying to execute commands for the same game events would be much worse.
  • If you don't believe this, that's fine, but just look at my CP77 mods. I have quite a bit of experience with lua in games. It may not affect much for everyone, but it does for some (especially in CPU-bound scenarios).

As A Mod User, Why Would I Use This Over "Gameplay CVar Overrider"?
  • This is much more user-friendly. It requires very minimal extra effort from mod authors to support (literally the same as any .pak mod), and zero effort at all from users to use (other than managing load order, if they'd like to).
  • They can be used together if you'd like (these values will override those, though, if any installed mods using this edit the same values).

How Does This Compare To "Load Cfg After Level" By u/nimbul?
  • This does not execute 'user.cfg' at all (so you may want to use both).
  • This executes cfg files for more game events to help ensure your cfg values override values set by the game. There are only a couple areas in the game where this may potentially hurt performance, but only if you have visual-improving mods installed that happen to edit the same values as the CVarOverrides files tweak, and only if it's drastically different (the values in the override files are barely different than vanilla aside for the "Battle.cfg" override file, which is more just tweaks to lighting for the opening new game intro).
  • This requires no input from users to add new cfg files to execute (as long as the cfg mods support this, of course). The only thing users may ever need to do for this mod is adjust load order if they have conflicting cfg mods (to suit their own personal preferences, so is not actually required, same as for any other type of mod).
  • Their mod is more for people that want to tweak the mods they downloaded, whereas mine is more for people that want the mod author's intended experiences.

As A User, Why Would I Want Less Control Over My Mods?
  • So you get the modder's intended experience. Plain and simple. I know that's not everyone's forte, and you don't have to use this method even for mods that support it if you'd prefer not to (I recommend for mod authors to include a standard "mod.cfg" file, so you can just use that assuming they do, and if they don't, you can always open their .pak file as a .zip and grab the cfg file).