Possible for players to upload their own custom image?

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
Wudgeous
Regular
Posts: 58
Joined: Tue Apr 30, 2019 5:59 am
Tumblr: herotome
itch: wudgeous
Contact:

Possible for players to upload their own custom image?

#1 Post by Wudgeous »

I know that a lot of renpy games currently have some ways to customize the protagonist: choosing one of a few preset portraits, or using dollmakers with individual options.
However, the presets and dollmakers will always be limited to what assets the artist has created for the game.

Is it possible to instead allow the player to upload their own art or photography - much like changing their profile picture on social media? I'd like to know if this is worth looking into (and some direction on where to look), or if I should cut my losses early because it's impossible!
Have confidence. Let go of perfectionism. I love you!
Image
A superhero dating sim in fresh hot development!


You can also keep up with me on Twitter and Itch!

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Possible for players to upload their own custom image?

#2 Post by rayminator »

you might be able to do what you want nothing impossible in renpy

this might help it might give a idea on how to do it

don't know if this will work it might need some adjustments

example 1:

Code: Select all

class CLICKIE(object):
        def __init__(self, name, fileName, location, clickType, isActive, tip):
            self.name = name
            self.fileName = fileName
            self.location = location
            self.clickType = clickType
            self.isActive = isActive
            self.tip = tip

        @property
        def clickable(self):
            avtr = "Clickables/{}/{}.png".format(location, self.fileName)
            return avtr
example 2:

Code: Select all

def BGstr_chap():
        global location
        global chapter
        global sequence
        OutputStr = "Backgrounds/{}_{}_{}.jpg".format(location, chapter, sequence)
        if renpy.loadable(OutputStr):
            return OutputStr
        OutputStr = "Backgrounds/{}_{}.jpg".format(location, chapter)
        if renpy.loadable(OutputStr):
            return OutputStr
        OutputStr = "Backgrounds/{}.jpg".format(location)
        if renpy.loadable(OutputStr):
            return OutputStr
        return "Backgrounds/background.jpg"

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

Re: Possible for players to upload their own custom image?

#3 Post by Imperf3kt »

Alternatively, leave the artwork for the characters unarchived and allow players to simply swap files
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: TimmyzFTW