Calling a layered image shows "unknown attributes"

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
VHC_Softwares
Regular
Posts: 27
Joined: Sat Feb 16, 2013 12:22 am
Contact:

Calling a layered image shows "unknown attributes"

#1 Post by VHC_Softwares »

Hello all.

I've been stuck on doing something that should be very simple and it's making me feel very stupid.

I'm trying to show a layered image attribute that corresponds to the animated image "homuha_eyes_eempty", but it's not working. I would appreciate any help before I go crazy.

Layered image code:

Code: Select all

layeredimage homuha:
    always "homuha_base"
    
    group outfit auto

    group eyebrows auto

    group eyes:
        attribute eempty
    
    group mouth:
        attribute mworried
        
image homuha_eyes_eempty:
    "homuha_eyes_eemptyopen"
    0.5
    "homuha_eyes_eemptyclosed"
    0.5
Story code:

Code: Select all

show homuha sifuku bworried eempty mworried
Game output:
Image

As you can see, we see homuha_base. That is her body, head, and hair.
We see homuha_outfit_sifuku. That is her clothes.
We see homuha_eyebrows_bworried.
We see homuha_mouth_mworried.
We DO NOT see homuha_eyes_eempty. The desired image should be a pair of eyes. Instead, it shows an error message.

I've checked the code and file names for typos and it looks clean. If I might have missed another simple spot, please let me know.

EDIT: I fixed it by clearing persistent data within Renpy. My code, spelling, and syntax were 100% correct for the last 8 hours, but Renpy would not reflect my changes until I cleared persistent data. Yayyyy.

EDIT2: It's happening again and clearing persistent data doesn't fix it. Will include more details in post 2.

EDIT3: I had 2 layeredimages definitions for the same character. I guess it was causing conflicts.
Last edited by VHC_Softwares on Tue Feb 11, 2020 8:02 pm, edited 1 time in total.

User avatar
VHC_Softwares
Regular
Posts: 27
Joined: Sat Feb 16, 2013 12:22 am
Contact:

Re: Calling a layered image shows "unknown attributes"

#2 Post by VHC_Softwares »

It's happening again and clearing persistent data doesn't fix it.

Defining the layered image:

Code: Select all

layeredimage nyao:
    always "nyao_base"
    
    group outfit auto

    group eyebrows auto

    group eyes auto
    
    group mouth auto
Displaying it within the story:

Code: Select all

show nyao sensei bworried eangryopen mworriedclosed with dissolve
Filename has no typos:
Image

Result:
Image

As you can see, it will display everything except bworried.

nyao_eyebrows_bworried.webp shows up in files.txt

It also shows up in the Image Location Picker.

It can also be shown as it's own sprite. Meaning Renpy can clearly see it, but it simply won't display it as part of a layered image.

Changing the file format to png does nothing.

Changing the group attribution from auto to manual (attribute bworried) does nothing.

Any help is appreciated.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]