Page 3 of 3

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 14, 2018 1:24 am
by PyTom
I'm kind of tired, but I'll confirm that you can use at to apply a transform to the entire image.

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 14, 2018 3:12 am
by trooper6
Here is what I've used to get a Transform to apply to the whole layeredimage and it works:

Code: Select all

layeredimage barber:
    at Transform("barber", zoom=0.4, yanchor=0.2, ypos=0.5)
    always "barber_base"
    group backhand auto:
        attribute straight default
    always "barber_jacket"
    group brows auto:
        attribute normal default
    group mouth auto:
        attribute normal default
    group eyes auto:
        attribute normal default
    group hand auto:
        attribute neutral default
I still haven't figured out how to mix and match different mouths/eyes/brows to get different faces.

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 14, 2018 3:53 am
by Zetsubou
Zetsubou wrote: Sun May 13, 2018 9:13 pm The LiveComposite faded both the base and the expression out at the same time, but the layeredimage immediately hid the base, then faded out the expression.
I didn't have time to check if the movement was a factor or not. I don't believe the movement touches the alpha.
I'll play with The Tutorial when I get home and see what's necessary to replicate this.
I've been unable to get this to happen with a new game.
It happens consistently with my existing game, but a new game with the same images, definitions, transforms and such doesn't do it.
I'll keep trying to find something, but don't hold anything back on my account. If it's not happening with a new game, it's probably something weird with the existing game's setup.

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 14, 2018 3:54 am
by trooper6
So this is what my original code looks like:

Code: Select all


define barb = Character('[barb_name]', color="#994411", what_color="#FFFFCC")

default ba = BarbEx()

default b_bhpose = "Straight"
default b_brow = "Normal"
default b_mouth = "Normal"
default b_eyes = "Normal"
default b_hpose = "Neutral"
image barber = LiveComposite(
    (1020, 3125),
    (0,0), "images/Sprites/Barber/Barber_Base.png",
    (0,0), "images/Sprites/Barber/Barber_Backhand_[b_bhpose].png",
    (0,0), "images/Sprites/Barber/Barber_Jacket.png",
    (0,0), "images/Sprites/Barber/Barber_Brows_[b_brow].png",
    (0,0), "images/Sprites/Barber/Barber_Mouth_[b_mouth].png",
    (0,0), "images/Sprites/Barber/Barber_Eyes_[b_eyes].png",
    (0,0), "images/Sprites/Barber/Barber_Hand_[b_hpose].png")
    
init -1 python:
    class BarbEx(object):
        def friendly(self):
            global b_brow, b_eyes, b_mouth
            b_brow, b_eyes, b_mouth = "Raised", "Narrow", "Grin"
        def neutral(self):
            global b_brow, b_eyes, b_mouth
            b_brow, b_eyes, b_mouth = "Normal", "Normal", "Normal"

label start:
    scene black
    show barber at center
    barb "I am the barber"
    $ba.friendly()
    barb "Now I am friendly."
    $ba.neutral()
    barb "Now I'm back to neutral."
    $b_bhpose = "angry"
    $ba.freindly()
    barb "Right now I'm smiling but my back hand is an angry fist."    
I thought this might be helpful in showing what I'm doing so I can better figure out who to convert what I have to the new LayeredImage. I have more than two emotions...but I figured that would be enough. Can you do subgrouping somehow? I also have sprites with conditionals...like show or don't show a blood spatter...but I fire that would just use the if statement.

Re: Ren'Py 7.0.0 Prereleased

Posted: Tue May 15, 2018 2:06 am
by dreamfarmer
When I try to use ID, even in the Tutorial game, it runs into problems on the scene command, showing a bunch of what looks like raw python code instead of bg names. I keep forgetting to take a screenshot, but I wanted to mention.

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 21, 2018 7:27 am
by trooper6
So any word on being able to define emotions in layeredimages that are a mix of differently named brows, eyes, and mouth? I have the eyes, mouth, and brows done separately so I can have more variety in emotions. It seems like layeredimages can’t currently handle that. Is that true?

Calling sad will get you Sad brows, sad eyes, sad mouth. That is good. But what if you want sad brows, sad eyes, and happy mouth for wistful?

Or should we just keep using LiveComposites and ConditionSwithes in the instance we have separate layers for eyes, brows, and mouth?

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon May 21, 2018 10:55 am
by Jackkel Dragon
I'd suggest manually defining an attribute for "wistful" in each group/layer, and making what you need there. I'm on a phone right now and thus can't put it in proper code easily, but something like this:

group eyes
attribute wistful
"sad file"

group mouth
attribute wistful
"happy file"

Re: Ren'Py 7.0.0 Prereleased

Posted: Thu May 24, 2018 2:46 am
by PyTom
I've been out of it for a little bit, but I'm back with a new prelease.

7.0.0.172)

* There have been a number of improvement to the way the focus of text is handled. Most notably, the end onf an interaction will not cause the hyperlink to lose focus.

* A case where it was possible to rollback past the start of the screen was fixed.

* There were a couple of fixed to the interactive director. An issue where attributes were displayed incorrectly was fixed, as was one where a changed image would not be shown due to the associated rollback failing.

* There were a ton of documentation edits, thanks to Craig P. Donson.

* The Spanish translation has been updated.


@trooper6 - you can either duplicate everything, define combinations of atributes to use different image files (Jackkel's approach), or use an attribute_function to turn a "main" attribute into collections of other attributes that select layers. (Like how the latest patreon does it.)

Re: Ren'Py 7.0.0 Prereleased

Posted: Fri May 25, 2018 4:13 pm
by trooper6
When I get back home in two weeks I’ll try the attribute_function and see if I can make that work, then report back.

Re: Ren'Py 7.0.0 Prereleased

Posted: Sat May 26, 2018 6:52 pm
by papiersam
Firstly, massive congrats to all involved -- Renpy really has come a long way.

Secondly, this just might be my excuse to jump right back into Renprogramming. I've got a few old projects that could stand to be completely remade. I'd just like to know if there's an easy way to update everything, or am I required to go through the docs and do it all by hand? (Which is probably better, I need the research anyway)

Re: Ren'Py 7.0.0 Prereleased

Posted: Tue May 29, 2018 12:03 pm
by PyTom
I've bumped things up to 7.0.0.190. Changes are:

* The docs have been given an editing pass.

* The special file page names (used for auto- and quick-saves) are passed through the translation code, allowing them to be translated into alternate languages.

* There's a fix for a typo in the tutorial.

Re: Ren'Py 7.0.0 Prereleased

Posted: Mon Jun 11, 2018 2:18 am
by Zetsubou
Zetsubou wrote: Sun May 13, 2018 9:13 pm The LiveComposite faded both the base and the expression out at the same time, but the layeredimage immediately hid the base, then faded out the expression.
I didn't have time to check if the movement was a factor or not. I don't believe the movement touches the alpha.
I'll play with The Tutorial when I get home and see what's necessary to replicate this.
I found out what the problem was.
I only want to show a side sprite if it has an expression showing (so it won't show for thoughts, or during a CG), so I defined images like:

Code: Select all

layeredimage girl:
    if renpy.get_attributes('girl'):
        "sprite_girl_base"
    group exp auto
The problem is, the hide statement seems to wipe out the attributes before the image is fully hidden.
So the base image, which needs attributes to show, would be removed immediately. Then the expression, which doesn't have any such condition, would fade out as intended.

For the time being my workaround is to remove the attribute check from the layeredimage and instead check in the say screen.

Code: Select all

$ tag = renpy.get_say_image_tag()
if tag and renpy.get_attributes(tag):
    add SideImage() xalign 0.0 yalign 0.984