Ren'Py - Modifications directly in NSP files / repack

darkangel5000

Well-Known Member
OP
Member
Joined
Apr 26, 2008
Messages
389
Trophies
1
Age
32
Location
Unna, ~Dortmund :3
XP
918
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
Member
Joined
Oct 14, 2018
Messages
5,731
Trophies
3
XP
10,708
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
394
Trophies
0
Location
Bonerville
XP
1,079
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
389
Trophies
1
Age
32
Location
Unna, ~Dortmund :3
XP
918
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
394
Trophies
0
Location
Bonerville
XP
1,079
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,
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    1H left, such a slow week.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Okay, I had spaghetti :P
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
  • BentlyMods @ BentlyMods:
    My fav actvity is:

    mario-dancing.gif
    BentlyMods @ BentlyMods: My fav actvity is: