Tool Ren'Py Alternative/ Second save location for RenPy 7.8.2 / 8.3.2 SDK in Android Ports

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
Hi all, I have made a package that will enable alternative or second saves in Android ports done on RenPy, currently 7.7.3 and 8.2.3

Based in part on the work done by Naidin and second save mod by DarkAssassin

Recommended Install RenPy 8.3.2/7.8.2/7.5.0.242n pre packaged below.
Bare files are provided as well including optional build naming. If you want to keep track of APK versions this is the easiest way.
- best to apply them before starting RenPy.

Optionally open all the .py and .rpy files and replace "RenPy_Saves" with a folder name of your choice(i.e. Wills747 ;) )
Hope this all makes sense.

By default saves will be in "Documents/RenPy_Saves/"
Also creates "Documents/RenPy_Saves/game.name.here/game" folder. This is now the default search path and mods or update files can be added there in the device.

RenPy 8.3.2/7.8.2 Release
Removed "sync" folder - now uses Android/data/game.name.here/files/saves folder instead.
Included the import of 0x52_URM.rpa from documents
Removed import of GL2_on.rpy from documents(obsolete)
Fixed delete bug
NOTE:
As a temprary measure I'm using SDK35 to build but still targeting SDK29
You don't have permission to view the spoiler content. Log in or register now.

RenPy 7.5.0.242n Nightly
Yes it's older but relatively bug free
Backport Android clean and tmp file cleanup.
RenPy changes listed in github, notably some games not going full screen either on start or after task switch.


Current:
RenPy 8.3.2 Includes rapt and ready to go



RenPy 8.3.2 Bare files pack


RenPy 7.8.2 Includes rapt and ready to go


RenPy 7.8.2 Bare Files Pack


Older Files:

RenPy 7.5.0.242n
(Nightly) install Incl rapt with Single Alternative Save ready to go:

Bare files needed for 7.5.0.242n and optional build output naming:


