zmook wrote: ↑Fri Jun 10, 2022 2:56 pm
If that doesn't show the image, open console and let us know what it printed and what error you got. It really should work.
Well, it took awhile because Ren'Py decided to take a dump on me (don't ever let there be more than one directory associated with your app in %APPDATA%\RenPy...).
So, I got tired of messing around with my original project (I thought it was going to be a quick fix) and just generated a new project. Sure enough, your method works on files directly in the
images folder.
Subdirectories in that folder, not so much.
So I went from:
Code: Select all
init -999 python:
COMP_IMAGES = True
init -998 python:
image_ext = "jpg" if (COMP_IMAGES) else "webp"
image youngAlex 1 = "youngAlex1.%s" % image_ext
image youngAlex 2 = "youngAlex2.%s" % image_ext
image youngAlex 3 = "youngAlex3.%s" % image_ext
image youngAlex 4 = "youngAlex4.%s" % image_ext
image youngAlex 5 = "youngAlex5.%s" % image_ext
which worked, to:
Code: Select all
init -999 python:
COMP_IMAGES = True
init -998 python:
image_ext = "jpg" if (COMP_IMAGES) else "webp"
image youngAlex 1 = "prologue/youngAlex/youngAlex1.%s" % image_ext
image youngAlex 2 = "prologue/youngAlex/youngAlex2.%s" % image_ext
image youngAlex 3 = "prologue/youngAlex/youngAlex3.%s" % image_ext
image youngAlex 4 = "prologue/youngAlex/youngAlex4.%s" % image_ext
image youngAlex 5 = "prologue/youngAlex/youngAlex5.%s" % image_ext
when I moved the files to subdirectories, which didn't. On a lark I removed the path
prologue/youngAlex/ just to see what it would do and it still errors out.
So that's the bottom line. I don't want to have to keep every image file in one directory, so I guess I'm going the programmatic route.
EDIT: There must be some sort of caching weirdness going on, because I went back to the second version and this time it ran fine. I went back and forth setting
COMP_IMAGES to
True and
False and it did the right thing. Hmmmmmmm......