Ren'Py - Modifications directly in NSP files / repack

darkangel5000

Well-Known Member
OP
Member
Joined
Apr 26, 2008
Messages
394
Trophies
1
Age
33
Location
Unna, ~Dortmund :3
XP
1,218
Country
Germany
Hey there.
After I've succesfully used LayeredFS to mod Artemis Engine visual novels back to their "original" state, it looks like I've run into a brick wall when it comes to Ren'Py-games.

One example of this would be the VN Summer Days, which comes with the same renpygame\game\main\story\script_main.rpyc file as the uncensored PC version.
The problem lies within the fact that the romFS includes another renpygame\game\tl\clean\main\story\script_main.rpyc-file, which is used to remove certain text passages on the Switch version.
If I use atmosphere's LayeredFS to replace that second script_main.rpyc with another valid .rpyc from the Switch version, the game won't boot. If I replace it with an empty file, it won't boot.

After some extensive testing I suspect that the modification could work, if the second script_main.rpyc wouldn't exist in the first place.
If this approach is falsified, it would at least lead to two possible outcomes:
a) Open another possibility of working with the decrypted .rpy-files
b) Give me peace of mind, knowing that it's not possible to do for me, with my current skillset.
And option a) would again require me to delete the original .rpyc-files, before they are loaded automatically.

I've looked at a great bunch of documentation in the past few days, I have at least the slightest of ideas of how to build an NSP out of .cert, .tik and .nca files - but I can't seem to get to the point, where I could build an NSP either out of the raw romFS/exeFS folders OR at least how to repack the romFS folder to an NCA file.

So, Is there any feasible way to do this or am I just building castles in the sky?
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,257
Trophies
3
XP
12,008
Country
Poland
so tl;dr you want from game to not detect that this second file exists at all?
if this path is hardcoded into executable, you can make exefs patch. If not, you can make skyline plugin and hook nn::fs::openfile to throw "file not detected" on this path.

If you can upload "main" file from exefs here, I can look at that.
Hopefully game doesn't use NROs
 

Impossible_Igntiz

Well-Known Member
Member
Joined
Nov 16, 2018
Messages
421
Trophies
0
Location
Bonerville
XP
1,177
Country
United States
Hey there.
After I've succesfully used LayeredFS to mod Artemis Engine visual novels back to their "original" state, it looks like I've run into a brick wall when it comes to Ren'Py-games.

One example of this would be the VN Summer Days, which comes with the same renpygame\game\main\story\script_main.rpyc file as the uncensored PC version.
The problem lies within the fact that the romFS includes another renpygame\game\tl\clean\main\story\script_main.rpyc-file, which is used to remove certain text passages on the Switch version.
If I use atmosphere's LayeredFS to replace that second script_main.rpyc with another valid .rpyc from the Switch version, the game won't boot. If I replace it with an empty file, it won't boot.

After some extensive testing I suspect that the modification could work, if the second script_main.rpyc wouldn't exist in the first place.
If this approach is falsified, it would at least lead to two possible outcomes:
a) Open another possibility of working with the decrypted .rpy-files
b) Give me peace of mind, knowing that it's not possible to do for me, with my current skillset.
And option a) would again require me to delete the original .rpyc-files, before they are loaded automatically.

I've looked at a great bunch of documentation in the past few days, I have at least the slightest of ideas of how to build an NSP out of .cert, .tik and .nca files - but I can't seem to get to the point, where I could build an NSP either out of the raw romFS/exeFS folders OR at least how to repack the romFS folder to an NCA file.

So, Is there any feasible way to do this or am I just building castles in the sky?
Hi, i was looking into making an uncensored mod for Summer Days and was wondering if you how to decrypt or in this re-encrypt the un-readable .png files the game uses on the Switch port?
 

darkangel5000

Well-Known Member
OP
Member
Joined
Apr 26, 2008
Messages
394
Trophies
1
Age
33
Location
Unna, ~Dortmund :3
XP
1,218
Country
Germany
so tl;dr you want from game to not detect that this second file exists at all?
if this path is hardcoded into executable, you can make exefs patch. If not, you can make skyline plugin and hook nn::fs::openfile to throw "file not detected" on this path.

If you can upload "main" file from exefs here, I can look at that.
Hopefully game doesn't use NROs
Yup, that's exactly what I want. So thanks, I'll take a look into Skyline, as theoretically Ren'Py should just dynamically load rpyc files it finds in the \game directory
Regarding the file I'll shoot you a DM when I get home.

Hi, i was looking into making an uncensored mod for Summer Days and was wondering if you how to decrypt or in this re-encrypt the un-readable .png files the game uses on the Switch port?
There's zero need to work with the scrambled .pngs, as Ren'Py on Switch works just fine with regular .png files.
I.e. you can just use UnRen to unpack the main.rpa from the PC version and use those assets via LayeredFS.
 
Last edited by darkangel5000,

Impossible_Igntiz

Well-Known Member
Member
Joined
Nov 16, 2018
Messages
421
Trophies
0
Location
Bonerville
XP
1,177
Country
United States
Yup, that's exactly what I want. So thanks, I'll take a look into Skyline, as theoretically Ren'Py should just dynamically load rpyc files it finds in the \game directory
Regarding the file I'll shoot you a DM when I get home.


There's zero need to work with the scrambled .pngs, as Ren'Py on Switch works just fine with regular .png files.
I.e. you can just use UnRen to unpack the main.rpa from the PC version and use those assets via LayeredFS.
Really? everytime i tried doing that, it never worked with me.... is there a directory folder or files i'm missing to do so?

Edit: YO!!!!!! That method you told me actually worked!!!!! Thank you very much!!!! :D
 
Last edited by Impossible_Igntiz,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @Psionic Roshambo, Hey, VSauce. Where are your fingers?