Ren'Py Define character as layeredimage

Mr. TurTur

Newbie
Jun 12, 2020
92
81
Hey ho,
I try to connect my defined character with my layer image.
So i dont have to ___show name happy "Hi im eileen"___ all the time, and can rely on the basic ___a happy "Hi im eileen"___
I know i coud just render the combination of every expression and outfit and could get the same result, but that sucks.

I cant imagine its that hard.
Thank you in advance :)



Python:
layeredimage Anelise:
    always:
        "anelise_a_base"

    group clothes:
        attribute clothes_1 default:
            "anelise_a_clothes_1"

    group faces:
        attribute neutral default:
            "anelise_a_neutral"
        attribute angry:
            "anelise_a_angry"
        attribute happy:
            "anelise_a_happy"
        attribute shock:
            "anelise_a_shock"
        attribute horny:
            "anelise_a_horny"

define a = Character("Anelise") #image=layerdimage Anelise / i know it doesnt work this way but i hoped it would :/


label start:


    scene bg room
    a neutral "You've created a new Ren'Py game."
    a happy "im happy rn"
    a angry "now im angry"
    a angry "grrrrrr"


    return
 

gojira667

Member
Sep 9, 2019
287
273
I haven't ever played with layeredimage, but did you define it as a side image?
Python:
layeredimage Anelise:
    ...

define a = Character("Anelise")

image side a = "Anelise" #layeredimage Anelise as str
:unsure: That won't help if you are already using side images...

You may want to look into proxying as well depending:
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,420
4,273
It's my understanding that layered images are a stand in for a displayable and *should* be usable in the situation you've stated.

Looking at the first example on here, , it shows that the character image is "show"n first, then the dialogue lines change the display attribute

If you do the following, what happens?

Code:
layeredimage Anelise:
    always:
        "anelise_a_base"

    group clothes:
        attribute clothes_1 default:
            "anelise_a_clothes_1"

    group faces:
        attribute neutral default:
            "anelise_a_neutral"
        attribute angry:
            "anelise_a_angry"

        # snipped a couple of faces


define a = Character("Anelise", image="Anelise")  # note that there is no need to use "layeredimage" here, and that the image name must be a string.

label start:
   
    # this is the new line compared to your example
    show anelise angry

    a "i'm very angry"

    a neutral "But not any more"
 
  • Like
Reactions: gojira667

Mr. TurTur

Newbie
Jun 12, 2020
92
81
It's my understanding that layered images are a stand in for a displayable and *should* be usable in the situation you've stated.

Looking at the first example on here, , it shows that the character image is "show"n first, then the dialogue lines change the display attribute

If you do the following, what happens?

Code:
layeredimage Anelise:
    always:
        "anelise_a_base"

    group clothes:
        attribute clothes_1 default:
            "anelise_a_clothes_1"

    group faces:
        attribute neutral default:
            "anelise_a_neutral"
        attribute angry:
            "anelise_a_angry"

        # snipped a couple of faces


define a = Character("Anelise", image="Anelise")  # note that there is no need to use "layeredimage" here, and that the image name must be a string.

label start:
  
    # this is the new line compared to your example
    show anelise angry

    a "i'm very angry"

    a neutral "But not any more"
Hey there :)
Yes you are right.
Turnes out i was the problem all along and didnt really try it.