Ren'Py New Ren'Py Token Check (when creating a save)

shoty

Newbie
Apr 27, 2017
26
19
Actualy, the solution that saveeditonline proposed works wonders and its quite easy to implement, just go to the renpy folder inside you main game folder, look for savetoken.py, open it with a text editor and replace the line "if token_dir is None" to "if True", and that´s it, you can import any save you want, without further modify you save or upload your codes anywhere. No mod needed, it´s quite simple
Hello Twistty
Hey so I did your mod and installed it in a game that I was playing and it worked wonders, but I try modifying the save again it gave me this, any thoughts? View attachment 3664426
 
  • Hey there
Reactions: Twistty

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,369
38,949
Actualy, the solution that saveeditonline proposed works wonders and its quite easy to implement, just go to the renpy folder inside you main game folder, look for savetoken.py, open it with a text editor and replace the line "if token_dir is None" to "if True", and that´s it, you can import any save you want, without further modify you save or upload your codes anywhere. No mod needed, it´s quite simple
That is only a partial fix - depending on the ren'py version used.
Some of the newer versions added a few extra line of code - if not edited or removed - may cause "issues".

Also the "extra_savedirs_fix.rpy" file - stops the extra "sync" files *(redundant save files) from being created in the appdata/roaning/renpy/game folders. Those files are fairly useless - and wastes a lot of drive space. It also includes some of the most common, and used game fixes - that aid many games.

But the choice is always up to each individual user! ;)
Cheers
 

WuzzyFuzzy

Well-Known Member
Jan 23, 2020
1,536
3,113
Twistty
I've recently ran into a conflict on a few games I thought I'd bring to your (and everyone else's) attention. If a game does NOT have a .../renpy/common/00steam.rpy file in place, adding your fixes (and thereby adding that 00steam.rpy file) will crash the game at onset with:

You don't have permission to view the spoiler content. Log in or register now.
Removing that file allows the game to run without issue. Do we need to have two versions? One for games headed to Steam and another version for non-Steam games?
 
  • Yay, new update!
Reactions: Twistty

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,369
38,949
Twistty
I've recently ran into a conflict on a few games I thought I'd bring to your (and everyone else's) attention. If a game does NOT have a .../renpy/common/00steam.rpy file in place, adding your fixes (and thereby adding that 00steam.rpy file) will crash the game at onset with:

You don't have permission to view the spoiler content. Log in or register now.
Removing that file allows the game to run without issue. Do we need to have two versions? One for games headed to Steam and another version for non-Steam games?
Yes - I totally forgot about that when I updated my mod.

Edit:
The game you listed is:
Ren'Py 7.3.5.606
It shouldn't even need this mod - just the extra_savedirs_fix.rpy - if you find the game fixes useful.
The renpy folder part of the mod is only needed if it has a savetoken.py already a part of the game.
 
Last edited:
  • Like
Reactions: WuzzyFuzzy

WuzzyFuzzy

Well-Known Member
Jan 23, 2020
1,536
3,113
Yes - I totally forgot about that when I updated my mod.

Edit:
The game you listed is:
Ren'Py 7.3.5.606
It shouldn't even need this mod - just the extra_savedirs_fix.rpy - if you find the game fixes useful.
The renpy folder part of the mod is only needed if it has a savetoken.py already a part of the game.
You're correct. My bad. I should have looked at that version number. I'll look more closely next time. Thanks.
 
  • Crown
Reactions: Twistty

maverickson

Newbie
Jun 5, 2024
19
10
Actualy, the solution that saveeditonline proposed works wonders and its quite easy to implement, just go to the renpy folder inside you main game folder, look for savetoken.py, open it with a text editor and replace the line "if token_dir is None" to "if True", and that´s it, you can import any save you want, without further modify you save or upload your codes anywhere. No mod needed, it´s quite simple
clarification
if token_is is non
if true
would it look like if true in place of token_dir
 
Aug 3, 2022
23
1
Hi, if you try to do this on an android device do the following:

1. Connect your device to a computer.

2. Enable PTP

3. Create, on your computer, a file called security_keys.txt with the text: Signing-key (and nothing else).

4. Make that file read only.

5. Transfer that file to your device.

6. Replace the signing_keys.txt file inside the folder that holds your saves with the file you had created.

*7. Open the game, load the fixed file and then save to a new spot.

*8. Close the game and delete the altered security_keys.txt.

*9. Reopen the game (so it will recreate the original security_keys.txt) and open the NEW save, it will ask you one time if you sure but will let you to open.

*10. Save the game again and there should be no problems henceforth.

11. Enjoy.

* 7-10 are to address the concern about not having the original security_keys.txt
I didnt get the steps sorry, can you explain further? Plz
 

ArunPrime

Member
Nov 5, 2022
270
397
Hello Everyone,
I have a question Is there a way to prevent from creating "security_keys.txt", "upgraded.txt" and "signature" inside the save file.
 
  • Thinking Face
Reactions: Twistty

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,369
38,949
Hello Everyone,
I have a question Is there a way to prevent from creating "security_keys.txt", "upgraded.txt" and "signature" inside the save file.
Not effectively no.
"upgraded.txt" - is just info on what games have a "save token" in the renpy folder.
"security_keys.txt" - should NEVER be deleted.
- It will be re-created anyways (but at times in ways - that may break save game files).
 

ArunPrime

Member
Nov 5, 2022
270
397
Not effectively no.
"upgraded.txt" - is just info on what games have a "save token" in the renpy folder.
"security_keys.txt" - should NEVER be deleted.
- It will be re-created anyways (but at times in ways - that may break save game files).
Thanks for the answer.
Older renpy version doesn't have this options so we don't worry. only the latest version have(8+).

I'm usually play renpy games in JoiPlay, and Sometimes port android build.

I found another solution,
hided the "save_directory" this way renpy can't create this extra files.
Inside the save file "signature" will be empty :)
 
  • Like
Reactions: phdusa1 and Twistty

RXRO

Newbie
Jan 23, 2021
63
31
Hello, I have a quick workaround for this
Here is a python script that can use your local tokens and overwrite the save signature to unlock it

How-to-use it

0) Make sure you have python3 installed and it accessible from console + install ecdsa using 'pip install ecdsa'
1) Unpack python script into your test folder.
2) You need to find your save location and copy "security_keys.txt" to folder with your script
3) copy savegame (1-11-LT1.save for instance into location with Your script)
4) run script 'python3 repack-savefile.py security_keys.txt 1-11-LT1.save' (where first should be your tokens textfile, second is name of savegame). Path can be absolute or relative - should work in both cases.
5) copy savegame file back to savegame location, override it.
Be Aware! this script override "signature" file in your savegame, please make backup before use it.


Just open and follow the instruction

Tested on BigBrother and using
u forgot to add the script
where is the download link for the py script ?
 

derfirm

Newbie
Jan 9, 2021
29
94
u forgot to add the script
where is the download link for the py script ?
Hello, I specifically deleted it because it raised a lot of questions and in general it seemed to me much easier to use the website than to play on the console with the risk of breaking everything