(Some older versions back to 7.4.5 are available on request but typically won't be supported)
 
Last edited:

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,943
9,713
Wills747 I have questions. Looking at the changes that you have made in the rapt directory it definitely seems like there is stuff in there that was probably a matter of personal preference and had nothing to do with the storage, am I right?

Or are there no modifications to the contents of the rapt folder and what's in there was just due to the options you've configured in your environment?

I'm trying to figure out exactly which code changes mattered if I was gonna use a different sdk version.
 

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
Wills747 I have questions. Looking at the changes that you have made in the rapt directory it definitely seems like there is stuff in there that was probably a matter of personal preference and had nothing to do with the storage, am I right?

Or are there no modifications to the contents of the rapt folder and what's in there was just due to the options you've configured in your environment?

I'm trying to figure out exactly which code changes mattered if I was gonna use a different sdk version.
Any personal preference stuff I drop in the game directory.
I can/could trim this down a bit, some files are probably not necessary. For size I could get rid of the SDK 30 but you'd end up downloading it anyway.

On a side note I have a 7.3.5 rapt, fixed the issues it had with the bintray service being retired if you want to keep using old versions.

Also I will likely need to modify my solution for RenPy 7.4.9, I will recheck it when it's released.
 

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,943
9,713
I'm building on
Any personal preference stuff I drop in the game directory.
I can/could trim this down a bit, some files are probably not necessary. For size I could get rid of the SDK 30 but you'd end up downloading it anyway.

On a side note I have a 7.3.5 rapt, fixed the issues it had with the bintray service being retired if you want to keep using old versions.

Also I will likely need to modify my solution for RenPy 7.4.9, I will recheck it when it's released.
What I've done is downloaded your modified 7.4.5 directory as well as a clean 7.4.5 directory and I'm looking at diffs of all the files.

I'm currently building on 7.4.8 and I'm trying to look at the above diffs and figure out what/if they should be merged into 7.4.8.

Honestly a patch file that shows the actual code changes you've made would be best. I think there are too many things about different jdk versions and such.

An example of something that doesn't seem to have anything to do with save/storage would be in rapt/templates/app-AndroidMainfest.xml

Your directory has

deleted: android:isGame="true"
deleted: android:fullBackupContent="Xml/backup"
deleted: android:fullBackupOnly="true"
deleted: android:alwaysRetainTaskState="true"
modified: android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
 

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
I Have also moved to 7.4.8 and have made a few changes.
TBH you've the first one to reply to this thread since I created it, If there was more interest I would have updated my post before now specially to include the option to move the log/traceback location.
I have attached my current app-AndroidMainfest.xml, You will find it quite different to the one posted here but essentially doing the same thing. Original was from a much older build.
 

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,943
9,713
I Have also moved to 7.4.8 and have made a few changes.
TBH you've the first one to reply to this thread since I created it, If there was more interest I would have updated my post before now specially to include the option to move the log/traceback location.
I have attached my current app-AndroidMainfest.xml, You will find it quite different to the one posted here but essentially doing the same thing. Original was from a much older build.
I think other folks have just grabbed your code and used it without actually thinking about it.

So is it really only the app-AndroidManifest.xml, renpy.py, savelocation.py files that are modified?
 

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
I think other folks have just grabbed your code and used it without actually thinking about it.

So is it really only the app-AndroidManifest.xml, renpy.py, savelocation.py files that are modified?
I have just updated my first post with all the files NEEDED to make this work.
The only optional file there is log.py and to me it just makes sense to move the log along with the saves.

FYI: SDK 30 is needed for Android 11 and 12 permission changes. SDK 29 will still install on your first build but is not really needed.
(still looking for that rouge platform 29 request)
 

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,943
9,713
I have just updated my first post with all the files NEEDED to make this work.
The only optional file there is log.py and to me it just makes sense to move the log along with the saves.

FYI: SDK 30 is needed for Android 11 and 12 permission changes. SDK 29 will still install on your first build but is not really needed.
(still looking for that rouge platform 29 request)
Which parts of 30 are required? Don't suppose there's an easy way to update, I noticed sdktools has a magic update option, but something tells me that's not gonna be what I want.
 

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
I used android studio to update to 30, it has 31 available now, should we stay away from that for now?
I don't think 31 is needed just yet, at least for the moment. An APK compiled with SDK30 works fine in a pre release Android 12. I only looked briefly at the codename-s SDK.
 

estrada777

Engaged Member
Modder
Donor
Mar 22, 2020
3,943
9,713
I don't think 31 is needed just yet, at least for the moment. An APK compiled with SDK30 works fine in a pre release Android 12. I only looked briefly at the codename-s SDK.
I just dropped your files (Dual version), unaltered into my renpy-7.4.8-sdk folder and built the question, installing on my Android 11 phone, i get no prompt for storage permissions. I go look at the app's permissions and it says Files and media = Denied. Any ideas?

I manually changed it to allowed, and started up the question and made a save, but no alternate directory.
 

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
I just dropped your files (Dual version), unaltered into my renpy-7.4.8-sdk folder and built the question, installing on my Android 11 phone, i get no prompt for storage permissions. I go look at the app's permissions and it says Files and media = Denied. Any ideas?

I manually changed it to allowed, and started up the question and made a save, but no alternate directory.
Did you use a new rapt folder and put the files in immediately after it's created by the RenPy GUI?
You don't need to pull the SDK or anything else from Android studio. You don't need Android studio at all.
The only reason I have it is to test against Android versions I don't have.
 
  • Like
Reactions: LightmanP

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
If you don't drop it in at the right time "project" folder is created from the original files.
 

Hordragg

Lesser-Known Mesmer
Donor
Compressor
Apr 2, 2019
2,993
10,722
Awesome!

Initially shot myself in the foot trying to be clever: droped the files in right after installing rapt to skip one Ren'Py restart. Did not work out. :D
Following the instructions to the letter did solve the problem.

Thank you very much!
 
  • Like
Reactions: Wills747

Wills747

Engaged Member
Dec 14, 2018
2,441
5,127
Awesome!

Initially shot myself in the foot trying to be clever: droped the files in right after installing rapt to skip one Ren'Py restart. Did not work out. :D
Following the instructions to the letter did solve the problem.

Thank you very much!
I was debating making a RenPy SDK install or even a rapt folder with it built in to make it easier. I might do something like that when 7.4.9 gets released.