Compiling .rpy files in .rar file

Jul 4, 2020
6
6
I was editting the .rpy files for a game (simple find and replace of a character's name). I deleted the corresponding . rypc files and went to launch project on renpy, but the changes did not take effect (force recompile also didnt work). The .rpy files are stored in a .rar file (used winrar to access). I was wondering how to compile my .ryp files when they are stored in a .rar file. Thanks!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,384
15,291
I was wondering how to compile my .ryp files when they are stored in a .rar file. Thanks!
You just can't.

A game, Ren'Py or not, is not intended to be played in an archive, you need to fully extract it before playing it.
 
Jul 4, 2020
6
6
You just can't.

A game, Ren'Py or not, is not intended to be played in an archive, you need to fully extract it before playing it.
Hi thanks for the reply. Could you elaborate a bit more? I have the game unpacked but /game directory has a scripts.rar file that contains the .rpy files. The game still runs with those files in the .rar file, Im just wondering how to make the edits in the .rpy files take effect. Thanks
 

Meaning Less

Engaged Member
Sep 13, 2016
3,540
7,113
I doubt you can, you probably have another .rpyc file already compiled inside an .rpa or something and your game is using that one to execute the game.

That would explain why you aren't seeing changes when editing the file inside the rar, renpy probably can't even find that one.
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,728
Hi thanks for the reply. Could you elaborate a bit more? I have the game unpacked but /game directory has a scripts.rar file that contains the .rpy files. The game still runs with those files in the .rar file, Im just wondering how to make the edits in the .rpy files take effect. Thanks
As AON said, Ren'Py can't run the rpy scripts from within an archive file (rar, zip, 7zip etc.). The rar file is probably just a backup of the original script files.

If the game runs fine, that means the actual script files are somewhere else, such as within a rpa file. If the game has rpa files, you'll need something like UnRen to extract the game files (including the script files). Or you can just extract them from the rar file, though the risk is they might not be the same as the actual script files the game is currently using.

Try leaving your edited rpy files lose in the game folder (i.e. don't repack them in a rar file), and then check if your changes take effect. The lose, edited rpy files should have priority over files within a rpa file. If the game complains about duplicate labels, quit and restart the game to fix it.

If you're modding a released game, you shouldn't be deleting the existing rpyc files either, you'll end up breaking existing saves.
 
  • Like
Reactions: anne O'nymous