Make AppData Read-Only

Dec 10, 2019
50
3
Don't want renpy games to make folders in appdata so have made that read-only.
Some games work with no issue,
while some others dont have data persistent and keep on reverting to default settings. Some get fixed by rpyc below, whereas some crash saying they cant load the rpyc.
You don't have permission to view the spoiler content. Log in or register now.

And on this game Innocent Witches https://thef95zone.info/threads/innocent-witches-v0-11-2-beta-fix3-sad-crab.330, it keeps on crashing with this error

You don't have permission to view the spoiler content. Log in or register now.

What can be done to fix this error, and is there a universal script to change default save location from Appdata/Roaming to within the game folder.
 
  • Haha
Reactions: osanaiko

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,671
8,296
read only appdata :HideThePain::HideThePain::HideThePain::HideThePain::HideThePain::HideThePain::HideThePain::HideThePain::HideThePain::HideThePain:
why what are you doing, appdata is the whole reason it exists. Where do you want software to write? on documents like back in 2006?
 
  • Like
Reactions: anne O'nymous

Nadekai

Booty Pirate
Donor
Aug 18, 2021
2,204
6,917
... ... AppData is a folder for... apps to write their data into so you can have it organized
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,419
17,379
Don't want renpy games to make folders in appdata so have made that read-only.
So, all the software that use it, and, well, they all use it, including Windows, as well as all those that need the temporary folder will not be able to save their data...
But let's be fair, it's not an issue for most of them, they generally have a fallback procedure. Oh, of course, it mean that their data are spread everywhere on the disk, instead of being located in a single place, what prevent to clean them time to time.


Some get fixed by rpyc below, whereas some crash saying they cant load the rpyc.
Well, starting the version 7.5.0/8.0 Ren'Py use a different version of pickles to generate the "rpyc" files, therefore obviously that it will crash time to time. Reason why anyone who know a bit what he's doing only deal with "rpy" files for this kind of things.


What can be done to fix this error, [...]
I'm tempted to say that the best way to fix this error is to not voluntarily break your whole OS...

The game rely on a multi-persistent object, probably to transfer the data from a season to another, and well, multi-persistent objects are stored in %AppData%, and in %AppData% only since their main interest is to be game independent.


and is there a universal script to change default save location from Appdata/Roaming to within the game folder.
The one you use (so wrongly) is supposed to be that...
 
  • Like
Reactions: Winterfire

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,671
8,296
Also keep in mind that not everything has a fallback procedure, there's a reason why appdata is invisible. You shouldn't mess with it.

Most software is meant to be installed, and once upon a time they saved the data locally... However, at some point Program Files became one of the many Windows folders that are protected, meaning you cannot save data there anymore. At that point it became a far west, with most of them saving on documents (funnily enough, some games saved on documents, but not on the windows folder called "Game Saves" :LUL: ), now there's a standard which is appdata, and as the name suggests, it's data generated by applications, from save files to config.

More often than not, locking your whole appdata will simply soft break your applications, so if you were to open a game and change some settings, when you boot that game up again the settings will have been reverted to the default.

My suggestion is not to break your own system, and simply let appdata be appdata. If you want Ren'Py games specifically not to save on Appdata but locally, create or ask someone to make a mod for it... Setting your appdata to read only is like setting your house on fire because of a spider, when a much more reasonable option would have been to catch it and set it free in the wild.
 
  • Like
Reactions: anne O'nymous

AllNatural939

I am the bad guy?
Game Developer
Apr 3, 2024
498
571
Haha, no offense, but... throwing water on a working monitor makes more sense than trying to block all apps from running properly... What's the point?... AppData is important... I don't get it :ROFLMAO:
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
1,519
2,807
Instead of fucking with the AppData folder (which has been mentioned is used for MANY things), just change the save folder location or turn it off altogether.



Setting it to "None" makes it so the only save files are in the game directory itself.

EDIT: Never mind, I read your OP wrong and now see you tried this originally.

Your errors are probably because of some issue with installing as Admin, using as a user or some other reason mentioned in that doc I linked above. Or you are messing with .rpyc files when you should be adding an .rpy file and letting Ren'py update the .rpyc file automatically, like Anne said.

You can try using define instead, since they load at INIT time...

Python:
define config.save_directory = "None"
 
Last edited:
Dec 10, 2019
50
3
Also keep in mind that not everything has a fallback procedure, there's a reason why appdata is invisible. You shouldn't mess with it.

Most software is meant to be installed, and once upon a time they saved the data locally... However, at some point Program Files became one of the many Windows folders that are protected, meaning you cannot save data there anymore. At that point it became a far west, with most of them saving on documents (funnily enough, some games saved on documents, but not on the windows folder called "Game Saves" :LUL: ), now there's a standard which is appdata, and as the name suggests, it's data generated by applications, from save files to config.

More often than not, locking your whole appdata will simply soft break your applications, so if you were to open a game and change some settings, when you boot that game up again the settings will have been reverted to the default.

My suggestion is not to break your own system, and simply let appdata be appdata. If you want Ren'Py games specifically not to save on Appdata but locally, create or ask someone to make a mod for it... Setting your appdata to read only is like setting your house on fire because of a spider, when a much more reasonable option would have been to catch it and set it free in the wild.
Didnt think to decompile the rpyc file to rpy -- thanks for the idea --
tho sometimes even with the script some games still dont have persistent data and stop working and said before that with innocent witches game i get the screenshot error which ive never seen before
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,419
17,379
tho sometimes even with the script some games still dont have persistent data and stop working and said before that with innocent witches game i get the screenshot error which ive never seen before
And you got an answer for this...
 

n00bi

Active Member
Nov 24, 2022
518
604
I am not sure why you dont want to have a renpy folder in appdata.
if you play a lot of renpy games you at least know where all the saves are located.
changing every game you play to include a custom path seams a bit stupid if you ask me.

What can be done to fix this error, and is there a universal script to change default save location from Appdata/Roaming to within the game folder.
The solution is simple, dont remove the renpy directory in appdata :p
But can you live with a link in appdata that is named renpy ??
If so, You can use a Junction, so the data is stored on another disk/location.
Why a junction link instead of a Symbolic link. Because: Some software and tools (especially older ones) treat symbolic links as shortcuts but treat junctions as real folders.

Copy the directory to a new location, delete it from Appdata and run.
Example:
mklink /J C:\Users\%USERNAME%\%APPDATA%\RenPy X:\New_Location\RenPySaves
 
Last edited: