Dynamic Images, Image Tags, and Transitions

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
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Dynamic Images, Image Tags, and Transitions

#1 Post by trooper6 » Mon Jul 18, 2016 12:49 am

Greetings!

I have a question about the very exciting new Dynamic Images. (Discussed here: https://www.renpy.org/doc/html/changelo ... mic-images)

So let's say you have an image like so:

Code: Select all


define e = Character("Eileen", image = "eileen")

image eileen = LiveComposite(
    (300, 600),
    (0, 0), "eileen_base.png",
    (0, 0), "eileen_eyes_[eyes].png",
    (0, 0), "eileen_mouth_[mouth].png",
    )
I want to ask a bit about changing expressions...specifically, if there is a way to use image tags and or also transitions.
Lets say we have the following eyes: "happy", "angry", "sad" and the following mouths: "grin", "frown"
Let's say I now have a few emotion combinations in my mind:
happy = happy eyes, grin mouth
angry = angry eyes, frown mouth
sad = sad eyes, frown mouth
creepy = angry eyes, grin mouth

So I know I can switch from emotion to emotion like so:

Code: Select all

$eyes, mouth = "happy", "grin"
e "I'm so happy."
$eyes, mouth = "sad", "frown"
e "Now I'm sad."
But how would I get these changes to happen with a dissolve transition?

Also would there be some efficient way for image tags to work without hardcoding each one separately so I could do:

Code: Select all

e happy "I'm so happy."
e sad "I'm so sad."
Note: The reason I don't want to define each image emotion is because I have a really, really large number of options between brows, eyes, and mouth of multiple options.

Any ideas?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Dynamic Images, Image Tags, and Transitions

#2 Post by PyTom » Mon Jul 18, 2016 1:57 am

The current implementation can't do this. It's something I'd like to add, but haven't gotten around to yet.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Dynamic Images, Image Tags, and Transitions

#3 Post by trooper6 » Mon Jul 18, 2016 2:15 am

Oh, that is good to know! I'm glad I didn't miss something that was in the documentation somewhere.
Is this change high, medium, or low on the to do list?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Dynamic Images, Image Tags, and Transitions

#4 Post by PyTom » Tue Jul 19, 2016 12:49 am

The list is - kind of a fluid thing. What happens is that ideas sort of percolate in the back of my head for a while - days, weeks, months, years - and one day, it hits me how to do do it _right_. Then I furiously code. So it's hard to really give an idea of when something is going to be done.

I used to keep a more organized list - "this is the top priority thing". I didn't work, since I was forcing myself to code things I knew weren't ready.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
chocoberrie
Veteran
Posts: 254
Joined: Wed Jun 19, 2013 10:34 pm
Projects: Marshmallow Days
Contact:

Re: Dynamic Images, Image Tags, and Transitions

#5 Post by chocoberrie » Tue Jul 19, 2016 8:38 am

The dissolve transition bit for facial expressions can be done using TransitionShowing Switch, but it sure would be amazing and tons easier to do it like this! Looking forward to such a feature being implemented in Ren'Py :D

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Dynamic Images, Image Tags, and Transitions

#6 Post by trooper6 » Tue Jul 19, 2016 1:42 pm

chocoberrie wrote:The dissolve transition bit for facial expressions can be done using TransitionShowing Switch, but it sure would be amazing and tons easier to do it like this! Looking forward to such a feature being implemented in Ren'Py :D
Can you link to the documentation? I can't find TransitionShowing.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: _ticlock_