Although it’s one of the first things I learned and have used over 70 times already, now, for some reason, I’m having trouble with side images. What’s happening is that this new character, named "Jack", never shows the side image, and it also doesn’t apply the change in name text size to fit the textbox and the color.
Code:
define arisa = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define cyntx = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define jack = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")
I’ve already checked the avatar, format, name, and size are correct, and I have no idea what the heck else to do.
I’ve also noticed that, for some reason, the colors or sizes of other characters aren’t updating when I make changes. I have a feeling I must’ve messed with something I shouldn’t have, but I have no idea what it could be.
View attachment 4719341
View attachment 4719344
Thanks in advance, everyone!
Can you show what the code is for that dialogue example you are showing?
At first glance, the basic character define seems okay, but side images won't work unless they are properly named in your images directory. For example, for that screencap above, you might have this...
jack "Me cago en dios, porque no dunciona????!!!!"
so the side image should be a PNG or Webp image (with Alpha) and it should be small enough to fit (mine are 300 x 300 pixels, for example) and saved as that and not saved full screen, and the file name should be something like ...
"images/side awesome_jack.png"
The space between "side" and the character name is required.
and for other sides (to convey emotions, for example) , you just add the descripter after the character name (with a space), like so ...
"images/side awesome_jack.png"
is called by
jack "blah, blah ..."
- Neutral side image
"images/side awesome_jack angry.png"
is called by
jack angry "blah, blah ..."
"images/side awesome_jack sad.png"
is called by
jack sad "blah, blah ..."
Haven't you forgot to define the side image?
image side awesome_jack = "whatever image that is the default one"
That's actually something that is kind of confusing, because I have never had to declare any side images in my VN's. And I have never had an error because of that. AFAIK, Ren'py scans your game directory and automatically creates a pool of image attributes from any image with a 'side' tag.
So, for example, if you declare jack with an image tag like ...
jack = Character("Awesome Jack", image="awesome_jack")
... and you only have one side image for them, then the pool will only have one entry - "awesome_jack" and will use any image named that with a corresponding side tag. ("images/side awesome_jack.png")
When you have multiple tags for that same character, then Ren'py tries to find the best match and if it can't find an exact image that matches that, then it uses the top one from the pool. So if you did this ...
jack frustrated "blah, blah ..."
... but you didn't include a
"images/side awesome_jack frustrated.png"
image, then Ren'py would default to the
"images/side awesome_jack.png"
In the Ren'py DOCS on the subject, they do show examples of declaring side images, but I believe that's just to give example to how it resolves conflicts. In any case, I doubt it would hurt to decalre side images, but I've never ran into an error not declaring them - YET - and I'm on Ren'py 8.3.1 right now. I have had regular game images go from working fine one release, to not being found in an updated version and then I had to declare them. So I basically declare all images now, except the main scene ones, because that would be just silly having to declare a few thousand more images.
In any case, to the OP's original problem, I suspect it's probably an improperly saved image (like it is saved full screen, but it needs to be small) or there might not be a space between 'side' and the image file name. Another possibility I have seen is that the dev put the side images in the GUI folder, which definitely would require them to be declared, because Ren'py will look in the IMAGES folder for them by default, not the GUI.
EDIT: Just thought of one other possible thing that could cause this... When making major changes to the code, such as adding defines and new variables, it's always a good idea to Force a Recompile via the SDK menu.