Add extra files to APK.

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
Zeroized
Regular
Posts: 33
Joined: Sat Mar 23, 2013 12:33 am
Contact:

Add extra files to APK.

#1 Post by Zeroized »

Greetings.
I'm trying to port a game that I'm developing to android. The game allows the player to get a random first and last name, and it reads the names from two txt files, called "first_names.txt" and "last_names.txt".
The game works fine on windows, however, when I test it on my cellphone, I get an error saying that the two name files are missing.
I think something is going on with the APK. How can I add those files to the android version?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Add extra files to APK.

#2 Post by PyTom »

You can't, because Android doesn't have files per se. But if you use renpy.file to open those files, then it will pull them out of the .apk and give you access to them. You might also need to adjust rapt/whitelist.txt to make sure they're included.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Andredron