Kingdom Come Deliverance Nswitch MOD

WiduraGoez

Well-Known Member
OP
Member
Joined
Nov 7, 2021
Messages
378
Trophies
0
Age
42
XP
1,340
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,304
Trophies
3
XP
12,092
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
378
Trophies
0
Age
42
XP
1,340
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,304
Trophies
3
XP
12,092
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
378
Trophies
0
Age
42
XP
1,340
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
378
Trophies
0
Age
42
XP
1,340
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
378
Trophies
0
Age
42
XP
1,340
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
9
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
378
Trophies
0
Age
42
XP
1,340
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
76
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
  • AncientBoi @ AncientBoi:
    ooowwww a new way for me to beat NFS 510 :D @SylverReZ
    +1
  • SylverReZ @ SylverReZ:
    @AncientBoi, Yeah, believe you can do PSP games as well. But a Pi5 is much powerful in comparison.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Not sure about other models of Pi4 but the Pi 4 B with 8GBs OCed to 2Ghz handles PSP really great except like 1 game I found and it is playable it just looks bad lol Motor Storm Arctic something or other.
  • Psionic Roshambo @ Psionic Roshambo:
    Other games I can have turned up to like 2X and all kinds of enhancements, Motorstorm hmmm nope 1X and no enhancements lol
  • Veho @ Veho:
    Waiting for Anbernic's rg[whatever]SP price announcement, gimme.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I will admit that one does seem more interesting than the usual Ambernic ones, and I already liked those.
  • Veho @ Veho:
    I dread the price point.
    +1
  • Veho @ Veho:
    This looks like one of their premium models, so... $150 :glare:
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    To me that seems reasonable.
  • Psionic Roshambo @ Psionic Roshambo:
    I mean since basically all the games are errmmm free lol
  • Veho @ Veho:
    I mean yeah sure but the specs are the same as a $50 model, it's just those pesky "quality of life" things driving up the price, like an actually working speaker, or buttons that don't melt, and stuff like that.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I think all in my Pi 4 was well north of 200 bucks 150ish for the Pi 4 the case the fancy cooler, then like 70 for the 500GB MicroSD then like 70 for the Xbox controller. But honestly it's a nice set up I really enjoy and to me was worth every penny. (even bought more controllers for 2 or 4 player games.) hmmm have never played any 2 player games yet :(
  • Veho @ Veho:
    Yeah that's what I hate about the RPi, it's supposedly $30 or something but it takes an additional $200 of accessories to actually turn it into a working something.
  • Psionic Roshambo @ Psionic Roshambo:
    yes that's the expensive part lol
  • Veho @ Veho:
    I mean sure it's flexible and stuff but so is uremum but it's fiddly.
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah a lot of it I consider a hobby, using Batocera I am constantly adjusting the collection adding and removing stuff, scraping the artwork. Haven't even started on some music for the theme... Also way down the road I am considering attempting to do a WiiFlow knock off lol
  • Veho @ Veho:
    I want everything served on a plate plz ktnx, "work" is too much work for me.
  • Veho @ Veho:
    Hmm, with that in mind, maybe a complete out-the-box solution with all the games collected, pacthed and optimized for me would be worth $150 :unsure:
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's all choice and that's a good thing :)
  • Bunjolio @ Bunjolio:
    animal crossing new leaf 11pm music
  • Bunjolio @ Bunjolio:
    avatars-kKKZnC8XiW7HEUw0-KdJMsw-t1080x1080.jpg
    wokey d pronouns
  • SylverReZ @ SylverReZ:
    What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo
    SylverReZ @ SylverReZ: What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo