Scene Images case sensitive issue

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
lsf22
Regular
Posts: 139
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Scene Images case sensitive issue

#1 Post by lsf22 »

version: Linux-5.4.0-96-generic-x86_64-with-debian-bullseye-sid
Ren'Py 7.4.11.2266

I have a a simple scene line of code that seemingly does not work correctly when using caps. It was showing a grey screen instead and the image name on top.
image name: GTFO_You_1.png

Code: Select all

Label Reaction_1:

	scene GTFO_You_1
	pause
But when I renamed it to all lower case it then worked correctly by properly displaying my image. Why is that? Is it a bug or something?
image name renamed: gtfo_you_1.png

Code: Select all

Label Reaction_1:

	scene gtfo_you_1
	pause

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Scene Images case sensitive issue

#2 Post by Per K Grok »

lsf22 wrote: Tue Mar 01, 2022 10:32 pm version: Linux-5.4.0-96-generic-x86_64-with-debian-bullseye-sid
Ren'Py 7.4.11.2266

I have a a simple scene line of code that seemingly does not work correctly when using caps. It was showing a grey screen instead and the image name on top.
image name: GTFO_You_1.png

Code: Select all

Label Reaction_1:

	scene GTFO_You_1
	pause
But when I renamed it to all lower case it then worked correctly by properly displaying my image. Why is that? Is it a bug or something?
image name renamed: gtfo_you_1.png

Code: Select all

Label Reaction_1:

	scene gtfo_you_1
	pause

That is intentional (why I don't know)

https://www.renpy.org/doc/html/quickstart.html

"Ren'Py searches for image files in the images directory, which can be found by selecting "images" in the "Open Directory" section of the launcher. Ren'Py expects character art to be an PNG or WEBP file, while background art should be a JPG, JPEG, PNG, or WEBP file. The name of a file is very important – the extension is removed, the file name is forced to lowercase, and that's used as the image name."


Note that you can have higher-case letters in the file name, but need to use lower-case when showing the image.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2406
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Scene Images case sensitive issue

#3 Post by Ocelot »

... or you can define your image yourself and not rely on autodefinitions.
< < insert Rick Cook quote here > >

User avatar
lsf22
Regular
Posts: 139
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Scene Images case sensitive issue

#4 Post by lsf22 »

Is there a reason to prefer defining the images? Is it more reliable? I don't know much about this Ren'py game engine.

Also for my scene images that use the auto definitions. In order to for the image to show without a dialog box do I have to use pause right beneath the image so that it doesn't show the dialog box?

for example

Code: Select all

	show scene_1
	pause

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2406
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Scene Images case sensitive issue

#5 Post by Ocelot »

Manual image definition (a) reliable: you know exactly what you have and don't have to remember automatic definition rules. (b) Provides you with control point for that image. If you later deside that image needs some changes you can do in engine, you will know, where to make them. (c) You have a list of used images in your project.

You can use scene statement (it autohides everything else, though), it does hide window automatically, but it will not pause afterward, so you will see image without textbox for a moment, and then whatever is next will start executing. If it is say statement, it obviously will pull up the textbox.
< < insert Rick Cook quote here > >

User avatar
lsf22
Regular
Posts: 139
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Scene Images case sensitive issue

#6 Post by lsf22 »

Thank you both, I have a better of idea of using it

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]