Sprite Transitions when using minimal show/hide statements [SOLVED...mostly]

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
pyopyon
Veteran
Posts: 451
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Sprite Transitions when using minimal show/hide statements [SOLVED...mostly]

#1 Post by pyopyon »

Hello.

So my question is about how to implement dissolve transitions when I'm not using show hide statements.

My sprites change emotion like as follows

First, I declare them this way:

Code: Select all

define si = Character('Simone', image="simone", color="#D985F8", window_background="images/ui/text_box_no_buttons.png", what_prefix="{color=e87e21}",  what_suffix="{/color}", who_prefix="{color=924603}",  who_suffix="{/color}")
And then in the actual script:

So... not really much as far as show hide statements.

Code: Select all

    z "Matthews. {w}Milo Matthews."
    
    si thinking "Matthews, Matthews..."
    
    si sigh "No, doesn't seem familiar."
    
    "I pause deliberately."
    
    si incredulous "Well, I can't be sure. I don't {i}think{/i} we've met; someone so important would've definitely left a more lasting impression and the name 'Matthews' brings absolutely no one to mind."
    
    "My smile comes across more coldly than I intended."
    
    si smile "If you're as important as you say I'm sure I would've at least heard of you.
How do I add dissolves between these emotions?
Last edited by pyopyon on Thu Nov 09, 2017 1:06 pm, edited 2 times in total.
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#2 Post by Zetsubou »

Define a transform, then set the side_image_same_transform config option. eg.

Code: Select all

init -1:
    transform dissolve_in_out(old, new):
        old
        new with Dissolve(0.35, alpha=True)
define config.side_image_same_transform = dissolve_in_out
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
pyopyon
Veteran
Posts: 451
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#3 Post by pyopyon »

What if it's not a side image, but for all the sprites themselves?
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#4 Post by Zetsubou »

Sorry, I misinterpreted your question.
Unfortunately, the only way I know how to do that is by overriding the callback in the character definition, or by using one of the character callback config options. Both have unwanted side-effects.
I'm unaware of any equivalent to the side_image_same_transform for a full sprite.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#5 Post by philat »

Perhaps config.say_attribute_transition ? Haven't tested it, but it's in the documentation.

User avatar
pyopyon
Veteran
Posts: 451
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#6 Post by pyopyon »

It does work, but every single time an emotion changes, the textbox disappears and then re-appears.

Is there a way to make sure the text box doesn't disappear everytime?
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

User avatar
pyopyon
Veteran
Posts: 451
Joined: Thu Aug 29, 2013 4:35 am
Completed: https://chouette.itch.io/
Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
Organization: Jellyfish Parade
Tumblr: jelpiparade
Skype: miss.chouette
Soundcloud: pyopyon
itch: chouette
Contact:

Re: Sprite Transitions when using minimal show/hide statements

#7 Post by pyopyon »

Oh! I got it.

So, I just have to use:

Code: Select all

window show
That'll keep the textbox in place. The only down side is.... well, the text still blinks when there is an emotion change.

Any suggestions?
Image ImageImage

WiP: Image

✿ Writer for Trade/Commission ✿

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Sprite Transitions when using minimal show/hide statements [SOLVED...mostly]

#8 Post by Zetsubou »

It looks like a fix for that might be on the way: https://github.com/renpy/renpy/commit/c ... d8a9ed00de
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Sprite Transitions when using minimal show/hide statements [SOLVED...mostly]

#9 Post by Zetsubou »

Renpy 6.99.14 implements the above feature, and that appears to be enough for what you want.

Code: Select all

define config.say_attribute_transition_layer = "master"
define config.say_attribute_transition = dissolve
With those two lines of code in my options.rpy file I have expressions dissolve into one another without any delay/blinking for the text.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

Post Reply

Who is online

Users browsing this forum: Google [Bot]