Hacking [QUESTION] Change the title ID of a game

lordelan

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
5,615
Trophies
1
Age
43
XP
5,931
Country
Germany
I want to install multiple copies of Mario Kart 8 Deluxe and BOTW simultaneously on my Switch, as I wanna have separate games for different mod (packs).
I'm well aware of LayeredFS and that I don't have to but want it anyway. Also want different save games on each so I'd say it's a legit request.
I've dumped main game, update and DLC of my MK8D and ended up with three NSPs.

So my questions are:
  1. Which tool do I need to "unpack" the NSP in order to alter files? Is it HacTool?
  2. Which file(s?) would I need to edit in order to change the title ID?
  3. Is there any reason why I wouldn't be able to copy mod files directly into the unpacked NSP before repacking it so the installed game comes already shipped with the mod included (without the need of LayeredFS)?
  4. Which tool do I need to repack my altered files to NSP again? Also HacTool?
  5. Important question: How would I edit the update and DLC file to belong to my newly created base game NSP with an altered title ID?
    Or can I just unpack those two and include it into the base game files as well before repacking to have one single "All-in-One-NSP" that I install?
  6. Bonus question: Is there any convention or pattern I should rely on when giving my games new title IDs?
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
I’m curious about this too. A useful idea if there’s a way to pull it off.

My hunch would be that the titleID will be sprinkled throughout the game so it may or may not function at all under a made up title ID.
source: my pink nether regions.

I’ll shutup now to allow someone with actual knowledge to chime it.
 
  • Haha
Reactions: BigOnYa

lordelan

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
5,615
Trophies
1
Age
43
XP
5,931
Country
Germany
We need to figure it out.
Pretty sure people like @SciresM know it.
I'll gladly provide a well written tutorial here on gbatemp for both (title ID changing and including mods/update+dlc directly into NSP) once my question got answered and I got that running.
 
  • Like
Reactions: AinzOoalGown

masagrator

The patches guy
Member
Joined
Oct 14, 2018
Messages
5,731
Trophies
3
XP
10,707
Country
Poland
SciresM won't provide solution, for NSP this requires repacking game, and repacking game makes validation checks invalid, thus game like that is considered as pirated content.

It would be easier to implement mod separation for different profiles to Atmosphere, but I doubt SciresM will want to implement such niche feature as already has doubts in implementing mod separation for emummc and sysmmc which I guess is more valid request.
 
  • Like
Reactions: BigOnYa

lordelan

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
5,615
Trophies
1
Age
43
XP
5,931
Country
Germany
SciresM won't provide solution, for NSP this requires repacking game, and repacking game makes validation checks invalid, thus game like that is considered as pirated content.
While I don't care for that (as what I'm planning to do is legit anyway as long as I bring my own MK8D game to the party) and should be fine with signature patches, I wonder if it's even possible to repack NCAs or romFS back into NSP/XCI. I looked at HacTool, HacToolGUI (abandoned) and HACGUI and it appears that it's "only" possible to extract Switch games but not repack them. :huh:

The official gbatemp thread of HacTool claims it can repack NSPs but there's literally zero documentation about this tool and I can't seem to find it among all possible CLI arguments within the GitHub readme.
 
Last edited by lordelan,

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
While I don't care for that (as what I'm planning to do is legit anyway as long as I bring my own MK8D game to the party) and should be fine with signature patches, I wonder if it's even possible to repack NCAs or romFS back into NSP/XCI. I looked at HacTool, HacToolGUI (abandoned) and HACGUI and it appears that it's "only" possible to extract Switch games but not repack them. :huh:

The official gbatemp thread of HacTool claims it can repack NSPs but there's literally zero documentation about this tool and I can't seem to find it among all possible CLI arguments within the GitHub readme.
I‘m pretty sure hacBrewPack will put NSPs back together again. Might be just for homebrew though. :-(
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,512
Trophies
2
XP
5,962
Country
United States
Same person also made hacPack which is more geared towards repacking Nintendo Switch games. Maybe this is what you guys are looking for?
Good call! Seems @DarkMatterCore ’s rendition is most up to date.

https://github.com/DarkMatterCore/hacPack

Going to see if it builds w/ latest from DevKitPro.

e: closing the loop here. Not only does it build w/ latest, the 2019 releases from @The-4n still run on Windows just fine.

I’ve not mucked with anything end-to-end and I don’t know if there will be any issues w/ keys or anything. It shouldn’t matter but don’t know for sure, yet. Going to look for a good tut and see if I can make a custom SMO or something basic as a test.
 
Last edited by binkinator,

Unity150_magickavoxel

Well-Known Member
Member
Joined
Jan 6, 2018
Messages
120
Trophies
0
Age
22
XP
819
Country
Canada
hactool to unpack nsp and extract program nca that will give exefs and romfs and also extract control nca if you want to change the icon. Also need to change the titleid in main.npdm. Repack the nca using hacpack and also need to make a meta nca
then make nsp using those nca's using hacpack. As for titleid you should just use titleids from other games that you won't ever play.
 
  • Like
Reactions: lordelan

masagrator

The patches guy
Member
Joined
Oct 14, 2018
Messages
5,731
Trophies
3
XP
10,707
Country
Poland
Bonus question: Is there any convention or pattern I should rely on when giving my games new title IDs?
game titleid must be higher than 0100000000010000 and lower than 01FFFFFFFFFFE000
it must be divisible by 0x2000

update must have: titleid of base game titleid + 0x800
DLC titleid must have: titleid of base game + 0x1000 + DLC ID (1 or 2 or 3, etc)
 

lordelan

Well-Known Member
OP
Member
Joined
Jan 4, 2015
Messages
5,615
Trophies
1
Age
43
XP
5,931
Country
Germany
hactool to unpack nsp and extract program nca that will give exefs and romfs and also extract control nca if you want to change the icon. Also need to change the titleid in main.npdm. Repack the nca using hacpack and also need to make a meta nca
then make nsp using those nca's using hacpack. As for titleid you should just use titleids from other games that you won't ever play.
Thanks! :) I'm about to try this probably this evening. And good point, I also want to change the icon.
game titleid must be higher than 0100000000010000 and lower than 01FFFFFFFFFFE000
it must be divisible by 0x2000

update must have: titleid of base game titleid + 0x800
DLC titleid must have: titleid of base game + 0x1000 + DLC ID (1 or 2 or 3, etc)
That's very helpful, thanks.
I should probably be fine using any Title ID that (e.g.) nro2nsp generates randomly I guess. And I'm about to try to bundle update and DLCs into the base game before repacking it so I only need that one Title ID.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    Skelletonike @ Skelletonike: link doesn't work +1