Question Can you make CP patches for an XNB mod?

Lenora Rose

Farmer
Okay this was odd.

I noticed the Stray Catfe characters don't have resort dialogue. "Ah," I think. "Rather than write a whole new patch I can just insert a few lines in the dialogue file. Easy peasy."

Except no. It's an XNB mod, or at least that part is written in XNB, so I can't fix it directly. Which means if I want to add something so they can talk at the resort I do need to patch.

I have a pretty good idea how to add dialogue to a vanilla character. but is it possible to add it to another mod by the same means (just adding the original mod as a dependency) or are there unexpected pitfalls to the process?
 

kenki

Greenhorn
you can edit .xnb files directly. all you need it unpack dialogue file by special program, and you will get .json version of it, which you can edit by any text editors. then, you need to pack it back to .xnb format, and replace the original file (this is it, if you want to change .xnb files in existing mod)

if we are talking about original game files (Stardew Valley\Content\Characters\Dialogue), then you can just patch it by Content Patcher by action EditData (wich lets "add, edit, or delete entries; reorder entries in a list; or edit individual fields within an entry").
:bunny:
 

Lenora Rose

Farmer
you can edit .xnb files directly. all you need it unpack dialogue file by special program, and you will get .json version of it, which you can edit by any text editors. then, you need to pack it back to .xnb format, and replace the original file (this is it, if you want to change .xnb files in existing mod)

if we are talking about original game files (Stardew Valley\Content\Characters\Dialogue), then you can just patch it by Content Patcher by action EditData (wich lets "add, edit, or delete entries; reorder entries in a list; or edit individual fields within an entry").
:bunny:
It looks to me like both the unpackers listed there unpack but don't repack. And while the directions look pretty clear, the process feels a lot more daunting than "go in and add 3 lines of code then hit save."

my original question was assuming that making a patch is easier than unpacking. Though that's only true if it's physically possible.
 

kenki

Greenhorn
It looks to me like both the unpackers listed there unpack but don't repack. And while the directions look pretty clear, the process feels a lot more daunting than "go in and add 3 lines of code then hit save."

my original question was assuming that making a patch is easier than unpacking. Though that's only true if it's physically possible.
unpack and pack is the easiest way, when we're talking about editing .xnb files of existing mod (do the patch mode to patch the other mod itself sounds bizarre, if assuming that it's theoretically real).
this process is literally just 5 clicks (without the editing dialogue file). i'm using xnbcli-windows-x64, to unpack .xnb file here all you need is place the file in packed folder, then just run unpack.bat. and voila! you have your .json file in unpacked folder. then you just open this file, do your 'fixing' and 'editing' (and there's nothing about programming), then save, then run pack.bat and you have your changed .xnb file again in packed folder. what is so difficult about here? to wander about of possibility of 'patching the mod itself' it's like not to solve your problems, but only complicate them instead.

maybe you need a step-by-step instruction? here it is

your problem: characters of Stray Catfe mod do not have their resort dialogue lines.
your disare: to add resort dialogue lines by yourself.
the solution:

1. download xnbcli
2. unpack this .zip file
3. go to [TSC] The Stray Catfe ->[CP] The Stray Catfe -> dialogue
4. take 📄 Tabitha.xnb and 📄 Theo.xnb and put them in xnbcli\packed folder
5. run unpack.bat. when the process is done, press any key to continue
6. go to unpacked foled. open Tabitha.json or Theo.json
7. go to "content"and add lines (it's just an exmaple):

"Resort": "your text with portrait commands",
"Resort_Bar": "your text with portrait commands",
"Resort_Chair": "your text with portrait commands",
"Resort_Dance": "your text with portrait commands",
"Resort_Entering": "your text with portrait commands",
"Resort_Leaving": "your text with portrait commands",
"Resort_Shore": "your text with portrait commands",
"Resort_Towel": "your text with portrait commands",
"Resort_Umbrella": "your text with portrait commands",
"Resort_Wander": "your text with portrait commands",

8. click save.
9. run pack.bat. when the process is done, press any key to continue
10. from the packed folder take your 📄 Tabitha.xnb and 📄 Theo.xnb and put them back to [TSC] The Stray Catfe ->[CP] The Stray Catfe -> dialogue

result: now characters of Stray Catfe mod have their resort dialogue lines added by you
advantage of this solution: you don't have to think about more complex solutions to your problem

:bunny:
 
Last edited:

Lenora Rose

Farmer
unpack and pack is the easiest way, when we're talking about editing .xnb files of existing mod (do the patch mode to patch the other mod itself sounds bizarre, if assuming that it's theoretically real).
this process is literally just 5 clicks (without the editing dialogue file). i'm using xnbcli-windows-x64, to unpack .xnb file here all you need is place the file in packed folder, then just run unpack.bat. and voila! you have your .json file in unpacked folder. then you just open this file, do your 'fixing' and 'editing' (and there's nothing about programming), then save, then run pack.bat and you have your changed .xnb file again in packed folder. what is so difficult about here? to wander about of possibility of 'patching the mod itself' it's like not to solve your problems, but only complicate them instead.



:bunny:
Hee. I don't think I needed quite that detailed instructions but I also don't mind them at all!
 
Top