Allow players to download files in game?

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
ameliori
Veteran
Posts: 201
Joined: Sun Apr 06, 2014 9:20 am
Completed: Who is Mike?, Cupid
Projects: The Black Beast [Fairytale]
Organization: FERVENT
Tumblr: ameliori
itch: fervent
Contact:

Allow players to download files in game?

#1 Post by ameliori »

Hi guys! I'd like to make a dressup/avatar game, but I was wondering if there a way for the users to download the avatar itself on their computer? The feature should:

1. Prompt the user for a folder to save the file.

2. Allow a choice whether a new folder to be created. (In an event no folder is selected, the dowload will default to a certain folder like "Downloads" or "Desktop" NOT the game folder like the current screenshot feature)

3. Save the file in PNG/JPEG/GIF/Etc. format.

4. As for dressup, the PNG/JPEG file should have the variables chosen by the player.

I Imagine it could also be useful for other games to be able to download "files" from the game. For example, a detective game that downloads the "case file" separately so you can look at the clues more clearly or something. I think it could be a cool immersion trick!
ameliori
TwitterPatreon

User avatar
Sarchalen
Regular
Posts: 29
Joined: Tue Aug 08, 2017 5:23 pm
Projects: Sugawara Chronicle
Contact:

Re: Allow players to download files in game?

#2 Post by Sarchalen »

Possible? sure, but why? Everyone's file organization is different. What you should do is have a folder inside your game file specific for whatever type of file you're interacting with and have them place it there, under the correct path. There are many many reasons for doing it this way.

As for physically downloading the files in game, renpy already has a utility for it called Updater.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Allow players to download files in game?

#3 Post by Imperf3kt »

Are you aware of the screenshot function?
Press S while testing your game.
(screenshota taken with the launcher appear in C:/program files(x86)/renpy
Exact path may differ slightly, (especially if you aren't on Windows) working from memory.

Basically, they appear wherever you installed Ren'Py. If you build a distribution, they appear in that folder.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], geoWaffle, Google [Bot]