Dynamic and unlockable character images/outfits (answered)

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
EggsBenedict
Newbie
Posts: 8
Joined: Fri Jul 25, 2008 9:34 am
Projects: Chef de Cuisine, Sibling Rivalry
Location: Australia
Contact:

Dynamic and unlockable character images/outfits (answered)

#1 Post by EggsBenedict »

Hi, I tried searching for problems similar to mine and didn't come up with anything, so it's question time!

I'm using the random blinking (but not lip flap) method from the Cookbook. As far as I can tell, I can't use the defined images in a ConditionSwitch because they aren't filenames.

The kinetic novel I'm working on spans a few days and it's not set in a school, so each of the characters will undergo three or four outfit changes throughout the story. Is there a way to change groups of character images (ie outfits) based on variables, or will I have to define each image one by one?

I also want the player to be able to key in a code and unlock a special outfit for the main character. This would override his outfit throughout the entire game. Ideally I would want to toggle the special outfit on/off, but otherwise I'd want him to be reset to his usual outfits at the beginning of each play session, like cheats on a console game.

If I can't find a solution I'll replace the character art with fixed animation loops but it's just not as awesome... Thanks for any help anyone can offer :)
Last edited by EggsBenedict on Fri Feb 06, 2009 3:00 am, edited 1 time in total.

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: Dynamic and unlockable character images/outfits

#2 Post by DaFool »

My last game did all the things you mentioned... changeable clothes + random blinking facial expressions based on variables (You can also remove the clothes, incidentally, due to the nature of the work. :oops: )

However since people may be loathe to download a hardcore hentai game, I have attached the options.rpy for it.

Hope it will be of help. The codes for renpy may be have changed ... there may be more efficient ways to do things now, but this should be backwards compatible. Learn by example ^_^. :D
Attachments
options.rpy
The options.rpy file which defines all the images. Take note of all the compositing definitions... there's a lot of them!
(116.67 KiB) Downloaded 163 times

EggsBenedict
Newbie
Posts: 8
Joined: Fri Jul 25, 2008 9:34 am
Projects: Chef de Cuisine, Sibling Rivalry
Location: Australia
Contact:

Re: Dynamic and unlockable character images/outfits

#3 Post by EggsBenedict »

Thanks so much DaFool!

I think this will really help; I was having problems getting the syntax right.

Maverynthia
Regular
Posts: 57
Joined: Thu Jan 29, 2009 4:08 pm
Contact:

Re: Dynamic and unlockable character images/outfits

#4 Post by Maverynthia »

This seems similar to the problem that I had only with face parts. :D I'll see if I can make this work...

Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot]