Ren'Py Over rides

frozenfeet

Well-Known Member
Aug 2, 2019
1,199
1,832
Couple of questions:
I was wondering if there is a way to over ride the given save directory in a Ren'py game? I have these in my over ride script. The problem is that: config.save_directory = "", doesn't seem to stop the game from saving to the appdata folder.
You don't have permission to view the spoiler content. Log in or register now.

Second question in that over ride script how do I query which version of Ren'py is being used? I want to be able to use an if statement that will know which version the game is so that I can turn on the config.has_sync = False, since it is only on Ren'py version 8.1.3+ I can't leave it on. I just want to make it so it will get the Ren'py version and then turn off the synch if it is there.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,576
2,203
Second question in that over ride script how do I query which version of Ren'py is being used? I want to be able to use an if statement that will know which version the game is so that I can turn on the config.has_sync = False, since it is only on Ren'py version 8.1.3+ I can't leave it on. I just want to make it so it will get the Ren'py version and then turn off the synch if it is there.

The second question is an easier answer for me right now.
Don't worry about the RenPy version, just check if the config.has_sync variable exists first...

Python:
init 990 python:

    if hasattr("config", "has_sync"):
        config.has_sync = False

I use it for each game I play (I put the following in the /game/ folder before I first start each new game).
You don't have permission to view the spoiler content. Log in or register now.
(File also attached, for easy patching)

As for the first question - erm, why do you want to change the save folder?
The why might help me think about the how you might do it.
 

peterppp

Active Member
Mar 5, 2020
513
927
None, not ""
Setting this to None creates a "saves" directory underneath the game directory. This is not recommended, as it prevents the game from being shared between multiple users on a system. It can also lead to problems when a game is installed as Administrator, but run as a user.
 

frozenfeet

Well-Known Member
Aug 2, 2019
1,199
1,832
The second question is an easier answer for me right now.
Don't worry about the RenPy version, just check if the config.has_sync variable exists first...

Python:
init 990 python:

    if hasattr("config", "has_sync"):
        config.has_sync = False

I use it for each game I play (I put the following in the /game/ folder before I first start each new game).
You don't have permission to view the spoiler content. Log in or register now.
(File also attached, for easy patching)

As for the first question - erm, why do you want to change the save folder?
The why might help me think about the how you might do it.
Thanks for the info
Also if you use: config.extra_savedirs.remove(config.savedir + "/sync")
That removes the synch folder from the save folder.

I want to remove the appdata folder because Ren'py already saves inside the game folder and I make a lot of saves. I have some games with over 500 saves and I don't want that duplicated also I really don't like it when programs use the appdata folder because if something goes wrong with windows and I have to wipe then I lose all the info in appdata.

peterppp
Ren'py already saves inside the game folder regardless of the setting of the appdata save. I don't run as a user and I don't share saves with anyone either.


P.S found a solution on that page that peterpp linked to remove the appdata save. Had to use the "init python early" command to make it work.
 
Last edited:

peterppp

Active Member
Mar 5, 2020
513
927
peterppp
Ren'py already saves inside the game folder regardless of the setting of the appdata save. I don't run as a user and I don't share saves with anyone either.

P.S found a solution on that page that peterpp linked to remove the appdata save. Had to use the "init python early" command to make it work.
but setting it to None stops saving it to appdata, which was what you wanted?
 

frozenfeet

Well-Known Member
Aug 2, 2019
1,199
1,832
but setting it to None stops saving it to appdata, which was what you wanted?
Yes that is what I want, been doing it for a while now. I wanted to do it as an over ride because before I was doing it by hand commenting it out in the options config.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,576
2,203
I want to remove the appdata folder because Ren'py already saves inside the game folder and I make a lot of saves. I have some games with over 500 saves and I don't want that duplicated also I really don't like it when programs use the appdata folder because if something goes wrong with windows and I have to wipe then I lose all the info in appdata.

I can see why you might not want the duplication, but the AppData is also useful when updating to a new release.
If you've been playing 0.4 and install 0.5, the AppData folder means you don't need to copy your saves from one save folder to the new one.
It's why saves still work when the default folder name for games are usually something like D:\Games\MyTestProject-0.5-pc.

RenPy effectively merges the current version of the game's save folder with the one in appdata.

But as long as things only affect you, I see no harm - since you understand the consequences. Though, I would advise any would-be developers not to do anything like this.