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.
I've been tasked with implementing layeredimages in a ren'py game and am running into a weird issue that I think must be on my end, but can't, for the life of me, figure out what the issue is:
define b = Character("James")
layeredimage boy:
image_format "images/characters/boy/{image}.png"
group expression auto
label start:
show boy normal
boy talking "oh,hi"
return
```
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 6: expected 'image_name_component' not found.
group expression auto
^
Ren'Py Version: Ren'Py 7.2.2.491
Thu Apr 11 10:30:56 2019
```
I encounter the same error, at the same line (the first "group" statement) regardless of whether or not I define the group's attributes automatically or explicitly. Help!
I havent used this feature yet so I could be wrong but does {image}.png work? I was under the assumption it would use something like boy_expression_[prefix_].png similar to how the gui calls for various bars and strollers for screens.
works and is proper (but maybe not for layeredimages where the image is defined automatically? [which doesn't matter for my purposes as the error persist regardless of whether or not the attributes are defined explicitly or automatically]). My recollection is that the image_format argument is basically just a string stored as a variable that layeredimage later interpolates, replacing "image" in the braces with the name_group_attribute to find the image location.
I feel like I must be messing up the names of the images when I save them, but I can't for the life of me figure out what I'm doing wrong.