Kingdom Come Deliverance Nswitch MOD

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
Nowhere. As I said, any additional PAK is not detected. And I cannot debug this for next weeks because for some reason GDBstub refuses working with my phone hotspot.


1. Unpack ui.pak with my scripts
2. Unpack pak file from mod with 7-zip
3. Copy unpacked files from mod's pak and paste them to unpacked ui.pak files, replacing original ones
4. Pack all unpacked ui.pak files and folders to new ZIP, rename just generated archive back to ui.pak
5. Put new ui.pak to atmosphere/contents/0100650018FE0000/romfs/data
6. Launch game
Thank you so much for your help.. I hope in the future there is a way to convert the additional pak to works with nintendo switch:bow:
Post automatically merged:

Nowhere. As I said, any additional PAK is not detected. And I cannot debug this for next weeks because for some reason GDBstub refuses working with my phone hotspot.


1. Unpack ui.pak with my scripts
2. Unpack pak file from mod with 7-zip
3. Copy unpacked files from mod's pak and paste them to unpacked ui.pak files, replacing original ones
4. Pack all unpacked ui.pak files and folders to new ZIP, rename just generated archive back to ui.pak
5. Put new ui.pak to atmosphere/contents/0100650018FE0000/romfs/data
6. Launch game
If I may ask....is all the unpack ui File That have been unpack put in the switch or just the Mod Replace one..so all the files that not been replace can be delete..just the one that MOD replace ..Then pack..and put in the Nswitch..or all the files that been unpack including the Mod Replace One
Post automatically merged:

Post automatically merged:

Switch game has precompiled XMLs that they call "CryXml" in comparison to PC that has them in readable format.
Post automatically merged:

https://pypi.org/project/scdatatools/

It can convert them to readable format, but not back to CryXML. HappyXML doesn't work.

For now I'm writing Python scripts that can pack to zip files compressed with Oodle. I want to replicate ui.pak 1:1 if possible.
Post automatically merged:

It seems like QuickBMS script doesn't extract all files. This is why game was crashing with repacked ui.pak

So game supports normally zip files packed with Windows builtin zip compressor.

You can find my script that perfectly fine unpacks whole PAK here:
https://github.com/masagrator/NXGameScripts/tree/main/KingdomComeDeliverance

Tested with Python 3.10
You must download "Unpack_PAK.py", "zipfileKC.py" and "Oodle.exe".
in cmd you must use
Code:
python Unpack_PAK.py [pak_file] [folder_out]
For example
Code:
python Unpack_PAK.py ui.pak ui

I have added there also Pack_PAK.py if somebody would like to use Oodle for compression.
Post automatically merged:

Replaced xml files in ui.pak with files from UnlimitedSavingNS mod without converting it to CryXml format.
And they work fine :)

So only issue comes from the fact that game doesn't load additional pak files.
How do use Pack_PAK.py or what command to pack the files
Post automatically merged:

I Have been following your instructions...and pack the file with 7zp..rename it too ui.pak....install it in nswitch..but when I open the game...its error showing..."The software was closed........"
 
Last edited by WiduraGoez,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,280
Trophies
3
XP
12,047
Country
Poland
one..so all the files that not been replace can be delete
No, you must pack them too. Every single one.
The software was closed
That means you did not pack all files correctly. After packing open original pak and new pak with 7-zip and look if all folders are there in the same place
Post automatically merged:

Did you use my unpack_PAK.py? As I said already, quickbms doesn't extract whole ui.pak
 

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
No, you must pack them too. Every single one.

That means you did not pack all files correctly. After packing open original pak and new pak with 7-zip and look if all folders are there in the same place
Post automatically merged:

Did you use my unpack_PAK.py? As I said already, quickbms doesn't extract whole ui.pak
Yes i use the unpack_PAK.py...can you please share me the PAK Mod file that you have been successfully made..Will try it on..and use at preference..Thank you
Post automatically merged:

No, you must pack them too. Every single one.

That means you did not pack all files correctly. After packing open original pak and new pak with 7-zip and look if all folders are there in the same place
Post automatically merged:

Did you use my unpack_PAK.py? As I said already, quickbms doesn't extract whole ui.pak
If I May ask how do you use the unpack_PAK.py? in PC...I make a folder contain all the PAK.py that you share..than use cmd in that folder..first it says missing dll file..so i download the missing dll file..put it through in the folder...and use cmd on that folder....is this way right or wrong to use it? I'm sorry because im still new and learning to use python..and dont know the correct way to use it...please guide me..Thank you
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,280
Trophies
3
XP
12,047
Country
Poland
first it says missing dll file
? This sounds completely unrelated. Better provide screenshots with this error, otherwise this doesn't make any sense.
can you please share me the PAK Mod file that you have been successfully made..
No, because it's against rules since it contains many unmodified assets.
 

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
? This sounds completely unrelated. Better provide screenshots with this error, otherwise this doesn't make any sense.

