Adding a custom setting that allows sprites and CG images to be switched out

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
User avatar
Posts: 2
Joined: Wed Jan 03, 2018 7:02 pm
Projects: My Magical Demon Lover, To Trust An Incubus

Adding a custom setting that allows sprites and CG images to be switched out

#1 Post by ViviChibi » Wed Jan 03, 2018 7:37 pm

I've been trying to search for info on this subject in the forums but haven't had any luck. I'm working on a game in which I would like the user to have the option to toggle body hair on/off on character sprites and CG images. So, basically, my artist is making several sets of the same sprites and CG images with varying degrees of hair. I want to include a slider in the preferences screen that would set a value for a variable, then based on that variable, use different sets of images in the game. I have no idea how to implement this as I'm fairly new to Python programming. If you have any idea or could point me to another thread where a similar question is answered, I would really appreciate it.

User avatar
Posts: 299
Joined: Sat Feb 07, 2015 9:12 pm
Projects: CrossDol, The Purring Demon's Love, circus eterie
Organization: astellic
Tumblr: mitoky

Re: Adding a custom setting that allows sprites and CG images to be switched out

#2 Post by mitoky » Wed Jan 03, 2018 8:33 pm

Hello! I am not an expert but i 'think' this should work. First, look at this thread under "June":

The part in the document saying " The difficulty level of the game." could be used for the various levels of bodyhair. For CG's that definitely should work, nothing additional to be done here.
However, since you too have that for sprites, i would recomment to use Condition Switch additionally here (since doing it by hand everytime would get very tedious). ... n%20switch
This thread is an example, just instead of day and night you could use the level of bodyhair:

[Logo Commissions - CLOSED] || Wish to support or tip me? Buy Me a Coffee!

Post Reply

Who is online

Users browsing this forum: rayminator, Remix