Extracting a patch file with a ticket
I had no issues extracting the base game with this command:
nstool --tik maintik.tik -x ./game mainnca.nca
But I can't figure out how to extract the patch. The patch comes with it's own ticket, and I can only provide one. If I provide the main ticket:
nstool -x ./patch --tik ../main/maintik.tik --basenca ../main/mainnca.nca patchnca.nca
Nothing is extracted and I see this output:
[WARNING] NCA Partition 0 not readable. (AES-CTR Key was not determined)
[WARNING] NCA Partition 1 not readable. (AES-CTR Key was not determined)
If I provide the patch ticket:
nstool -x ./patch --tik patchtik.tik --basenca ../main/mainnca.nca patchnca.nca
Only partition 0 is extracted and I get this output:
[WARNING] NCA Partition 1 not readable. (Cannot determine RomFs from base nca.)
Oh dear. I hadn't considered this, but I guess it's rather obvious that if both the base game and patch were digital downloads they'd have separate tickets & right ids.
I'll see what I can do about allowing the user to specify multiple tickets.
@jakcron While you're at it, do you think you can add support for extracted nca? i.e instead of --basenca, pass --basedir and avoid the ticket problem altogether? I don't know which one would be easier to implement, but eh... just an idea.
@jakcron Any update on this? I'm running into the same issue, and I tried poking around in the code for a bit to see if I could add something like a --base-tik argument but I can't say I understand much
actually scratch that, i got it to work. it's definitely ugly but i'll clean it up and PR, i suppose? i'm gonna make it so you can specify as many tickets as you want (all with --tik)
actually scratch that, i got it to work. it's definitely ugly but i'll clean it up and PR, i suppose? i'm gonna make it so you can specify as many tickets as you want (all with
--tik)
That's actually a good idea, specifying as many tickets as required using --tik. Feel free to make a PR.
After sleeping on this I felt motivated to do this myself, see here https://github.com/jakcron/nstool/tree/feature-106-multipletickets
I'm also adding support for automatically reading ~/.switch/title.keys (same format as used by hactool and everything else)
I just need to make some documentation updates to explain how to use this, and specify the title.keys file.
@jakcron While you're at it, do you think you can add support for extracted nca? i.e instead of
--basenca, pass--basedirand avoid the ticket problem altogether? I don't know which one would be easier to implement, but eh... just an idea.
Sadly the way patches work makes this very difficult to implement.
Hey @hgdagon @thonkinator can you try using NSTool v1.9.0 (https://github.com/jakcron/nstool/releases/tag/v1.9.0)?
You should be able to specify two tickets by invoking --tik for each ticket file.
Works as expected on my end!
sorry @jakcron totally forgot about this issue. it worked fine. i'm running into an issue with a newer patch for the same game though, although i'm not sure whether it's the same issue or a related issue or what. it's #115. thanks for making this tool!