Modding a Mod to Understand How to Mod

The “Perkaholic” mod was originally created by a user name Xylozi, but he became inactive, and that version in the link was updated to be compatible with the more recent version of the game by user d_vasegh.

I am fiddling with this mod, as a way to understand how the game handles files and make a couple mundane changes. It irks me that, for example, taking the “Juggler” perk causes a permanent malus on Speech and Charisma. So I found the line in:
D:\Steam\steamapps\common\KingdomComeDeliverance\mods\perkaholic\Data\Perkaholic.pak\Libs\Tables\rpg\buff.xml

and changed it to:
<row buff_ai_tag_id="" buff_class_id=“4” buff_desc=“buff_juggler_desc” buff_exclusivity_id=“0” buff_id=“bc64bdea-4444-4308-ae54-5e5f268d25f6” buff_lifetime_id=“0” buff_name=“perk_juggler” buff_ui_name=“buff_juggler” buff_ui_order="" buff_ui_type_id=“4” buff_ui_visibility_id=“0” duration="-1" icon_id=“0” implementation=“Cpp:Constant” is_persistent=“True” params=“agi+2,spc-0,cha-0” slot_buff_ui_name="" slot_icon_id="" visual_effect="" />

That works; the juggler perk no longer caused the deduction to speech and charisma. Except the UI description is now wrong, so I was exploring how to get that fixed. So I grabbed a copy of D:\Steam\steamapps\common\KingdomComeDeliverance\Localization\English_xml.pak\test_ui_soul.xml

and changed the appropriate line to:
<Row><Cell>buff_juggler_desc</Cell><Cell>You get a permanent +2 bonus on Agility, but also a -1 penalty on Charisma and Speech.</Cell><Cell>You get a permanent +2 bonus on Agility.</Cell></Row> (cutting “, but also a -1 penalty on Charisma and Speech”)

I saved this edited copy of “test_ui_soul.xml” along with “text_ui_perkaholic.xml” in a folder named English_xml at D:\Steam\steamapps\common\KingdomComeDeliverance\mods\perkaholic\Localization\ (I renamned the original .pak file “OREnglish_xml.pak.” I then used 7zip to archive the folder, and then renamed it English_xml.pak when it was all said and done.

I suspect this is where my process breaks down, and I suspect it is for one of two reasons:

  1. I didn’t use the right encoding format when I used 7zip to create the new “English_xml.pak” archive.
  2. I need to change something in “D:\Steam\steamapps\common\KingdomComeDeliverance\mods\perkaholic\Data\Perkaholic.pak\Libs\Localization\localization.xml” ??

Any ideas?

I think the problem lies with your renaming the .pak with 7zip. I would be using winrar in this case. I know it sounds stupid but just humor me.

1 Like

I’ll try that! I might even have winrar installed already . . . that is the Microsoft embedded archving app I guess . . .

The safe way is “Copy the usable .pak, Open it without extract and replace the files inside it to yours, and Rename it” if it was encode problem.
I use 7-zip and it works.

And check other mods if you have.
They overwrite same name files in alphabet order.
So “KingdomComeDeliverance\mods\Q(after P)\Localization\English_xml.pak\text_ui_soul.xml”
will erase all of your change.
You can just put your own files to “Deliverance\mods\ZZZZZ(rename Perkaholic)~” and it will be primarily.

perkaholic\Data\Perkaholic.pak\Libs\Localization\localization.xml
That is the file they add the list of “text_ui_*****.xml”.
You use “text_ui_soul.xml”, it is original file and already contained. No need to change.
(you type “teSt_ui_soul.xml” if it’s not just typo, it is the criminal.)

…If you want really use “teSt_ui_soul”, you should change entry of localization.xml
I recommend just fix to “teXt” though.

I had posted to Original Perkaholic site how to update the mod a little bit ago.
And I hope it will explain you some effects of each files.

1 Like

Second option to change your localization files

inside Data\***.pak
Libs\Tables\rpg\buff.xml
<row buff_ai_tag_id="" buff_class_id=“4” buff_desc=“buff_juggler_desc”
Change to
buff_desc=“buff_juggler2DX_desc”

Libs\Localization\localization.xml
Add
<Entry>Whatever.xml</Entry>
after other entries.

inside Localization/English_xml.pak
Whatever.xml
<table>
<Row><Cell>buff_juggler2DX_desc</Cell><Cell>No need</Cell><Cell>Whatever You Want</Cell></Row>
</table>

1 Like

To repack a mod you should use winRAR instead of 7zip.
And if you create the archive change the extension in the winRAR window first to .ZIP
After that you can rename the file from ABCYXZ.zip to ABCYXZ.pak.
Opening the archive without extracting files but replacing them inside works better with winRAR and you were not forced to change the compression method.
test
You can also rename the file in the winRAR window, but the extension should be changed every time .ZIP. 7zip do not works with certain versions of pak formats. Example, Jedi Knight Jedi Academy cant be packed with 7zip too. Same with Return to Castle Wolfenstein, Medal of Honor Allied Assault, Crysis and many more.
I can say that i do such work every fifth day^^

3 Likes

Good stuff folks!

Got distracted by Crusader Kings for a bit, but I’m sure I’ll be back to this and make some mundane changes and then share them if I an get them to work. In any event, hopefully the thread now stands as a good “how to” thread for other prospective modders!

You sir, indeed, are awesome…

If that was for me, no not really! :smile:

I’m awesome at strategic procrastination, over-engineering/analysis, and slacking off!

2 Likes

you meant customer service then?

2 Likes

You can use 7zip if you set the dictionary size to 32kB and compress it as *.zip, then rename the *.zip to *.pak

2 Likes