layeredimage auto not working

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
Didkrak
Newbie
Posts: 1
Joined: Sun May 15, 2022 4:04 pm
Contact:

layeredimage auto not working

#1 Post by Didkrak »

I'm trying to make some tools to make modding Doki Doki Literature Club a bit easier for me, starting with making all the sprites with layered images (people have already made stuff for this, but I'm trying to clean it up a bit).

The problem is I can't get the "auto" option to work properly in a mod. The code works just fine if I make a blank renpy project, but not when used with the rest of the DDLC code. Auto attributes still work if I define an attribute, but groups can't manage to automatically define attributes using the image names. So for example:

Code: Select all

layeredimage moni base:

    group nose auto:
        attribute n1
    
    group eyes auto:
        attribute eo1
    
    group eyebrows auto
    
    group mouth auto
Will result in the mod finding both "moni_base_nose_n1.png" and "moni_base_eyes_eo1.png" no problem, but if I try to use the mouth "moni_base_mouth_mo1.png" or eyebrows "moni_base_eyebrows_b1.png" with the call "show moni base eo1 b1 mo1 n1" I get "moni base unknown attributes: b1 mo1" overlayed on the rest of her sprite (with the nose and eyes both showing up properly).

The same code works fine as a stand-alone project (it finds the mouth and eyebrows), so something in the rest of DDLC must be interfering with how "auto" searches for or makes the attributes, but I can't figure out what it could be. All images are in the "images" folder. De-compiling the images.rpa, adding the images, then re-compiling gives the same result. So does de-compiling the rpa and deleting it, leaving just the images folder (so it's not a problem of there being multiple images folders, one in the .rpa and one out of it). I've defined a new character ("moni" instead of "monika") to test this, so it's not a problem of conflicting character definitions.

Any idea what else I could look for to fix this? I can't find any documentation on how the "auto" option works outside of the required naming scheme for images https://www.renpy.org/doc/html/layeredi ... attributes.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]