No, because it's against rules since it contains many unmodified assets.
Oke.....I will try it again and look with 7zip the two pak file...But if I may ask ..how do you use the unpack py or where to put the "Unpack_PAK.py", "zipfileKC.py" and "Oodle.exe". in PC to make it works
 

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
can you give me pointer..this is what it looks on my Computer : and when i use cmd in that folder it says like this
Screenshot (793).png
Screenshot (794).png

Post automatically merged:

Microsoft Windows [Version 10.0.19045.4170]
(c) Microsoft Corporation. All rights reserved.

D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance>python Unpack_PAK.py ui.pak ui
Libs\Tables\ui\cf_backer_ingame.xml
Traceback (most recent call last):
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\Unpack_PAK.py", line 7, in <module>
zf.extractall(sys.argv[2])
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\zipfileKC.py", line 1706, in extractall
self._extract_member(zipinfo, path, pwd)
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\zipfileKC.py", line 1761, in _extract_member
shutil.copyfileobj(source, target)
File "C:\Python312\Lib\shutil.py", line 203, in copyfileobj
while buf := fsrc_read(length):
^^^^^^^^^^^^^^^^^
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\zipfileKC.py", line 980, in read
data = self._read1(n)
^^^^^^^^^^^^^^
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\zipfileKC.py", line 1071, in _read1
self._update_crc(data)
File "D:\GAME FILES\NINTENDO SWITCH\Cheat Text Install\Kingdom Come Delivenrence\Program MOD switch\NXgamescript\Kingdom Come Deliverance\zipfileKC.py", line 998, in _update_crc
raise BadZipFile("Bad CRC-32 for file %r" % self.name)
zipfileKC.BadZipFile: Bad CRC-32 for file 'Libs/Tables/ui/cf_backer_ingame.xml'
Post automatically merged:

I'm using or install python 3.12 on my computer
 

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
Ah okay, it seems it expects debug version of Visual C++ Runtime because I have compiled it with debug state. I have updated Oodle.exe now to Release state. Now if it will throw similar error, you need to install this

https://www.microsoft.com/en-us/download/details.aspx?id=53840
Its working..now i will try to put the mod on..Thank you very much for your guidance
Post automatically merged:

Oh ya...One more thing...what is the command cmd prompt to pack the file using Pack_Pack.py
 

Blepius

New Member
Newbie
Joined
Mar 29, 2024
Messages
1
Trophies
0
Age
28
XP
6
Country
Azerbaijan
Does anyone have any ideas on how to improve the graphics settings? I've tried editing XML files in ui.pak using CryEngine. After editing in CryEngine, the XML files become readable on PC, but they don't work on Switch (the settings page doesn't open). I also made changes to the user.cfg, attempting to increase draw distance, but it only messed up the graphics in the game.
 

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
361
Trophies
0
Age
42
XP
1,285
Country
Indonesia
I have been succesfully integrated the mod with the guidance from @masagrator ... The mod that works : No stolen Tag, EXP multiplier, Easy Combo... And last thing i try to put the All Female NuDe... Its works... For cloth and equipment never have try.. But i think when there is no new xml.. It can works with Nswitch.. Just replace the xml file... Maybe someone have been put the mod for clothing and equipment.. Or other mod that works..Maybe can share the knowledge.. Thank you for all people that have been help in this forum
 

Megoag

Member
Newcomer
Joined
Mar 18, 2024
Messages
7
Trophies
0
Age
28
XP
13
Country
Philippines
I have been succesfully integrated the mod with the guidance from @masagrator ... The mod that works : No stolen Tag, EXP multiplier, Easy Combo... And last thing i try to put the All Female NuDe... Its works... For cloth and equipment never have try.. But i think when there is no new xml.. It can works with Nswitch.. Just replace the xml file... Maybe someone have been put the mod for clothing and equipment.. Or other mod that works..Maybe can share the knowledge.. Thank you for all people that have been help in this forum
can you try the MOD for unli save if it works?
 

Gueorgui

New Member
Newbie
Joined
May 19, 2022
Messages
3
Trophies
0
Age
30
Location
Hetzner
XP
75
Country
Germany
So only issue comes from the fact that game doesn't load additional pak files.
Thanks for your work!

I tried to unpack and pack tables.pak through your scripts. The size of the original pak-file is significantly different from the result, and the game starts with an error.

- Checked the file structure, everything is ok
- Tried to run back and forth the contents of the pak without change
- Without modifications the game is functional

Can you please make scripts to edit tables.pak?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: I did use a bot for Diablo III though but no ban there lol