If you delete an .rpy file, all the code within is gone and a chunk of the game is now missing, isn't it?
Absolutely not. The source code is gone (relatively speaking since it can be retrieved), but the source code isn't what Ren'Py use when playing the game. Many games only distributes the
rpyc
files and they have no problem to be played.
If not, then you're giving advice for a far more specific situation than the one in the above post appears to be.
1) It's not me who gave this advice.
2) It's an advice totally relevant to the question, since randomly deleting a
rpyc
file can break the save compatibility.
3) It's just repeating what is in the documentation, something that PyTom said thousands of times, to the point that he even (almost ? Don't remember precisely) dedicated one of his monthly article to this sole subject.
While that's all true, none of this is something one wouldn't expect from an update and can't work around.
There's no world where it's something one would expect ; and especially not the users. It's not because more and more software act like that (and I don't just talk about indie adult games), that it's something that should be expected.
As one of my teacher said, from memory, "if you've to change the order of your data when you update your code, then you did it wrong from the start". And the same apply here. If your update isn't fully transparent and have any kind of annoyance, like sending you back to the start of the label, by example but not only, then you did it wrong from the start.
E.g. a game with a translation also needs to have the translation updated when a patch hits.
Not when it's just a bug fix. At least not if you don't delete the
rpyc
files, because if you do there's risk that you've to redo all the translation.
Yes, sometimes saves can break completely and for a lot of VN's it's no good if massive labels get restarted each update. That's not a reason to issue a universal ban on deleting .rpyc files. It's a reason to say "Be cautious! Learn what can go wrong.".
No, it's a reason to say "learn to do things right", and it's precisely what we did.
Ren'Py best point is that it's a really lax and tolerant game engine. But it's also it's worse point, because more or less half of the games available here are broke in a way or another due to this tolerance.
Most of the time it's not visible, because we don't know what should have happened, because we have the same behavior than the dev, or because we make the choice expected by the author. But if we look at the code, we see that there's parts that are unreachable, or that are silently skipped. If we don't have the same behavior than the dev, we discover bugs, strange behaviors, or just miss animations. And if we make a choice that the author haven't expected, we end nowhere.
Learning to do things right, from the start and even for what looks the more insignificant, is the first step to a stable and not broke game.
It absolutely does. He recommends against any and all .rpyc deletion whatsoever. Since that's very close to recompiling, that would also mean you were wrong here:
There's nothing comparable between a compilation and the creation of a
rpyc
file.
A compilation transform your something highly dependent, you source code, into something that can be directly proceeded by under a wild range of cases. As long at the CPU (or what replace it) understand the set of instruction, and the OS have the right API, the compiled code will works. That's why you can still use +20 years old software on Windows 11, run Windows software on ReactOS, or emulate a C64 on your modern PC, among other things.
Plus, as long as you know assembly language, you can understand the result of the compilation and what the code is doing.
But the creation of a
rpyc
is a totally different process. In a way it's near to the pre-processing performed by some interpreted languages. But "in a way" only, because the process only care about the data and totally ignore the way they'll be proceeded.
rpyc
files are just a way to store objects and their values ; but objects deprived to any code, there's their name and there values, nothing more.
This mean that a
rpyc
file is even more dependent than a
rpy
file is. Only Ren'Py, and technically speaking only the right version (practically the backward compatibility is relatively good), can understand what is stored in a
rpyc
file.
If you achieved to get a humanly readable version of the
rpyc
file, you still wouldn't be able to understand what it's doing. You would know that there's an object named "whatever", that it's "myVar" attribute have such value, its "otherVar" have that value, but that's all you would get from the
rpyc
file. What this object do, what those value mean, is something totally independent of the file.
Therefore, the creation of a
rpyc
file is at the opposite of a compilation, in this way that the compilation create something still understandable and less dependent, while the creation of a
rpyc
file create something more dependent and mostly obscure.
And effectively I wasn't wrong, but in the context where I gave this answer. It's not the deletion of the
rpyc
file that will, by itself, break the save compatibility. As I said in the same discussion (perhaps not directly in the post you quoted), it's how you'll deal with your code after this deletion that can possibly break it. What mean that:
I don't think you were wrong then, and thus I think this absolute recommendation is wrong, or at least quite misleading.
It's not misleading, it's a warranty.
OP said that he have near to no codding knowledge and his totally new to Ren'Py. This mean that he can possibly do all the errors that can lead to a broke save compatibility, when not a broke save, in case of deletion of the
rpyc
files.
Above you said that your issue was with the absolute. Well, in the absolute, he'll do this thing that make Ren'Py crash silently when you load a save file. A problem than only happen when the
rpyc
files have been deleted, and that have hit few games available here ; but haven't happened since a long time, so perhaps that PyTom finally achieved to understand it or, more surely, it was silently solved by the fix of something else.
What is an even better reason to not do it. In computer science, there's nothing to fear more than a "can" where you expected a "will".
A "will" mean that we know what can happen and why it happen. There's no work around, no way to easily fix this, but at least we know what we have to avoid. It also mean that we will immediately know if our code is broke or not, by testing it under the condition that trigger the problem.
But a "can" mean that everything is possible, from the best scenario (everything works fine) to the worse one (nothing works and we have no clue why). And like there's no fixed conditions that trigger the problem, we have no way to know if our code is broke or not.
It can perfectly works fine for years, until one user do something a little differently and boom. I think it was in the late 90's that I had to fix a software because of this kind of problem. It was a management software that worked fine since decades, for probably dozens of thousands users since at this time it was the product number one on the market. At least it worked fine until the day someone had two consecutive accented characters in his name, and I had to figure out why it broke everything.
So, when you read something like, "doing this
can lead to trouble", do not do the said thing, even if it mean that you'll have to pass one week finding a work around. Else you'll be walking on a minefield. Perhaps that you'll make 99,99% of your way out without problem, but the 0.01% left can be the moment when you'll put your foot on a mine.