One of my .rpy files appears to be corrupted somehow; unsure what caused it

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
heartfragment
Regular
Posts: 109
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

One of my .rpy files appears to be corrupted somehow; unsure what caused it

#1 Post by heartfragment »

The issue:
The .rpy file for one of the routes in my game appears to be damaged or corrupted. I have been saving frequently while editing it in Atom, but I left my laptop for about ~15 minutes to walk my dog. When I return my laptop had restarted. I opened the file and all of the text had been replaced with spaces. The number margin that usually appears in my .rpy files was replaced with bullet points instead.

I think the file may be corrupted or damaged because when I try to launch the game with that .rpy file in the game's folder, it won't launch. I'm taken to a glitched blank screen. If I take that .rpy file out, the game loads and works fine.

Things I've tried:
Appdata - I went through my appdata folder. I've made save points frequently (usually every 5 to 10 minutes) all day but there are no previous versions saved there. The most recently saved backup is from a few days ago. I have 10+ back up files in my appdata for every other day that I worked on it except today.
Data recovery scans with multiple programs - no previous versions found for today.
I'm not sure why my previous versions wouldn't be saved on appdata or available from data recovery, considering I've been working on the file for approx 9 hours today and saved frequently.

If anyone has a potential solution it would be greatly appreciated. Thanks!
Published Project:
Image

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: One of my .rpy files appears to be corrupted somehow; unsure what caused it

#2 Post by hell_oh_world »

i know you just said you checked the appdata folder but I just want to make sure that you mean this? `%appdata%/renpy/backups`? Try doing `winkey` + `r` then hit that and look for the actual name of your game... there should be folder containing all of your scripts.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: One of my .rpy files appears to be corrupted somehow; unsure what caused it

#3 Post by Imperf3kt »

In your game folder you'll also find rpyc files.
Make a backup of the rpyc file that has the same name as the offending .rpy file and then press the force recompile button in the renpy launcher. (This will delete the rpyc file and forcibly create new ones upon next launch of your game.)

Not guaranteed to work, but it may help resolve any odd caching issues.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

ichfly
Newbie
Posts: 14
Joined: Sat Aug 15, 2020 12:40 pm
Contact:

Re: One of my .rpy files appears to be corrupted somehow; unsure what caused it

#4 Post by ichfly »

If you also have the compiled files you can try to reverse that. Else Windows may stored a previous Version of the File (right Click Properties --> previous Versions)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Ocelot