Jump to content

Link to modding/editing instructions


Recommended Posts

Does anyone happen to know where a great write-up or video is located, that instructs idiots like myself how to change things for ourselves instead of waiting for one of you more knowledgeable individuals to do it for us? I remember seeing something about extracting luas and tbls from paks and finding xml files somewhere in there and editing those, but I don't remember where I saw that last month. I'm also not sure if whatever I had stumbled across then, is applicable now after the latest 1.9.5 or whatever patch in late February. It seems like maybe I just need to know how to safely edit some player parameters file to toy with things like encumbrance, item durabilities, etc. but I'm not sure if that's still the case, if ever it was that simple. Anyways, I'm rambling now.


If anyone has a cool tutorial or info-dump bookmarked, I'd be super grateful.


EDIT 1: I found: https://wiki.nexusmods.com/index.php/Modding_guide_for_KCD which says the following:


The most common example of this is all the small mods here on Nexus that change things like thievery settings. They include only an edited rpg_param.xml file, accompanied by an empty rpg_param.tbl file.

UPDATE: Since game version 1.9.5 mod-specific table files with individual rows can be created instead of overwriting the entire tables.


If I go google/learn how to edit xml files, gets whatever application allows that, find the parameters I want to edit and change them - will the few mods that I *do* have that seem to still work simply overwrite my new edited rpg_param.xml file and put me back where I started? :-)


EDIT 2: I found some instructions from 19FEB2018 at https://forums.nexusmods.com/index.php?/topic/6409661-tutorial-tweaking-rpg-parameters/, anyone know if this is still how to go about doing it for myself after the 1.9.5 patch?

Edited by Aevic
Link to comment
Share on other sites

If your mod is loaded last, and if you use mod-specific table files, your changes will take precedence.


What you need to do is:



- Create a folder in the "Mods" folder like this: "[steamPath]\KingdomComeDeliverance\Mods\[ModName]"



- Inside that create a new text file and rename it "mod.manifest", make sure it turns into a "MANIFEST" file type, and then add the following:

<?xml version="1.0" encoding="utf-8"?>

The <kcd_version>1.*</kcd_version> should be the current version, or as here where * is a wild card and thus stands in for any number.




- Then create a "Data" folder within the [ModName] folder. This is where you have your pak file(s).



- From here you start modding. For example, you can extract the game's "rpg_param.xml" by opening the "Tables.pak" in the main game's Data folder and go through "...Libs\Tables\rpg" (pak files can be opened with 7-Zip and similar programs).



- Place the file like this in a new set of folders within your [ModName] Data folder:"[steamPath]\KingdomComeDeliverance\Mods\[ModName]\Data\Libs\Tables\rpg\rpg_param.xml".



- Then, to make it mod-specific, change the name to "rpg_param__modname.xml" (has to have double underscores between the regular table name and modname - "modname" has to match what you have written in the mod.manifest inside <name>ModName</name>, with lower case letters, and that name should contain no spaces (afaik).



- Within the renamed file (opened with any text editor), remove all excess rows, only keeping or adding those that you want to change (see example below).



- Also you may want to rename the table name to <table name="rpg_param__modname" version="1"> (this last step may or may not be required, but better safe than sorry).



- For example, if you want to remove master strikes from combat, for both the player and NPCs:

<?xml version="1.0" encoding="us-ascii"?>
<database name="hammerheart">
  <table name="rpg_param__modname" version="1">
      <column name="rpg_param_key" type="character varying" />
      <column name="rpg_param_value" type="real" />
      <row rpg_param_key="CombatAutoSPBWeight" rpg_param_value="0" />
      <row rpg_param_key="MaxSpecialPerfectBlockSlotModifier" rpg_param_value="0" />

- In this case, if you also want this to apply to Hardcore mode, you have to do the same procedure with "perk_rpg_param_override.xml" (actually you only need to include the player's master strike window "MaxSpecialPerfectBlockSlotModifier" since AI master strike probability "CombatAutoSPBWeight" is unaltered). So make your "perk_rpg_param_override__modname.xml" in the same manner and place it along with your "rpg_param__modname.xml".



- When all this is done, go back to your [ModName] Data folder, right click the "Libs" folder and make it into an archive (e.g. zip, rar, or 7z). Then rename the archive to "ModName.pak", make sure it turns into a PAK file.



- Now you should have a file structure like this:






- Now you can make sure that your mod is loaded last, either by changing the mod name to the lowest alphabetically (e.g. by starting your [ModName] folder with zzz_) or placing it at the bottom in your mod.order.txt if you have any).



- Done!

Edited by EkErilaz
Link to comment
Share on other sites

  • 3 weeks later...

Hello hello - I guess EkErilaz's post covered everything you need to do (@EkErilaz you sould put this up somewhere on the web :tongue:) -
I also found it hard to begin modding kcd - thats why I've put some information about lua / coding / entity-handling in kcd together into a small readme on github: https://github.com/benjaminfoo/kcd_coding_guide

- maybe this could be useful for you, but its focused on coding.

Edited by dataframe
Link to comment
Share on other sites

  • 4 weeks later...

If your mod is loaded last, and if you use mod-specific table files, your changes will take precedence.


What you need to do is:

This may somewhat unrelated but within the scope of the original question, but does anyone know if you remove lines from the table this way? I know when the game is patching it shows (added lines #, edited lines #, removed lines #) but I can't think of any way to signal a removed entry, nor did I find in the official documentation or changelog where they mentioned the new patching.

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Thank you for this.


my bad Problem resolved. thanks


I still can't get the repacking part to work as I mentioned in a post here.

I did not see this post before I posted a question I recently asked in

Compressing problem for mods in KCD

when you say like zip, rar or 7z are you refering to the programs or the compression file as 7z.exe can create zip files.

Do you mean compress the mod to a lib.zip and then rename it to modname.pak>


Nexus mod help said that it can't be zip, rar, or 7z. I am confused as to what THE actual archive format

should be ie, .zip, .7z or .rar and then renamed to .pak?

Edited by pzaw
Link to comment
Share on other sites

  • Recently Browsing   0 members

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